From 430746d3a2c55ec4ff6215ba08bdd61191dedafa Mon Sep 17 00:00:00 2001 From: Ilya Tregubov Date: Tue, 30 Mar 2021 14:03:34 +0200 Subject: [PATCH] MDL-66431 core: Remove activity chooser user preference. This commit removes activity chooser user preference and course preference page. Separate dropdowns to activity and resource is also removed. --- admin/settings/appearance.php | 1 - course/renderer.php | 195 +++++++++++++++++----------------- course/upgrade.txt | 1 + lang/en/admin.php | 10 +- lang/en/deprecated.txt | 3 + lang/en/moodle.php | 2 +- lib/classes/user.php | 2 - lib/db/upgrade.php | 8 ++ lib/navigationlib.php | 9 -- user/classes/course_form.php | 67 ------------ user/course.php | 66 ------------ version.php | 2 +- 12 files changed, 119 insertions(+), 247 deletions(-) delete mode 100644 user/classes/course_form.php delete mode 100644 user/course.php diff --git a/admin/settings/appearance.php b/admin/settings/appearance.php index 4aa50b4bcf3..707f07670ae 100644 --- a/admin/settings/appearance.php +++ b/admin/settings/appearance.php @@ -269,7 +269,6 @@ preferences,moodle|/user/preferences.php|t/preferences', $setting = new admin_setting_configcheckbox('cachejs', new lang_string('cachejs', 'admin'), new lang_string('cachejs_help', 'admin'), 1); $setting->set_updatedcallback('js_reset_all_caches'); $temp->add($setting); - $temp->add(new admin_setting_configcheckbox('modchooserdefault', new lang_string('modchooserdefault', 'admin'), new lang_string('configmodchooserdefault', 'admin'), 1)); $ADMIN->add('appearance', $temp); // Link to tag management interface. diff --git a/course/renderer.php b/course/renderer.php index 8fb4d31c9b2..fe1eaba7726 100644 --- a/course/renderer.php +++ b/course/renderer.php @@ -272,100 +272,21 @@ class core_course_renderer extends plugin_renderer_base { * @return string */ function course_section_add_cm_control($course, $section, $sectionreturn = null, $displayoptions = array()) { - global $CFG, $USER; - // The returned control HTML can be one of the following: // - Only the non-ajax control (select menus of activities and resources) with a noscript fallback for non js clients. + // Please note that non-ajax control has been deprecated and it will be removed in the future. + // - Only the ajax control (the link which when clicked produces the activity chooser modal). No noscript fallback. - // - [Behat only]: The non-ajax control and optionally the ajax control (depending on site settings). If included, the link - // takes priority and the non-ajax control is wrapped in a