Skip to content
Permalink
Browse files

oops. fix to last commit about empty answers logic was wrong

  • Loading branch information
jamiesensei
jamiesensei committed Jan 19, 2007
1 parent b7d4df6 commit 845b703bb9a45046008208cbf450c304bf097ed1
Showing with 2 additions and 2 deletions.
  1. +2 −2 question/type/calculated/edit_calculated_form.php
@@ -176,13 +176,13 @@ function validation($data){
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');

0 comments on commit 845b703

Please sign in to comment.
You can’t perform that action at this time.