MDL-76149 gradereport_grader: Remove studentsperpage config

This commit is contained in:
Shamim Rezaie 2022-12-12 03:06:21 +11:00
parent 14eefae721
commit ce20ad194e
7 changed files with 13 additions and 8 deletions

View file

@ -62,5 +62,10 @@ function xmldb_gradereport_grader_upgrade(int $oldversion): bool {
upgrade_plugin_savepoint(true, 2023032100, 'grade', 'gradereport_grader'); upgrade_plugin_savepoint(true, 2023032100, 'grade', 'gradereport_grader');
} }
if ($oldversion < 2023032700) {
unset_config('grade_report_studentsperpage');
upgrade_plugin_savepoint(true, 2023032700, 'gradereport', 'grader');
}
return true; return true;
} }

View file

@ -95,7 +95,6 @@ class grader_report_preferences_form extends moodleform {
// View capability is the lowest permission. Users with grade:manage or grade:edit must also have grader:view // View capability is the lowest permission. Users with grade:manage or grade:edit must also have grader:view
if (has_capability('gradereport/grader:view', $context)) { if (has_capability('gradereport/grader:view', $context)) {
$preferences['prefgeneral']['studentsperpage'] = 'text';
if (has_capability('moodle/course:viewsuspendedusers', $context)) { if (has_capability('moodle/course:viewsuspendedusers', $context)) {
$preferences['prefgeneral']['showonlyactiveenrol'] = $checkbox_default; $preferences['prefgeneral']['showonlyactiveenrol'] = $checkbox_default;
} }

View file

@ -31,10 +31,6 @@ if ($ADMIN->fulltree) {
$strreal = get_string('real', 'grades'); $strreal = get_string('real', 'grades');
$strletter = get_string('letter', 'grades'); $strletter = get_string('letter', 'grades');
/// Add settings for this module to the $settings object (it's already defined)
$settings->add(new admin_setting_configtext('grade_report_studentsperpage', get_string('studentsperpage', 'grades'),
get_string('studentsperpage_help', 'grades'), 100, PARAM_INT));
$settings->add(new admin_setting_configcheckbox('grade_report_showonlyactiveenrol', get_string('showonlyactiveenrol', 'grades'), $settings->add(new admin_setting_configcheckbox('grade_report_showonlyactiveenrol', get_string('showonlyactiveenrol', 'grades'),
get_string('showonlyactiveenrol_help', 'grades'), 1)); get_string('showonlyactiveenrol_help', 'grades'), 1));

View file

@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
$plugin->version = 2023032100; // The current plugin version (Date: YYYYMMDDXX). $plugin->version = 2023032700; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2022111800; // Requires this Moodle version. $plugin->requires = 2022111800; // Requires this Moodle version.
$plugin->component = 'gradereport_grader'; // Full name of the plugin (used for diagnostics) $plugin->component = 'gradereport_grader'; // Full name of the plugin (used for diagnostics)

View file

@ -14,6 +14,9 @@ information provided here is intended especially for developers.
* A new method grade_report::get_report_links() is created to obtain links to other grade plugins report pages. * A new method grade_report::get_report_links() is created to obtain links to other grade plugins report pages.
It loops through all installed grade report plugins and checks if callback function gradereport_*_get_report_link It loops through all installed grade report plugins and checks if callback function gradereport_*_get_report_link
is implemented in for given grade report plugin in the corresponding lib.php is implemented in for given grade report plugin in the corresponding lib.php
* The setting $CFG->grade_report_studentsperpage has been completely removed because it's not required anymore. This setting
was used to set the default number of students displayed per page in the grader report. Now the default is set to
20.
=== 3.6 === === 3.6 ===
* External function gradereport_user_external::get_grade_items now return the following information (only for course managers). * External function gradereport_user_external::get_grade_items now return the following information (only for course managers).

View file

@ -86,3 +86,5 @@ showactivityicons,core_grades
showactivityicons_help,core_grades showactivityicons_help,core_grades
showcalculations,core_grades showcalculations,core_grades
showcalculations_help,core_grades showcalculations_help,core_grades
studentsperpage,core_grades
studentsperpage_help,core_grades

View file

@ -809,8 +809,6 @@ $string['standarddeviation'] = 'Standard deviation';
$string['stats'] = 'Statistics'; $string['stats'] = 'Statistics';
$string['statslink'] = 'Stats'; $string['statslink'] = 'Stats';
$string['student'] = 'Student'; $string['student'] = 'Student';
$string['studentsperpage'] = 'Students per page';
$string['studentsperpage_help'] = 'This setting determines the number of students displayed per page in the grader report.';
$string['studentsperpagereduced'] = 'Reduced maximum students per page from {$a->originalstudentsperpage} to {$a->studentsperpage}. Consider increasing the PHP setting max_input_vars from {$a->maxinputvars}.'; $string['studentsperpagereduced'] = 'Reduced maximum students per page from {$a->originalstudentsperpage} to {$a->studentsperpage}. Consider increasing the PHP setting max_input_vars from {$a->maxinputvars}.';
$string['subcategory'] = 'Normal category'; $string['subcategory'] = 'Normal category';
$string['submissions'] = 'Submissions'; $string['submissions'] = 'Submissions';
@ -914,3 +912,5 @@ $string['showactivityicons'] = 'Show activity icons';
$string['showactivityicons_help'] = 'If enabled, activity icons are shown next to activity names.'; $string['showactivityicons_help'] = 'If enabled, activity icons are shown next to activity names.';
$string['showcalculations'] = 'Show calculations'; $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['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['studentsperpage'] = 'Students per page';
$string['studentsperpage_help'] = 'This setting determines the number of students displayed per page in the grader report.';