Merge branch 'wip-MDL-36795-MOODLE_23_STABLE' of git://github.com/abgreeve/moodle into MOODLE_23_STABLE
This commit is contained in:
@@ -126,7 +126,11 @@ class course_edit_form extends moodleform {
|
||||
$mform->addHelpButton('coursedisplay', 'coursedisplay');
|
||||
$mform->setDefault('coursedisplay', $courseconfig->coursedisplay);
|
||||
|
||||
for ($i = 0; $i <= $courseconfig->maxsections; $i++) {
|
||||
$max = $courseconfig->maxsections;
|
||||
if (!isset($max) || !is_numeric($max)) {
|
||||
$max = 52;
|
||||
}
|
||||
for ($i = 0; $i <= $max; $i++) {
|
||||
$sectionmenu[$i] = "$i";
|
||||
}
|
||||
$mform->addElement('select', 'numsections', get_string('numberweeks'), $sectionmenu);
|
||||
|
||||
+1
-1
@@ -3626,7 +3626,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