Skip to content

Commit

Permalink
MDL-72873 core_grades: Remove $CFG->grade_navmethod
Browse files Browse the repository at this point in the history
The $CFG->grade_navmethod setting has been removed because it is not
required anymore. This setting was used to set the type of navigation
(tabs or dropdown box) which will be used in gradebook. However, these
navigation methods are no longer used and replaced with tertiary
navigation.
  • Loading branch information
Mihail Geshoski committed Dec 15, 2021
1 parent 95b3565 commit de53412
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 21 deletions.
5 changes: 0 additions & 5 deletions admin/settings/grades.php
Expand Up @@ -56,11 +56,6 @@
'3' => '3',
'4' => '4',
'5' => '5')));
$temp->add(new admin_setting_configselect('grade_navmethod', new lang_string('navmethod', 'grades'), null,
GRADE_NAVMETHOD_TABS,
array(GRADE_NAVMETHOD_DROPDOWN => new lang_string('dropdown', 'grades'),
GRADE_NAVMETHOD_TABS => new lang_string('tabs', 'grades'),
GRADE_NAVMETHOD_COMBO => new lang_string('combo', 'grades'))));

$setting = new admin_setting_configtext('grade_export_userprofilefields',
new lang_string('gradeexportuserprofilefields', 'grades'),
Expand Down
3 changes: 3 additions & 0 deletions grade/upgrade.txt
Expand Up @@ -3,6 +3,9 @@ Information provided here is intended especially for developers.

=== 4.0 ===

* The setting $CFG->grade_navmethod setting has been completely removed because it's not required anymore. This setting
was used to set the type of navigation (tabs or dropdown box) used in gradebook which is now replaced with tertiary
navigation.
* The print_grade_plugin_selector() function has been deprecated. This function was used to generate and output the
dropdown box navigation in gradebook which is now replaced with tertiary navigation.
* The grade_print_tabs() function has been deprecated. This function was used to generate and output the tabs navigation
Expand Down
10 changes: 10 additions & 0 deletions lib/db/upgrade.php
Expand Up @@ -3189,5 +3189,15 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2021120100.01);
}

if ($oldversion < 2021121400.01) {
// The $CFG->grade_navmethod setting has been removed because it's not required anymore. This setting was used
// to set the type of navigation (tabs or dropdown box) which will be displayed in gradebook. However, these
// navigation methods are no longer used and replaced with tertiary navigation.
unset_config('grade_navmethod');

// Main savepoint reached.
upgrade_main_savepoint(true, 2021121400.01);
}

return true;
}
15 changes: 0 additions & 15 deletions lib/grade/constants.php
Expand Up @@ -239,21 +239,6 @@
*/
define('GRADE_REPORT_MEAN_GRADED', 1);

/**
* GRADE_NAVMETHOD_DROPDOWN - Display a drop down box to allow navigation within the gradebook
*/
define('GRADE_NAVMETHOD_DROPDOWN', 0);

/**
* GRADE_NAVMETHOD_TABS - Display tabs to allow navigation within the gradebook
*/
define('GRADE_NAVMETHOD_TABS', 1);

/**
* GRADE_NAVMETHOD_TABS - Display both a drop down and tabs to allow navigation within the gradebook
*/
define('GRADE_NAVMETHOD_COMBO', 2);

/**
* GRADE_MIN_MAX_FROM_GRADE_ITEM - Get the grade min/max from the grade item.
*/
Expand Down
2 changes: 1 addition & 1 deletion version.php
Expand Up @@ -29,7 +29,7 @@

defined('MOODLE_INTERNAL') || die();

$version = 2021121400.00; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2021121400.01; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.
$release = '4.0dev+ (Build: 20211214)'; // Human-friendly version name
Expand Down

0 comments on commit de53412

Please sign in to comment.