MDL-22028 multichoice is now default new question type - anything is better that the horrible essay type

This commit is contained in:
Petr Skoda
2010-07-25 10:40:17 +00:00
parent 2e3ef7c25f
commit 21b8089c8b
2 changed files with 5 additions and 1 deletions
+4 -1
View File
@@ -74,7 +74,10 @@ if ($edit) {
$data = new stdClass;
$data->id = $cm->id;
$data->pageid = $pageid;
$data->qtype = $qtype;
if ($qtype) {
//TODO: the handling of form for the selection of question type is a bloody hack! (skodak)
$data->qtype = $qtype;
}
$data = file_prepare_standard_editor($data, 'contents', $editoroptions, null);
$mform->set_data($data);
$PAGE->navbar->add(get_string('addanewpage', 'lesson'), $PAGE->url);
+1
View File
@@ -48,6 +48,7 @@ class lesson_add_page_form_selection extends lesson_add_page_form_base {
$types = $this->manager->get_page_type_strings(lesson_page::TYPE_QUESTION);
asort($types);
$mform->addElement('select', 'qtype', get_string('selectaqtype', 'lesson'), $types);
$mform->setDefault('qtype', LESSON_PAGE_MULTICHOICE); // preselect the most common type
}
}