From 57c2052c20388e178bf0b548f90628de857bccb5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20Mudr=C3=A1k?= Date: Thu, 5 Sep 2013 00:01:42 +0200 Subject: [PATCH] MDL-29378 Code cleanup in the Survey module While working on the issue, I spotted these two places that were worth of fixing. The first one is a trivial reminiscence of a previous refactoring, after which both branches of the if() statement became equal. The second one is actually a typo as in theory it could generate unexpected input fields with the name like qPP1. Luckily this never happened due to the way how survey questions are hardcoded (there are no questions with the type 2 that would require two answers to their subquestions). --- mod/survey/lib.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/mod/survey/lib.php b/mod/survey/lib.php index 6477e77276e..435ebf832c6 100644 --- a/mod/survey/lib.php +++ b/mod/survey/lib.php @@ -532,11 +532,7 @@ function survey_print_multi($question) { } echo "\n"; - if ($oneanswer) { - echo "$question->intro\n"; - } else { - echo "$question->intro\n"; - } + echo "$question->intro\n"; $subquestions = $DB->get_records_list("survey_questions", "id", explode(',', $question->multi)); @@ -575,7 +571,7 @@ function survey_print_multi($question) { echo "$q->text\n"; $default = get_accesshide($strdefault); - echo ''; + echo ''; for ($i=1;$i<=$numoptions;$i++) { -- 2.43.0