random question: MDL-18174 Fix notice when adding a random question to a quiz.

This commit is contained in:
tjhunt 2009-02-17 06:14:54 +00:00
parent c1d9eeb920
commit 5348b899c4

View File

@ -108,6 +108,13 @@ class random_qtype extends default_questiontype {
return get_string('random', 'quiz') .' ('. $category->name .')';
}
function save_question($question, $form, $course) {
$form->name = '';
// Name is not a required field for random questions, but parent::save_question
// Assumes that it is.
return parent::save_question($question, $form, $course);
}
function save_question_options($question) {
global $DB;