course-edit MDL-20204 Fixed recent regression get_list_of_themes returns array of themes now not strings

This commit is contained in:
Sam Hemelryk
2010-01-28 07:00:16 +00:00
parent 1e0b0415e1
commit 33c074206d
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -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
+4 -1
View File
@@ -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);
}