MDL-36795 - lib / administration: maxsections now limits the default setting for numsections.
In the default course settings, setting the maximum number topics / weeks to 0 would not change the default number of sections on the same page as any other number would. A more appropriate check has been put in place. This also incorporates a fix for MDL-28584. The course edit screen now also checks to see if maxsections is set or numeric. If it is not set or numeric then it defaults to 52.
This commit is contained in:
+1
-1
@@ -3818,7 +3818,7 @@ class admin_settings_num_course_sections extends admin_setting_configselect {
|
||||
/** Lazy-load the available choices for the select box */
|
||||
public function load_choices() {
|
||||
$max = get_config('moodlecourse', 'maxsections');
|
||||
if (empty($max)) {
|
||||
if (!isset($max) || !is_numeric($max)) {
|
||||
$max = 52;
|
||||
}
|
||||
for ($i = 0; $i <= $max; $i++) {
|
||||
|
||||
Reference in New Issue
Block a user