From 88e17ccad99b00a3df2bed88618f68bbc9d0763f Mon Sep 17 00:00:00 2001 From: Ferran Recio Date: Wed, 24 Nov 2021 14:00:06 +0100 Subject: [PATCH] MDL-72911 core_courseformat: fix deprecation messages --- course/format/README.txt | 23 ++--- course/format/classes/external/get_state.php | 4 +- .../classes/output/local/content/section.php | 1 - .../output/local/content/section/cmitem.php | 3 +- .../output/local/content/section/cmlist.php | 2 +- .../classes/output/section_renderer.php | 97 ++++++++++--------- course/renderer.php | 8 +- course/upgrade.txt | 74 +++++++------- lib/deprecatedlib.php | 7 +- 9 files changed, 112 insertions(+), 107 deletions(-) diff --git a/course/format/README.txt b/course/format/README.txt index 4e319331c67..9be444ce8d0 100644 --- a/course/format/README.txt +++ b/course/format/README.txt @@ -149,25 +149,26 @@ Optional files (outputs) By default, the format renderer will use those output classes: -* core_course\output\course_format: for the general course structure -* core_course\output\course_format\*: to render specific course structure parts +* core_courseformat\output\local\content: for the general course structure +* core_courseformat\output\local\content\*: to render specific course structure parts -* core_course\output\section_format: for the complete section output -* core_course\output\section_format\*: to render specific section parts +* core_courseformat\output\local\content\section: for the complete section output +* core_courseformat\output\local\content\section\*: to render specific section parts -* core_course\output\cm_format: for output an activity inside a section -* core_course\output\cm_format\*: for speficis parts of the cm output +* core_courseformat\output\local\content\cm: for output an activity inside a section +* core_courseformat\output\local\content\cm\*: for speficis parts of the cm output Your format can override any of this output classes just by creating class - inside your format_yourformat\output\ classes. We recommend to extend the + inside your format_yourformat\output\courseformat\* namespace. We recommend to extend the original class to ensure all element will work as expected. For example: if you want to change the section header, you should create - format_yourformat\output\section_format\header, which will extend the original - core_course\output\section_format\header class. + format_yourformat\output\section\header, which will extend the original + core_courseformat\output\courseformat\content\section\header class. - By default, only two format renderer methods are needed to render a course: - - render_course_format to render a full course + By default, only a few format renderer methods are needed to render a course: + - render_content to render a full course content + - course_section_updated used by the course editor to refresh a specific section - course_section_updated_cm_item used by the course editor to refresh a specific cm item Formats can override those two methods to use different templates to render a course. diff --git a/course/format/classes/external/get_state.php b/course/format/classes/external/get_state.php index b93be0ae29b..f718ac0d626 100644 --- a/course/format/classes/external/get_state.php +++ b/course/format/classes/external/get_state.php @@ -60,8 +60,8 @@ class get_state extends external_api { * * As the other main course outputs, format plugins can override those output components * to send more information to the frontend course editor. These extended classes should - * be located in format_XXX\output\courseformat\state\course, format_XXX\output\section_format\state\section - * or format_XXX\output\cm_format\state\cm. + * be located in format_XXX\output\courseformat\state\course, format_XXX\output\courseformat\state\section + * or format_XXX\output\courseformat\state\cm. * * @param int $courseid the course id * @return string Course state in JSON diff --git a/course/format/classes/output/local/content/section.php b/course/format/classes/output/local/content/section.php index 2995223ad41..40d040b57ba 100644 --- a/course/format/classes/output/local/content/section.php +++ b/course/format/classes/output/local/content/section.php @@ -25,7 +25,6 @@ namespace core_courseformat\output\local\content; use core_courseformat\base as course_format; -use completion_info; use context_course; use renderable; use templatable; diff --git a/course/format/classes/output/local/content/section/cmitem.php b/course/format/classes/output/local/content/section/cmitem.php index 4c06a1147e6..e06ad62fd72 100644 --- a/course/format/classes/output/local/content/section/cmitem.php +++ b/course/format/classes/output/local/content/section/cmitem.php @@ -25,7 +25,6 @@ namespace core_courseformat\output\local\content\section; use core_courseformat\base as course_format; -use core_course\output\section_format; use renderer_base; use section_info; use renderable; @@ -45,7 +44,7 @@ class cmitem implements renderable, templatable { /** @var course_format the course format class */ protected $format; - /** @var section_format the course section class */ + /** @var section_info the course section class */ protected $section; /** @var cm_info the course module to display */ diff --git a/course/format/classes/output/local/content/section/cmlist.php b/course/format/classes/output/local/content/section/cmlist.php index 73b9a25fa39..f1f73d7815b 100644 --- a/course/format/classes/output/local/content/section/cmlist.php +++ b/course/format/classes/output/local/content/section/cmlist.php @@ -43,7 +43,7 @@ class cmlist implements renderable, templatable { /** @var course_format the course format class */ protected $format; - /** @var section_format the course section class */ + /** @var section_info the course section class */ protected $section; /** @var array optional display options */ diff --git a/course/format/classes/output/section_renderer.php b/course/format/classes/output/section_renderer.php index ab911b56a30..f84ff3cf1d2 100644 --- a/course/format/classes/output/section_renderer.php +++ b/course/format/classes/output/section_renderer.php @@ -36,7 +36,6 @@ use coding_exception; use context_course; use core_course_renderer; use core_courseformat\base as course_format; -use completion_info; use html_writer; use moodle_page; use moodle_url; @@ -226,8 +225,8 @@ abstract class section_renderer extends core_course_renderer { * * @deprecated since 4.0 MDL-72656 - use core_course output components instead. * - * The section edit controls are now part of the main section_format output and does - * not use renderer methods anymore. + * The section edit controls are now part of the main core_courseformat\output\local\content\section output + * and does not use renderer methods anymore. * * @param array $controls The edit control items from section_edit_control_items * @param stdClass $course The course entry from DB (not used) @@ -236,8 +235,8 @@ abstract class section_renderer extends core_course_renderer { */ protected function section_edit_control_menu($controls, $course, $section) { debugging('section_edit_control_menu() can not be used anymore. Please use ' . - 'core_course\output\section_format to render a section. In case you need to modify those controls ' . - 'override core_course\output\section_format\controlmenu in your format plugin.', DEBUG_DEVELOPER); + 'core_courseformat\\output\\local\\content\\section to render a section. In case you need to modify those controls ' . + 'override core_courseformat\\output\\local\\content\\section\\controlmenu in your format plugin.', DEBUG_DEVELOPER); $o = ""; if (!empty($controls)) { @@ -276,8 +275,8 @@ abstract class section_renderer extends core_course_renderer { * @deprecated since 4.0 MDL-72656 - use core_course output components instead. * * Spatial references like "left" or "right" are limiting the way formats and themes can - * extend courses. The elements from this method are now included in the section_format - * output components. + * extend courses. The elements from this method are now included in the + * core_courseformat\output\local\content\section output components. * * @param stdClass $section The course_section entry from DB * @param stdClass $course The course entry from DB @@ -287,7 +286,7 @@ abstract class section_renderer extends core_course_renderer { protected function section_right_content($section, $course, $onsectionpage) { debugging('section_right_content() can not be used anymore. Please use ' . - 'core_course\output\section_format to render a section.', DEBUG_DEVELOPER); + 'core_courseformat\\output\\local\\content\\section to render a section.', DEBUG_DEVELOPER); $o = $this->output->spacer(); @@ -304,8 +303,8 @@ abstract class section_renderer extends core_course_renderer { * @deprecated since 4.0 MDL-72656 - use core_course output components instead. * * Spatial references like "left" or "right" are limiting the way formats and themes can - * extend courses. The elements from this method are now included in the section_format - * output components. + * extend courses. The elements from this method are now included in the + * core_courseformat\output\local\content\section output components. * * @param stdClass $section The course_section entry from DB * @param stdClass $course The course entry from DB @@ -315,7 +314,7 @@ abstract class section_renderer extends core_course_renderer { protected function section_left_content($section, $course, $onsectionpage) { debugging('section_left_content() can not be used anymore. Please use ' . - 'core_course\output\section_format to render a section.', DEBUG_DEVELOPER); + 'core_courseformat\\output\\local\\content\\section to render a section.', DEBUG_DEVELOPER); $o = ''; @@ -335,7 +334,7 @@ abstract class section_renderer extends core_course_renderer { * * @deprecated since 4.0 MDL-72656 - use core_course output components instead. * - * This element is now a section_format output component and it is displayed using + * This element is now a core_courseformat\output\content\section output component and it is displayed using * mustache templates instead of a renderer method. * * @param stdClass $section The course_section entry from DB @@ -346,8 +345,9 @@ abstract class section_renderer extends core_course_renderer { */ protected function section_header($section, $course, $onsectionpage, $sectionreturn = null) { debugging('section_header() is deprecated. Please use ' . - 'core_course\output\section_format to render a section or core_course\output\section_format\header ' . - 'to print ony the header.', DEBUG_DEVELOPER); + 'core_courseformat\\output\\local\\content\\section to render a section ' . + 'or core_courseformat\output\\local\\content\\section\\header ' . + 'to print only the header.', DEBUG_DEVELOPER); $o = ''; $sectionstyle = ''; @@ -410,16 +410,16 @@ abstract class section_renderer extends core_course_renderer { * * @deprecated since 4.0 MDL-72656 - use core_course output components instead. * - * This element is integrated into section_format output component and it is displayed using - * mustache templates instead of a renderer method. + * This element is integrated into core_courseformat\output\local\content\section output component and it is + * displayed using mustache templates instead of a renderer method. * * @return string HTML to output. */ protected function section_footer() { debugging('section_footer() is deprecated. Please use ' . - 'core_courseformat\output\local\content\section to render individual sections or .' . - 'core_courseformat\output\local\content to render the full course', DEBUG_DEVELOPER); + 'core_courseformat\\output\\local\\content\\section to render individual sections or .' . + 'core_courseformat\\output\\local\\content to render the full course', DEBUG_DEVELOPER); $o = html_writer::end_tag('div'); $o .= html_writer::end_tag('li'); @@ -441,7 +441,7 @@ abstract class section_renderer extends core_course_renderer { * * @deprecated since 4.0 MDL-72656 - use core_course output components instead. * - * This element is now a section_format output component and it is displayed using + * This element is now a core_courseformat\output\content\section output component and it is displayed using * mustache templates instead of a renderer method. * * @param stdClass $course The course entry from DB @@ -451,7 +451,7 @@ abstract class section_renderer extends core_course_renderer { */ protected function section_edit_control_items($course, $section, $onsectionpage = false) { debugging('section_edit_control_items() is deprecated, please use or extend' . - 'core_course\output\section_format\controlmenu instead (like topics format does).', DEBUG_DEVELOPER); + 'core_courseformat\output\\local\\content\\section\\controlmenu instead (like topics format does).', DEBUG_DEVELOPER); $format = course_get_format($course); $modinfo = $format->get_modinfo(); @@ -473,7 +473,7 @@ abstract class section_renderer extends core_course_renderer { * * @deprecated since 4.0 MDL-72656 - use core_course output components instead. * - * This element is now a section_format output component and it is displayed using + * This element is now a core_courseformat\output\content\section output component and it is displayed using * mustache templates instead of a renderer method. * * @param stdClass $section The course_section entry from DB @@ -483,8 +483,8 @@ abstract class section_renderer extends core_course_renderer { */ protected function section_summary($section, $course, $mods) { debugging('section_summary() is deprecated. Please use ' . - 'core_course\output\section_format to render sections. If you need to modify those summary, extend ' . - 'core_course\output\section_format\summary in your format plugin.', DEBUG_DEVELOPER); + 'core_courseformat\output\\local\\content\\section to render sections. If you need to modify those summary, extend ' . + 'core_courseformat\output\\local\\content\\section\\summary in your format plugin.', DEBUG_DEVELOPER); $classattr = 'section main section-summary clearfix'; $linkclasses = ''; @@ -543,7 +543,7 @@ abstract class section_renderer extends core_course_renderer { * * @deprecated since 4.0 MDL-72656 - use core_course output components instead. * - * This element is now a section_format output component and it is displayed using + * This element is now a core_courseformat\output\content\section output component and it is displayed using * mustache templates instead of a renderer method. * * @param stdClass $section The course_section entry from DB @@ -554,8 +554,9 @@ abstract class section_renderer extends core_course_renderer { protected function section_activity_summary($section, $course, $mods) { debugging('section_activity_summary() is deprecated. Please use ' . - 'core_course\output\section_format to render sections. If you need to modify those information, extend ' . - 'core_course\output\section_format\cmsummary in your format plugin.', DEBUG_DEVELOPER); + 'core_courseformat\output\\local\\content\\section to render sections. ' . + 'If you need to modify those information, extend ' . + 'core_courseformat\output\\local\\content\\section\\cmsummary in your format plugin.', DEBUG_DEVELOPER); $format = course_get_format($course); $widgetclass = $format->get_output_classname('content\\section\\cmsummary'); @@ -575,7 +576,7 @@ abstract class section_renderer extends core_course_renderer { * * @deprecated since 4.0 MDL-72656 - use core_course output components instead. * - * This element is now a section_format output component and it is displayed using + * This element is now a core_courseformat\output\content\section output component and it is displayed using * mustache templates instead of a renderer method. * * @param section_info $section The course_section entry from DB @@ -586,8 +587,8 @@ abstract class section_renderer extends core_course_renderer { global $CFG; debugging('section_availability_message() is deprecated. Please use ' . - 'core_course\output\section_format to render sections. If you need to modify this element, extend ' . - 'core_course\output\section_format\availability in your format plugin.', DEBUG_DEVELOPER); + 'core_courseformat\output\\local\\content\\section to render sections. If you need to modify this element, extend ' . + 'core_courseformat\output\\local\\content\\section\\availability in your format plugin.', DEBUG_DEVELOPER); $course = $section->course; $format = course_get_format($course); @@ -601,7 +602,7 @@ abstract class section_renderer extends core_course_renderer { * * @deprecated since 4.0 MDL-72656 - use core_course output components instead. * - * This element is now a section_format output component and it is displayed using + * This element is now a core_courseformat\output\content\section output component and it is displayed using * mustache templates instead of a renderer method. * * @param section_info $section @@ -609,8 +610,8 @@ abstract class section_renderer extends core_course_renderer { */ public function section_availability($section) { debugging('section_availability() is deprecated. Please use ' . - 'core_course\output\section_format to render sections. If you need to modify this element, extend ' . - 'core_course\output\section_format\availability in your format plugin.', DEBUG_DEVELOPER); + 'core_courseformat\output\\local\\content\\section to render sections. If you need to modify this element, extend ' . + 'core_courseformat\output\\local\\content\\section\\availability in your format plugin.', DEBUG_DEVELOPER); $context = context_course::instance($section->course); $canviewhidden = has_capability('moodle/course:viewhiddensections', $context); @@ -659,7 +660,7 @@ abstract class section_renderer extends core_course_renderer { * * @deprecated since 4.0 MDL-72656 - use core_course output components instead. * - * This element is now a section_format output component and it is displayed using + * This element is now a core_courseformat\output\content\section output component and it is displayed using * mustache templates instead of a renderer method. * * @param stdClass $course The course entry from DB @@ -670,8 +671,8 @@ abstract class section_renderer extends core_course_renderer { protected function get_nav_links($course, $sections, $sectionno) { debugging('get_nav_links() is deprecated. Please use ' . - 'core_courseformat\output\local\content to render a course. If you need to modify this element, extend ' . - 'core_courseformat\output\local\content\sectionnavigation in your format plugin.', DEBUG_DEVELOPER); + 'core_courseformat\\output\\local\\content to render a course. If you need to modify this element, extend ' . + 'core_courseformat\\output\\local\\content\\sectionnavigation in your format plugin.', DEBUG_DEVELOPER); // FIXME: This is really evil and should by using the navigation API. $course = course_get_format($course)->get_course(); @@ -716,7 +717,7 @@ abstract class section_renderer extends core_course_renderer { * * @deprecated since 4.0 MDL-72656 - use core_course output components instead. * - * This element is now a section_format output component and it is displayed using + * This element is now a core_courseformat\output\content\section output component and it is displayed using * mustache templates instead of a renderer method. * * @param int $sectionno The section number in the course which is being displayed @@ -724,7 +725,7 @@ abstract class section_renderer extends core_course_renderer { */ protected function stealth_section_header($sectionno) { debugging('stealth_section_header() is deprecated. Please use ' . - 'core_course\output\section_format to render sections.', DEBUG_DEVELOPER); + 'core_courseformat\output\\local\\content\\section to render sections.', DEBUG_DEVELOPER); $o = ''; $o .= html_writer::start_tag('li', [ @@ -751,14 +752,14 @@ abstract class section_renderer extends core_course_renderer { * * @deprecated since 4.0 MDL-72656 - use core_course output components instead. * - * This element is now a section_format output component and it is displayed using + * This element is now a core_courseformat\output\content\section output component and it is displayed using * mustache templates instead of a renderer method. * * @return string HTML to output. */ protected function stealth_section_footer() { debugging('stealth_section_footer() is deprecated. Please use ' . - 'core_course\output\section_format to render sections.', DEBUG_DEVELOPER); + 'core_courseformat\output\\local\\content\\section to render sections.', DEBUG_DEVELOPER); $o = html_writer::end_tag('div'); $o .= html_writer::end_tag('li'); @@ -800,7 +801,7 @@ abstract class section_renderer extends core_course_renderer { * * @deprecated since 4.0 MDL-72656 - use core_course output components instead. * - * This element is now a section_format output component and it is displayed using + * This element is now a core_courseformat\output\content\section output component and it is displayed using * mustache templates instead of a renderer method. * * @param stdClass $course The course entry from DB @@ -812,9 +813,9 @@ abstract class section_renderer extends core_course_renderer { protected function section_nav_selection($course, $sections, $displaysection) { debugging('section_nav_selection() can not be used anymore. Please use ' . - 'core_courseformat\output\local\content to render a course. If you need to modify this element, extend ' . - 'core_courseformat\output\local\content\sectionnavigation or ' . - 'core_courseformat\output\local\content\sectionselector in your format plugin.', DEBUG_DEVELOPER); + 'core_courseformat\\output\\local\\content to render a course. If you need to modify this element, extend ' . + 'core_courseformat\\output\\local\\content\\sectionnavigation or ' . + 'core_courseformat\\output\\local\\content\\sectionselector in your format plugin.', DEBUG_DEVELOPER); $o = ''; $sectionmenu = array(); @@ -863,7 +864,8 @@ abstract class section_renderer extends core_course_renderer { public function print_single_section_page($course, $sections, $mods, $modnames, $modnamesused, $displaysection) { debugging('Method print_single_section_page is deprecated, please use' . - 'core_courseformat\output\local\content and override render_course_format method instead', DEBUG_DEVELOPER); + 'core_courseformat\\output\\local\\content instead ' . + 'or override render_content method to use a different template', DEBUG_DEVELOPER); // Some abstract methods are not needed anymore. We simulate them in case they are not present. if (method_exists($this, 'start_section_list')) { @@ -981,7 +983,8 @@ abstract class section_renderer extends core_course_renderer { public function print_multiple_section_page($course, $sections, $mods, $modnames, $modnamesused) { debugging('Method print_multiple_section_page is deprecated, please use' . - 'render_course_format insteadand override render_course_format method instead', DEBUG_DEVELOPER); + 'core_courseformat\\output\\local\\content instead ' . + 'or override render_content method to use a diferent template', DEBUG_DEVELOPER); // Some abstract methods are not needed anymore. We simulate them in case they are not present. if (method_exists($this, 'start_section_list')) { @@ -1083,7 +1086,7 @@ abstract class section_renderer extends core_course_renderer { */ protected function change_number_sections($course, $sectionreturn = null) { debugging('Method change_number_sections is deprecated, please use' . - 'core_courseformat\output\local\content\addsection instead', DEBUG_DEVELOPER); + 'core_courseformat\\output\\local\\content\\addsection instead', DEBUG_DEVELOPER); $format = course_get_format($course); if ($sectionreturn) { @@ -1104,7 +1107,7 @@ abstract class section_renderer extends core_course_renderer { */ protected function format_summary_text($section) { debugging('Method format_summary_text is deprecated, please use' . - 'core_course\output\section_format\summary::format_summary_text instead', DEBUG_DEVELOPER); + 'core_courseformat\output\\local\\content\\section\\summary::format_summary_text instead', DEBUG_DEVELOPER); $format = course_get_format($section->course); if (!($section instanceof section_info)) { diff --git a/course/renderer.php b/course/renderer.php index f3beafd6372..420b25a5733 100644 --- a/course/renderer.php +++ b/course/renderer.php @@ -595,7 +595,7 @@ class core_course_renderer extends plugin_renderer_base { */ public function course_section_cm_name(cm_info $mod, $displayoptions = array()) { debugging( - 'course_section_cm_name is deprecated. Use core_courseformat\output\local\content\cm\\cmname class instead.', + 'course_section_cm_name is deprecated. Use core_courseformat\\output\\local\\content\\cm\\cmname class instead.', DEBUG_DEVELOPER ); @@ -677,7 +677,7 @@ class core_course_renderer extends plugin_renderer_base { public function course_section_cm_name_title(cm_info $mod, $displayoptions = array()) { debugging( - 'course_section_cm_name_title is deprecated. Use core_courseformat\\output\\local\\cm\\title classes instead.', + 'course_section_cm_name_title is deprecated. Use core_courseformat\\output\\local\\cm\\title class instead.', DEBUG_DEVELOPER ); @@ -879,7 +879,7 @@ class core_course_renderer extends plugin_renderer_base { public function course_section_cm($course, &$completioninfo, cm_info $mod, $sectionreturn, $displayoptions = []) { debugging( - 'course_section_cm is deprecated. Use core_courseformat\output\content\cm output classes instead.', + 'course_section_cm is deprecated. Use core_courseformat\\output\\content\\cm output class instead.', DEBUG_DEVELOPER ); @@ -948,7 +948,7 @@ class core_course_renderer extends plugin_renderer_base { public function course_section_cm_list($course, $section, $sectionreturn = null, $displayoptions = []) { global $USER; - debugging('course_section_cm_list is deprecated. Use core_course\\output\\section_format\\cmlist '. + debugging('course_section_cm_list is deprecated. Use core_courseformat\\output\\local\\content\\section\\cmlist '. 'classes instead.', DEBUG_DEVELOPER); $output = ''; diff --git a/course/upgrade.txt b/course/upgrade.txt index 0c5ec586afe..5304cb31005 100644 --- a/course/upgrade.txt +++ b/course/upgrade.txt @@ -16,50 +16,50 @@ The colours for these types are defined in theme/boost/scss/moodle/variables.scs * The format_base is now deprecated. Use core_courseformat\base instead. * The new course output components deprecate many renderer methods from course renderer and course format renderer: - - output\course_format: to render the general course structure - - output\section_format: to render a section - - output\cm_format: to render an activity card inside a section - - output\course_format\*: to render parts of the course structure - - output\section_format\*: to render parts of the course section + - core_courseformat\output\local\content: to render the general course structure + - core_courseformat\output\local\content\section: to render a section + - core_courseformat\output\local\content\cm: to render an activity card inside a section + - core_courseformat\output\local\content\cm\*: to render parts of the course structure + - core_courseformat\output\local\content\section\*: to render parts of the course section * The previous format renderer page_title method has been moved to course_format::page_title * New format renderer methods to interact with the new output components: - render: override the default templatable mustache location for the new course components. - course_section_updated_cm_item: used when the course editor needs to update a cm item HTML. - - render_course_format: contrib formats should override this method to change the default template. + - render_content: contrib formats should override this method to change the default template. * The following methods are adapted to use outputs but with a deprecation warning and should not be used anymore: - - print_single_section_page (replaced by output\course_format) - - print_multiple_section_page (replaced by output\course_format) - - course_activity_clipboard (integrated in replaced by output\course_format) - - format_summary_text (replaced by output\section_format\summay) - - change_number_sections (replaced by output\course_format\addsection) - - course_section_cm_list_item (replaced by output\section_format\cmitem) - - course_section_cm (replaced by output\cm_format) - - course_section_cm_list (replaced by output\section_format\cmlist) - - section_edit_control_menu (replaced by output\section_format\controlmenu) - - section_right_content (integrated in output\section_format) - - section_left_content (integrated in output\section_format) - - section_header (replaced by output\section_format\header) - - section_footer (integrated in output\section_format) - - section_edit_control_items (replaced by output\section_format\controlmenu) - - section_summary (replaced by output\section_format\summary) - - section_activity_summary (replaced by output\section_format\cmsummary) - - section_availability_message (integrated in output\section_format\availability) - - section_availability (replaced by output\section_format\availability) - - get_nav_links (replaced by output\course_format\sectionnavigation) - - stealth_section_header (replaced by output\section_format\header) - - stealth_section_footer (integrated in by output\section_format) - - section_nav_selection (replaced by output\course_format\sectionselector) - - course_section_cm_edit_actions (replaced by core_courseformat\output\local\content\cm\\controlmenu) + - print_single_section_page (replaced by core_courseformat\output\local\content) + - print_multiple_section_page (replaced by core_courseformat\output\local\content) + - course_activity_clipboard (integrated in replaced by core_courseformat\output\local\content) + - format_summary_text (replaced by core_courseformat\output\local\content\section\summay) + - change_number_sections (replaced by core_courseformat\output\local\content\addsection) + - course_section_cm_list_item (replaced by core_courseformat\output\local\content\section\cmitem) + - course_section_cm (replaced by core_courseformat\output\local\content\cm) + - course_section_cm_list (replaced by core_courseformat\output\local\content\section\cmlist) + - section_edit_control_menu (replaced by core_courseformat\output\local\content\section\controlmenu) + - section_right_content (integrated in core_courseformat\output\local\content\section) + - section_left_content (integrated in core_courseformat\output\local\content\section) + - section_header (replaced by core_courseformat\output\local\content\section\header) + - section_footer (integrated in core_courseformat\output\local\content\section) + - section_edit_control_items (replaced by core_courseformat\output\local\content\section\controlmenu) + - section_summary (replaced by core_courseformat\output\local\content\section\summary) + - section_activity_summary (replaced by core_courseformat\output\local\content\section\cmsummary) + - section_availability_message (integrated in core_courseformat\output\local\content\section\availability) + - section_availability (replaced by core_courseformat\output\local\content\section\availability) + - get_nav_links (replaced by core_courseformat\output\local\content\sectionnavigation) + - stealth_section_header (replaced by core_courseformat\output\local\content\section\header) + - stealth_section_footer (integrated in by core_courseformat\output\local\content\section) + - section_nav_selection (replaced by core_courseformat\output\local\content\sectionselector) + - course_section_cm_edit_actions (replaced by core_courseformat\output\local\content\cm\controlmenu) - is_cm_conditionally_hidden (incorporated in core_availability\info_module::is_available_for_all) - - course_section_cm_name (replaced by core_courseformat\output\local\content\cm\\cmname) + - course_section_cm_name (replaced by core_courseformat\output\local\content\cm\cmname) - course_section_cm_classes (integrated in core_courseformat\output\local\content\cm) - - course_section_cm_name_title (replaced by core_courseformat\\output\\local\\cm\\title) - - course_section_cm_text (integrated in core_courseformat\\output\\local\\content\\cm) - - course_section_cm_availability (replaced by core_courseformat\\output\\local\\content\\cm\\availability)) + - course_section_cm_name_title (replaced by core_courseformat\output\local\cm\title) + - course_section_cm_text (integrated in core_courseformat\output\local\content\cm) + - course_section_cm_availability (replaced by core_courseformat\output\local\content\cm\availability)) * The following abstract methods are deleted: - - start_section_list (integrated in output\course_format) - - end_section_list (integrated in output\course_format) - - page_title (moved to output\course_format) + - start_section_list (integrated in core_courseformat\output\local\content) + - end_section_list (integrated in core_courseformat\output\local\content) + - page_title (moved to core_courseformat\output\local\content) * Course formats should have a renderer (until now it was only highly recommended but not mandatory). For backwards compatibility (to not break third-party plugins without it), legacy_format_renderer has been created and will be used when course formats don't have their own renderer. @@ -73,7 +73,7 @@ course formats don't have their own renderer. * New core_course_drawer() function to render the message drawer in the top of the body of each page. * New course_get_enrolled_courses_for_logged_in_user_from_search which hooks in with external\get_enrolled_courses_by_timeline_classification given COURSE_TIMELINE_SEARCH is set then get_enrolled_courses_by_timeline_classification will deviate to use a string search of enrolled courses. -* Class core_course\output\course_module_name is deprecated. Now core_courseformat\output\local\cm\cmname controls inline edit. +* Class core_course\output\course_module_name is deprecated. Now core_courseformat\output\local\content\cm\cmname controls inline edit. * Calendar menu entry is now moved to User menu items, so the following methods will not return the calendar item anymore: - course_get_user_navigation_options - core_course_externalcore_course_external::get_user_navigation_options diff --git a/lib/deprecatedlib.php b/lib/deprecatedlib.php index b6ce99915cc..305ae3db94e 100644 --- a/lib/deprecatedlib.php +++ b/lib/deprecatedlib.php @@ -989,8 +989,11 @@ function make_editing_buttons() { * @deprecated since 2.5 */ function print_section() { - throw new coding_exception('Function print_section() is removed. Please use core_course\output\section_format '. - ' to render a course section instead.'); + throw new coding_exception( + 'Function print_section() is removed.' . + ' Please use core_courseformat\\output\\local\\content\\section' . + ' to render a course section instead.' + ); } /**