diff --git a/completion/tests/behat/completion_course_page_display.feature b/completion/tests/behat/completion_course_page_display.feature index cd2bc387ad2..1a45384cc7a 100644 --- a/completion/tests/behat/completion_course_page_display.feature +++ b/completion/tests/behat/completion_course_page_display.feature @@ -38,7 +38,6 @@ Feature: Show activity completion status or activity completion configuration on Scenario: Show completion status to students Given I log in as "student1" And I am on "Course 1" course homepage - Then I should see "Your progress" And the manual completion button of "Test forum name" is displayed as "Mark as done" And the "View" completion condition of "Test assignment name" is displayed as "todo" And there should be no completion information shown for "Test quiz name" @@ -46,12 +45,10 @@ Feature: Show activity completion status or activity completion configuration on Scenario: Show completion configuration to editing teachers Given I log in as "teacher1" And I am on "Course 1" course homepage - Then I should not see "Your progress" And the manual completion button for "Test forum name" should be disabled And "Test assignment name" should have the "View" completion condition And there should be no completion information shown for "Test quiz name" And I am on "Course 1" course homepage with editing mode on - And I should not see "Your progress" And the manual completion button for "Test forum name" should be disabled And "Test assignment name" should have the "View" completion condition And there should be no completion information shown for "Test quiz name" @@ -59,7 +56,6 @@ Feature: Show activity completion status or activity completion configuration on Scenario: Show completion configuration to non-editing teachers Given I log in as "teacher2" And I am on "Course 1" course homepage - Then I should not see "Your progress" And the manual completion button for "Test forum name" should be disabled And "Test assignment name" should have the "View" completion condition And there should be no completion information shown for "Test quiz name" diff --git a/course/classes/output/section_format.php b/course/classes/output/section_format.php index 6ff0f0f2c03..d57d6f2b65c 100644 --- a/course/classes/output/section_format.php +++ b/course/classes/output/section_format.php @@ -157,10 +157,6 @@ class section_format implements renderable, templatable { $cmlist = new $this->cmlistclass($format, $thissection); $data->cmlist = $cmlist->export_for_template($output); - // Section 0 could have a completion help icon. - $completioninfo = new completion_info($course); - $data->completioninfo = $completioninfo->display_help_icon(); - $header = new $this->headerclass($format, $thissection); if (empty($this->hidetitle)) { $data->header = $header->export_for_template($output); diff --git a/course/format/renderer.php b/course/format/renderer.php index 3fe14315bf8..c25b5d90b0a 100644 --- a/course/format/renderer.php +++ b/course/format/renderer.php @@ -869,9 +869,6 @@ abstract class format_section_renderer_base extends core_course_renderer { echo $startlist; echo $this->section_header($thissection, $course, true, $displaysection); - // Show completion help icon. - $completioninfo = new completion_info($course); - echo $completioninfo->display_help_icon(); echo $this->course_section_cm_list($course, $thissection, $displaysection); echo $this->course_section_add_cm_control($course, $displaysection, $displaysection); @@ -942,9 +939,6 @@ abstract class format_section_renderer_base extends core_course_renderer { $course = $format->get_course(); $context = context_course::instance($course->id); - // Title with completion help icon. - $completioninfo = new completion_info($course); - echo $completioninfo->display_help_icon(); echo $this->output->heading($pagetitle, 2, 'accesshide'); // Copy activity clipboard.. diff --git a/course/templates/local/section_format.mustache b/course/templates/local/section_format.mustache index ccb9f901454..e1e84757099 100644 --- a/course/templates/local/section_format.mustache +++ b/course/templates/local/section_format.mustache @@ -59,7 +59,6 @@ "ishidden": false, "iscurrent": true, "currentlink": "This topic", - "completioninfo": "Completion Info", "availability": { "info": "Hidden from students", "hasavailability": true @@ -91,7 +90,6 @@
{{#header}} {{> core_course/local/section_format/header }} {{/header}} - {{{completioninfo}}} {{#availability}} {{> core_course/local/section_format/availability }} {{/availability}} diff --git a/lang/en/completion.php b/lang/en/completion.php index e59d952538e..02b4793bdac 100644 --- a/lang/en/completion.php +++ b/lang/en/completion.php @@ -238,4 +238,6 @@ $string['viewingactivity'] = 'Viewing the {$a}'; $string['withconditions'] = 'With conditions'; $string['writingcompletiondata'] = 'Writing completion data'; $string['xdays'] = '{$a} days'; + +// Deprecated since Moodle 4.0. $string['yourprogress'] = 'Your progress'; diff --git a/lang/en/deprecated.txt b/lang/en/deprecated.txt index e6ea760ea2b..1d20dc3ca92 100644 --- a/lang/en/deprecated.txt +++ b/lang/en/deprecated.txt @@ -153,3 +153,4 @@ msnid,core configenableactivitychooser,core_admin enableactivitychooser,core_admin coursepreferences,core +yourprogress,core_completion diff --git a/lib/completionlib.php b/lib/completionlib.php index a5ceb2a3b3e..1a13f06c796 100644 --- a/lib/completionlib.php +++ b/lib/completionlib.php @@ -321,6 +321,8 @@ class completion_info { * @deprecated since Moodle 2.0 - Use display_help_icon instead. */ public function print_help_icon() { + debugging('The function print_help_icon() is deprecated, please do not use it anymore.', + DEBUG_DEVELOPER); print $this->display_help_icon(); } @@ -328,9 +330,12 @@ class completion_info { * Returns the 'Your progress' help icon, if completion tracking is enabled. * * @return string HTML code for help icon, or blank if not needed + * @deprecated since Moodle 4.0 - The 'Your progress' info isn't displayed any more. */ public function display_help_icon() { global $PAGE, $OUTPUT, $USER; + debugging('The function display_help_icon() is deprecated, please do not use it anymore.', + DEBUG_DEVELOPER); $result = ''; if ($this->is_enabled() && !$PAGE->user_is_editing() && $this->is_tracked_user($USER->id) && isloggedin() && !isguestuser()) { diff --git a/lib/upgrade.txt b/lib/upgrade.txt index ffe6a1aa085..27025d9c21d 100644 --- a/lib/upgrade.txt +++ b/lib/upgrade.txt @@ -22,6 +22,9 @@ information provided here is intended especially for developers. * The core/event::getLegacyEvents() function has been deprecated and should no longer be used. * Typo3 has now been removed. Use native mbstring or iconv functions. * A new index has been added on mdl_user_preferences.name. This upgrade step might take some time on big sites. +* The completion_info function display_help_icon() which returned the 'Your progress' help icon has been deprecated and + should no longer be used. +* The completion_info function print_help_icon() which has been deprecated since Moodle 2.0 should no longer be used. === 3.11 === * PHPUnit has been upgraded to 9.5 (see MDL-71036 for details).