]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed the bug I introduced in the last checkin (it was related to the
authormoodler <moodler>
Tue, 20 May 2003 04:26:57 +0000 (04:26 +0000)
committermoodler <moodler>
Tue, 20 May 2003 04:26:57 +0000 (04:26 +0000)
re-introduction of text fields in surveys)   See bug 441

mod/survey/view.php

index cfb00d9500623c8864a5ea928d754d777cb6a6b6..8f8eba9dda5d79842ffb259b030e71d609a3e985 100644 (file)
         $question = $questions["$val"];
         $question->id = $val;
         
-        if ($question->text) {
-            $question->text = get_string($question->text, "survey");
-        }
-        if ($question->shorttext) {
-            $question->shorttext = get_string($question->shorttext, "survey");
-        }
-        if ($question->type > 0) {
+        if ($question->type >= 0) {
+
+            if ($question->text) {
+                $question->text = get_string($question->text, "survey");
+            }
+
+            if ($question->shorttext) {
+                $question->shorttext = get_string($question->shorttext, "survey");
+            }
+
             if ($question->intro) {
                 $question->intro = get_string($question->intro, "survey");
             }
+
             if ($question->options) {
                 $question->options = get_string($question->options, "survey");
             }
-        }
 
-        if ($question->multi) {
-            survey_print_multi($question);
-        } else {
-            survey_print_single($question);
+            if ($question->multi) {
+                survey_print_multi($question);
+            } else {
+                survey_print_single($question);
+            }
         }
     }