From: moodler Date: Tue, 20 May 2003 04:26:57 +0000 (+0000) Subject: Fixed the bug I introduced in the last checkin (it was related to the X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b1f505771e20578f5252516c93b7bee9ab18bcaa;p=moodle.git Fixed the bug I introduced in the last checkin (it was related to the re-introduction of text fields in surveys) See bug 441 --- diff --git a/mod/survey/view.php b/mod/survey/view.php index cfb00d9500..8f8eba9dda 100644 --- a/mod/survey/view.php +++ b/mod/survey/view.php @@ -78,25 +78,29 @@ $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); + } } }