MDL-71634 course: Do not show "Your progress" info any more.

This commit is contained in:
Luca Bösch 2021-05-24 10:42:44 +02:00
parent 338b60f43b
commit 9fc6c45b10
8 changed files with 11 additions and 16 deletions

View File

@ -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"

View File

@ -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);

View File

@ -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..

View File

@ -59,7 +59,6 @@
"ishidden": false,
"iscurrent": true,
"currentlink": "<span class=\"accesshide\">This topic</span>",
"completioninfo": "<span class=\"badge badge-primary\">Completion Info</span>",
"availability": {
"info": "<span class=\"badge badge-info\">Hidden from students</span>",
"hasavailability": true
@ -91,7 +90,6 @@
</div>
<div class="content">
{{#header}} {{> core_course/local/section_format/header }} {{/header}}
{{{completioninfo}}}
{{#availability}}
{{> core_course/local/section_format/availability }}
{{/availability}}

View File

@ -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';

View File

@ -153,3 +153,4 @@ msnid,core
configenableactivitychooser,core_admin
enableactivitychooser,core_admin
coursepreferences,core
yourprogress,core_completion

View File

@ -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()) {

View File

@ -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).