better validation of null answers MDL-8475 merged from HEAD

This commit is contained in:
pichetp
2008-08-14 11:54:53 +00:00
parent 224ac0b90f
commit a53b72f516
@@ -126,6 +126,11 @@ class question_edit_numerical_form extends question_edit_form {
if ($data['fraction'][$key] == 1) {
$maxgrade = true;
}
} else {
if ($data['fraction'][$key] !=0 || trim($data['feedback'][$key]) != ''){
$errors["answer[$key]"] = get_string('answermustbenumberorstar', 'qtype_numerical');
$answercount++;
}
}
}
if ($answercount==0){