mirror of
https://github.com/moodle/moodle.git
synced 2025-01-29 19:50:14 +01:00
Merge branch 'MDL-67246-master' of git://github.com/jleyva/moodle
This commit is contained in:
commit
ff175fce22
@ -299,6 +299,13 @@ class api {
|
||||
$settings->calendar_maxevents = $CFG->calendar_maxevents;
|
||||
}
|
||||
|
||||
if (empty($section) or $section == 'coursecolors') {
|
||||
$colornumbers = range(1, 10);
|
||||
foreach ($colornumbers as $number) {
|
||||
$settings->{'core_admin_coursecolor' . $number} = get_config('core_admin', 'coursecolor' . $number);
|
||||
}
|
||||
}
|
||||
|
||||
return $settings;
|
||||
}
|
||||
|
||||
|
@ -222,6 +222,13 @@ class tool_mobile_external_testcase extends externallib_advanced_testcase {
|
||||
array('name' => 'calendar_lookahead', 'value' => $CFG->calendar_lookahead),
|
||||
array('name' => 'calendar_maxevents', 'value' => $CFG->calendar_maxevents),
|
||||
);
|
||||
$colornumbers = range(1, 10);
|
||||
foreach ($colornumbers as $number) {
|
||||
$expected[] = [
|
||||
'name' => 'core_admin_coursecolor' . $number,
|
||||
'value' => get_config('core_admin', 'coursecolor' . $number)
|
||||
];
|
||||
}
|
||||
$this->assertCount(0, $result['warnings']);
|
||||
$this->assertEquals($expected, $result['settings']);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user