]> git.mjollnir.org Git - moodle.git/commitdiff
Fix an undefined variable notice. Merged from 1.6stable.
authortjhunt <tjhunt>
Mon, 22 May 2006 11:20:51 +0000 (11:20 +0000)
committertjhunt <tjhunt>
Mon, 22 May 2006 11:20:51 +0000 (11:20 +0000)
question/format.php

index 7125adf160e7dffd0b0459574da5840f4855de67..6191333ed7d16c3804ddb6f80cacaa947e92252c 100644 (file)
@@ -68,8 +68,8 @@ class qformat_default {
             echo "<hr /><p><b>$count</b>. ".stripslashes($question->questiontext)."</p>";
 
             // check for answer grades validity (must match fixed list of grades)
-            $fractions = $question->fraction;
-            if (!empty($fractions)) {
+            if (!empty($question->fraction)) {
+                $fractions = $question->fraction;
                 $answersvalid = true; // in case they are!
                 foreach ($fractions as $key => $fraction) {
                     $newfraction = match_grade_options($gradeoptionsfull, $fraction, $matchgrades);