]> git.mjollnir.org Git - moodle.git/commitdiff
Removed tabs from source.
authorvyshane <vyshane>
Mon, 18 Dec 2006 01:18:18 +0000 (01:18 +0000)
committervyshane <vyshane>
Mon, 18 Dec 2006 01:18:18 +0000 (01:18 +0000)
question/type/shortanswer/questiontype.php

index 114f5ab5d701a741c09fd0f2b7b8590a1998179d..f72398e3ecb68ebd7fdccc14a00e0e6788890757 100644 (file)
@@ -146,28 +146,28 @@ class question_shortanswer_qtype extends default_questiontype {
         $inputname = ' name="'.$nameprefix.'" ';
 
         $feedback = '';
-               $class = '';
-               $feedbackimg = '';
+        $class = '';
+        $feedbackimg = '';
 
         if ($options->feedback) {
             foreach($question->options->answers as $answer) {
-                               if ($this->test_response($question, $state, $answer)) {
-                                       // Answer was correct or partially correct.
-                                       if ($answer->fraction == 1) {
-                                               $class = 'correct';
-                                               $feedbackimg = '<img src="'.$CFG->pixpath.'/i/tick_green_big.gif" alt="'.get_string('correct', 'quiz').'" width="16" height="16" />';
-                                       } else {
-                                               $class = 'partiallycorrect';
-                                               $feedbackimg = '<img src="'.$CFG->pixpath.'/i/tick_amber_big.gif" alt="'.get_string('partiallycorrect', 'quiz').'" width="16" height="16" />';                                  
-                                       }
-                                       if ($answer->feedback) {
+                if ($this->test_response($question, $state, $answer)) {
+                    // Answer was correct or partially correct.
+                    if ($answer->fraction == 1) {
+                        $class = 'correct';
+                        $feedbackimg = '<img src="'.$CFG->pixpath.'/i/tick_green_big.gif" alt="'.get_string('correct', 'quiz').'" width="16" height="16" />';
+                    } else {
+                        $class = 'partiallycorrect';
+                        $feedbackimg = '<img src="'.$CFG->pixpath.'/i/tick_amber_big.gif" alt="'.get_string('partiallycorrect', 'quiz').'" width="16" height="16" />';                  
+                    }
+                    if ($answer->feedback) {
                         $feedback = format_text($answer->feedback, true, $formatoptions, $cmoptions->course);
                     }
                     break;
-                               } else {
-                                       $class = 'incorrect';
-                                       $feedbackimg = '<img src="'.$CFG->pixpath.'/i/cross_red_big.gif" alt="'.get_string('incorrect', 'quiz').'" width="16" height="16" />';
-                               }
+                } else {
+                    $class = 'incorrect';
+                    $feedbackimg = '<img src="'.$CFG->pixpath.'/i/cross_red_big.gif" alt="'.get_string('incorrect', 'quiz').'" width="16" height="16" />';
+                }
             }
         }