MDL-9447 - Default grade field is redundant in embeded answer (Cloze) question. Merged from MOODLE_18_STABLE.

This commit is contained in:
tjhunt
2007-04-23 13:55:22 +00:00
parent 5834dcdb1d
commit fe6480283c
2 changed files with 4 additions and 1 deletions
+1 -1
View 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) {
@@ -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) {