Skip to content

Commit

Permalink
MDL-68011 coourse: Final deprecation of course_modchooser()
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihail Geshoski committed Jul 19, 2022
1 parent 6a12298 commit 49693c6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
14 changes: 4 additions & 10 deletions course/renderer.php
Expand Up @@ -134,17 +134,11 @@ public function render_modchooser(renderable $modchooser) {
}

/**
* Build the HTML for the module chooser javascript popup
*
* @param array $modules A set of modules as returned form @see
* get_module_metadata
* @param object $course The course that will be displayed
* @return string The composed HTML for the module
* @deprecated since 3.9
*/
public function course_modchooser($modules, $course) {
debugging('course_modchooser() is deprecated. Please use course_activitychooser() instead.', DEBUG_DEVELOPER);

return $this->course_activitychooser($course->id);
public function course_modchooser() {
throw new coding_exception(
'course_modchooser() can not be used anymore, please use course_activitychooser() instead.');
}

/**
Expand Down
4 changes: 4 additions & 0 deletions course/upgrade.txt
@@ -1,6 +1,10 @@
This files describes API changes in /course/*,
information provided here is intended especially for developers.

=== 4.1 ===
* The function course_modchooser() has been finally deprecated and can not be used anymore. Please use
course_activitychooser() instead.

=== 4.0 ===
* All activity icons have been replaced with black monochrome icons. The background
colour for these icons is defined using a new 'FEATURE_MOD_PURPOSE' support variable in the module lib.php file
Expand Down
4 changes: 4 additions & 0 deletions theme/upgrade.txt
@@ -1,6 +1,10 @@
This files describes API changes in /theme/* themes,
information provided here is intended especially for theme designer.

=== 4.1 ===
* The function core_course_renderer::course_modchooser() has been finally deprecated and can not be used anymore.
Please use core_course_renderer::course_activitychooser() instead.

=== 4.0 ===
* A new theme config 'removedprimarynavitems' allows a theme to customise primary navigation by specifying the list of items to remove.
* A new theme config 'usescourseindex' allows a theme to specify whether it implements and uses course index.
Expand Down

0 comments on commit 49693c6

Please sign in to comment.