Merge branch 'wip-MDL-36795-MOODLE_23_STABLE' of git://github.com/abgreeve/moodle into MOODLE_23_STABLE

This commit is contained in:
Sam Hemelryk
2012-11-27 11:21:55 +13:00
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -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
View File
@@ -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++) {