course-edit MDL-20204 Fixed recent regression get_list_of_themes returns array of themes now not strings
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@
|
||||
$id = optional_param('id', 0, PARAM_INT); // course id
|
||||
$categoryid = optional_param('category', 0, PARAM_INT); // course category - can be changed in edit form
|
||||
|
||||
$PAGE->set_pagelayout('base');
|
||||
$PAGE->set_pagelayout('admin');
|
||||
|
||||
/// basic access control checks
|
||||
if ($id) { // editing course
|
||||
|
||||
@@ -171,9 +171,12 @@ class course_edit_form extends moodleform {
|
||||
$mform->setDefault('maxbytes', $courseconfig->maxbytes);
|
||||
|
||||
if (!empty($CFG->allowcoursethemes)) {
|
||||
$themeobjects = get_list_of_themes();
|
||||
$themes=array();
|
||||
$themes[''] = get_string('forceno');
|
||||
$themes += get_list_of_themes();
|
||||
foreach ($themeobjects as $key=>$theme) {
|
||||
$themes[$key] = $theme->name;
|
||||
}
|
||||
$mform->addElement('select', 'theme', get_string('forcetheme'), $themes);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user