Skip to content

Commit

Permalink
MDL-76146 gradereport_grader: Remove show show/hide icon preference
Browse files Browse the repository at this point in the history
Since we move those icons to actions menu we don't need this pref.
  • Loading branch information
ilyatregubov committed Feb 17, 2023
1 parent 29c2205 commit 5eff5df
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 12 deletions.
2 changes: 0 additions & 2 deletions grade/report/grader/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public static function get_metadata(collection $items) : collection {
// 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');
Expand Down Expand Up @@ -92,7 +91,6 @@ public static function export_user_preferences(int $userid) {
$transformedvalue = null;
switch ($name) {
case 'grade_report_showcalculations':
case 'grade_report_showeyecons':
case 'grade_report_showaverages':
case 'grade_report_showlocks':
case 'grade_report_showuserimage':
Expand Down
1 change: 1 addition & 0 deletions grade/report/grader/lang/en/deprecated.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ ajaxerror,gradereport_grader
ajaxfailedupdate,gradereport_grader
ajaxfieldchanged,gradereport_grader
ajaxchoosescale,gradereport_grader
privacy:metadata:preference:grade_report_showeyecons,gradereport_grader
2 changes: 1 addition & 1 deletion grade/report/grader/lang/en/gradereport_grader.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
$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';
Expand All @@ -54,6 +53,7 @@
$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';
Expand Down
4 changes: 1 addition & 3 deletions grade/report/grader/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1657,9 +1657,7 @@ protected function get_icons($element) {
$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);
Expand Down
1 change: 0 additions & 1 deletion grade/report/grader/preferences_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ function definition() {

$preferences['prefshow']['showcalculations'] = $checkbox_default;

$preferences['prefshow']['showeyecons'] = $checkbox_default;
if ($canviewhidden) {
$preferences['prefshow']['showaverages'] = $checkbox_default;
}
Expand Down
3 changes: 0 additions & 3 deletions grade/report/grader/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@
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));

Expand Down
2 changes: 2 additions & 0 deletions lang/en/deprecated.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions lang/en/grades.php
Original file line number Diff line number Diff line change
Expand Up @@ -784,8 +784,6 @@
$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.
Expand Down Expand Up @@ -909,6 +907,8 @@
$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.
Expand Down
1 change: 1 addition & 0 deletions lib/upgrade.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 5eff5df

Please sign in to comment.