mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
oops. fix to last commit about empty answers logic was wrong
This commit is contained in:
parent
b7d4df606e
commit
845b703bb9
1 changed files with 2 additions and 2 deletions
|
@ -176,13 +176,13 @@ class question_edit_calculated_form extends question_edit_form {
|
|||
foreach ($answers as $key => $answer){
|
||||
//check no of choices
|
||||
$trimmedanswer = trim($answer);
|
||||
if (($trimmedanswer=='')||$answercount==0){
|
||||
if (($trimmedanswer!='')||$answercount==0){
|
||||
$eqerror = qtype_calculated_find_formula_errors($trimmedanswer);
|
||||
if (FALSE !== $eqerror){
|
||||
$errors['answers['.$key.']'] = $eqerror;
|
||||
}
|
||||
}
|
||||
if ($trimmedanswer==''){
|
||||
if ($trimmedanswer!=''){
|
||||
if ('2' == $data['correctanswerformat'][$key]
|
||||
&& '0' == $data['correctanswerlength'][$key]) {
|
||||
$errors['correctanswerlength['.$key.']'] = get_string('zerosignificantfiguresnotallowed','quiz');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue