MDL-76146 gradereport_grader: Remove show show/hide icon preference

Since we move those icons to actions menu we don't need this pref.
This commit is contained in:
Ilya Tregubov
2023-02-17 11:34:09 +08:00
parent 29c220583f
commit 5eff5df97b
9 changed files with 8 additions and 12 deletions
@@ -53,7 +53,6 @@ class provider implements
// There are several user preferences (shared between different courses).
// Show/hide toggles preferences.
$items->add_user_preference('grade_report_showcalculations', 'privacy:metadata:preference:grade_report_showcalculations');
$items->add_user_preference('grade_report_showeyecons', 'privacy:metadata:preference:grade_report_showeyecons');
$items->add_user_preference('grade_report_showaverages', 'privacy:metadata:preference:grade_report_showaverages');
$items->add_user_preference('grade_report_showlocks', 'privacy:metadata:preference:grade_report_showlocks');
$items->add_user_preference('grade_report_showuserimage', 'privacy:metadata:preference:grade_report_showuserimage');
@@ -92,7 +91,6 @@ class provider implements
$transformedvalue = null;
switch ($name) {
case 'grade_report_showcalculations':
case 'grade_report_showeyecons':
case 'grade_report_showaverages':
case 'grade_report_showlocks':
case 'grade_report_showuserimage':
@@ -6,3 +6,4 @@ ajaxerror,gradereport_grader
ajaxfailedupdate,gradereport_grader
ajaxfieldchanged,gradereport_grader
ajaxchoosescale,gradereport_grader
privacy:metadata:preference:grade_report_showeyecons,gradereport_grader
@@ -40,7 +40,6 @@ $string['privacy:metadata:preference:grade_report_showactivityicons'] = 'Whether
$string['privacy:metadata:preference:grade_report_showanalysisicon'] = 'Whether to show grade analysis icon by default. If the activity module supports it, the grade analysis icon links to a page with more detailed explanation of the grade and how it was obtained.';
$string['privacy:metadata:preference:grade_report_showaverages'] = 'Whether to display an additional row with the average (mean) for each category and grade item';
$string['privacy:metadata:preference:grade_report_showcalculations'] = 'Whether a calculator icon for each grade item and category with a visual indicator that a grade item is calculated is displayed or not when editing is turned on';
$string['privacy:metadata:preference:grade_report_showeyecons'] = 'Whether to display the show/hide icon for each grade for controlling its visibility to the student';
$string['privacy:metadata:preference:grade_report_showlocks'] = 'Whether to display a lock/unlock icon for each grade for controlling if the grade can be automatically updated by the related activity when editing is turned on';
$string['privacy:metadata:preference:grade_report_shownumberofgrades'] = 'Whether to display in brackets after each average the number of grades used when calculating the average';
$string['privacy:metadata:preference:grade_report_showonlyactiveenrol'] = 'Whether to display only active enrolled users (not suspended) in gradebook report or all the enrolled users';
@@ -54,6 +53,7 @@ $string['overriddengrade'] = 'Overridden grade';
$string['cellactions'] = 'Cell actions';
// Deprecated since Moodle 4.2.
$string['privacy:metadata:preference:grade_report_showeyecons'] = 'Whether to display the show/hide icon for each grade for controlling its visibility to the student';
$string['privacy:metadata:preference:grade_report_showquickfeedback'] = 'Whether to display a feedback text input box with a dotted border for each grade, allowing the feedback for many grades to be edited at the same time';
$string['privacy:metadata:preference:grade_report_enableajax'] = 'Whether to add a layer of AJAX functionality to the grader report, simplifying and speeding up common operations';
$string['useractivityfeedback'] = '{$a} feedback';
+1 -3
View File
@@ -1657,9 +1657,7 @@ class grade_report_grader extends grade_report {
$editcalculationicon = $this->gtree->get_calculation_icon($element, $this->gpr);
}
if ($this->get_pref('showeyecons')) {
$showhideicon = $this->gtree->get_hiding_icon($element, $this->gpr);
}
$showhideicon = $this->gtree->get_hiding_icon($element, $this->gpr);
if ($this->get_pref('showlocks')) {
$lockunlockicon = $this->gtree->get_locking_icon($element, $this->gpr);
-1
View File
@@ -58,7 +58,6 @@ class grader_report_preferences_form extends moodleform {
$preferences['prefshow']['showcalculations'] = $checkbox_default;
$preferences['prefshow']['showeyecons'] = $checkbox_default;
if ($canviewhidden) {
$preferences['prefshow']['showaverages'] = $checkbox_default;
}
-3
View File
@@ -50,9 +50,6 @@ if ($ADMIN->fulltree) {
get_string('showcalculations', 'grades'),
get_string('showcalculations_help', 'grades'), 1));
$settings->add(new admin_setting_configcheckbox('grade_report_showeyecons', get_string('showeyecons', 'grades'),
get_string('showeyecons_help', 'grades'), 0));
$settings->add(new admin_setting_configcheckbox('grade_report_showaverages', get_string('showaverages', 'grades'),
get_string('showaverages_help', 'grades'), 1));
+2
View File
@@ -74,3 +74,5 @@ showquickfeedback,core_grades
showquickfeedback_help,core_grades
enableajax,core_grades
enableajax_help,core_grades
showeyecons,core_grades
showeyecons_help,core_grades
+2 -2
View File
@@ -784,8 +784,6 @@ $string['showaverages'] = 'Show column averages';
$string['showaverages_help'] = 'If enabled, the grader report will contain an additional row displaying the average (mean) for each category and grade item.';
$string['showcalculations'] = 'Show calculations';
$string['showcalculations_help'] = 'If enabled, when editing, a calculator icon is shown for each grade item and category with a visual indicator that a grade item is calculated.';
$string['showeyecons'] = 'Show show/hide icons';
$string['showeyecons_help'] = 'If enabled, when editing is turned on, a show/hide icon is shown for each grade for controlling its visibility to the student.';
$string['showgroups'] = 'Show groups';
$string['showhiddenitems'] = 'Show hidden items';
$string['showhiddenitems_help'] = 'Whether hidden grade items are hidden entirely or if the names of hidden grade items are visible to students.
@@ -909,6 +907,8 @@ $string['tabs'] = 'Tabs';
$string['combo'] = 'Tabs and drop-down menu';
// Deprecated since Moodle 4.2.
$string['showeyecons'] = 'Show show/hide icons';
$string['showeyecons_help'] = 'If enabled, when editing is turned on, a show/hide icon is shown for each grade for controlling its visibility to the student.';
$string['showquickfeedback'] = 'Show quick feedback';
$string['showquickfeedback_help'] = 'If enabled, when editing is turned on, a feedback text input box with a dotted border appears for each grade, allowing the feedback for many grades to be edited at the same time. Changes are saved and highlighted when the update button is clicked.
+1
View File
@@ -3,6 +3,7 @@ information provided here is intended especially for developers.
=== 4.2 ===
* 'Show show/hide icons' setting has been removed from grader report (link is moved to grade action menu)
* 'Enable AJAX' interface has been deprecated for grader report
* 'Quick feedback' interface has been deprecated for grader report
* \single_button constructor signature has been changed to manage more types than just primary buttons.