MDL-78744 completion: Split activity_information in completion and dates
Deprecate core_course\output\activity_information class and move its code to two new classes: core_course\output\activity_completion and core_course\output\activity_dates. In this process refactor activity_completion improving readability and and also deprecate renderer_base::activity_information() and core_course_renderer::render_activity_information().
This commit is contained in:
+4
-1
@@ -306,7 +306,7 @@ class core_course_renderer extends plugin_renderer_base {
|
||||
* @deprecated since Moodle 3.11
|
||||
*/
|
||||
public function course_section_cm_completion() {
|
||||
throw new coding_exception(__FUNCTION__ . ' is deprecated. Use the activity_information output component instead.');
|
||||
throw new coding_exception(__FUNCTION__ . ' is deprecated. Use the activity_completion output component instead.');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1876,10 +1876,13 @@ class core_course_renderer extends plugin_renderer_base {
|
||||
*
|
||||
* Defer to template.
|
||||
*
|
||||
* @deprecated since Moodle 4.3 MDL-78744
|
||||
* @todo MDL-78926 This method will be deleted in Moodle 4.7
|
||||
* @param \core_course\output\activity_information $page
|
||||
* @return string html for the page
|
||||
*/
|
||||
public function render_activity_information(\core_course\output\activity_information $page) {
|
||||
debugging('render_activity_information method is deprecated.', DEBUG_DEVELOPER);
|
||||
$data = $page->export_for_template($this->output);
|
||||
return $this->output->render_from_template('core_course/activity_info', $data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user