mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'wip-MDL-36795-master' of git://github.com/abgreeve/moodle
This commit is contained in:
commit
a28e3a6007
@ -213,8 +213,12 @@ class format_topics extends format_base {
|
||||
}
|
||||
if ($foreditform && !isset($courseformatoptions['coursedisplay']['label'])) {
|
||||
$courseconfig = get_config('moodlecourse');
|
||||
$max = $courseconfig->maxsections;
|
||||
if (!isset($max) || !is_numeric($max)) {
|
||||
$max = 52;
|
||||
}
|
||||
$sectionmenu = array();
|
||||
for ($i = 0; $i <= $courseconfig->maxsections; $i++) {
|
||||
for ($i = 0; $i <= $max; $i++) {
|
||||
$sectionmenu[$i] = "$i";
|
||||
}
|
||||
$courseformatoptionsedit = array(
|
||||
|
@ -219,7 +219,11 @@ class format_weeks extends format_base {
|
||||
if ($foreditform && !isset($courseformatoptions['coursedisplay']['label'])) {
|
||||
$courseconfig = get_config('moodlecourse');
|
||||
$sectionmenu = array();
|
||||
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";
|
||||
}
|
||||
$courseformatoptionsedit = array(
|
||||
|
@ -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++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user