]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-9447 - Default grade field is redundant in embeded answer (Cloze) question. Merge...
authortjhunt <tjhunt>
Mon, 23 Apr 2007 13:55:22 +0000 (13:55 +0000)
committertjhunt <tjhunt>
Mon, 23 Apr 2007 13:55:22 +0000 (13:55 +0000)
question/question.php
question/type/multianswer/edit_multianswer_form.php

index 8632ee2caaa5b4b78b9f819cccfbf47631a656bd..9687f009f6e61b85580c6d8515e1d78ca97296f5 100644 (file)
@@ -68,7 +68,7 @@ if ($wizardnow!==''){
         $mform = $QTYPES[$question->qtype]->next_wizard_form('question.php', $question, $wizardnow);
     }
 } else {
-    $mform = $QTYPES[$question->qtype]->create_editing_form('question.php', $question, $category->course);
+    $mform = $QTYPES[$question->qtype]->create_editing_form('question.php', $question);
 }
 
 if ($mform === null) {
index fbd338745d3faa7375e97ead54482a9f54b9d513..683b3df6c76b3bce99cfadbc60f2cf2a3ffbf943 100644 (file)
@@ -19,6 +19,9 @@ class question_edit_multianswer_form extends question_edit_form {
         parent::definition();
         $mform =& $this->_form;
         $mform->addRule('questiontext', null, 'required', null, 'client');
+        
+        // Remove meaningless defaultgrade field.
+        $mform->removeElement('defaultgrade');
     }
     function set_data($question) {
         if (isset($question->id) and $question->id and $question->qtype and $question->questiontext) {