mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 12:45:04 +01:00
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).
This commit is contained in:
parent
7c51792932
commit
57c2052c20
@ -532,11 +532,7 @@ function survey_print_multi($question) {
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
if ($oneanswer) {
|
||||
echo "<tr><th scope=\"col\" colspan=\"7\">$question->intro</th></tr>\n";
|
||||
} else {
|
||||
echo "<tr><th scope=\"col\" colspan=\"7\">$question->intro</th></tr>\n";
|
||||
}
|
||||
echo "<tr><th scope=\"col\" colspan=\"7\">$question->intro</th></tr>\n";
|
||||
|
||||
$subquestions = $DB->get_records_list("survey_questions", "id", explode(',', $question->multi));
|
||||
|
||||
@ -575,7 +571,7 @@ function survey_print_multi($question) {
|
||||
echo "<span class=\"option\">$q->text</span></th>\n";
|
||||
|
||||
$default = get_accesshide($strdefault);
|
||||
echo '<td class="whitecell"><label for="qP'. $P.$q->id .'"><input type="radio" name="qP'.$P.$q->id. '" id="qP'. $q->id .'" value="0" checked="checked" />'.$default.'</label></td>';
|
||||
echo '<td class="whitecell"><label for="qP'.$q->id.'"><input type="radio" name="qP'.$q->id.'" id="qP'.$q->id.'" value="0" checked="checked" />'.$default.'</label></td>';
|
||||
|
||||
|
||||
for ($i=1;$i<=$numoptions;$i++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user