survey MDL-23324 survey form generation was assuming that subquestions would always have the same type as their parent question. this lead to data being put in the wrong columns
This commit is contained in:
+7
-5
@@ -539,11 +539,6 @@ function survey_print_multi($question) {
|
||||
$numoptions = count($options);
|
||||
|
||||
$oneanswer = ($question->type == 1 || $question->type == 2) ? true : false;
|
||||
if ($question->type == 2) {
|
||||
$P = "P";
|
||||
} else {
|
||||
$P = "";
|
||||
}
|
||||
|
||||
echo "<tr class=\"smalltext\"><th scope=\"row\">$strresponses</th>";
|
||||
echo "<th scope=\"col\" class=\"hresponse\">". get_string('notyetanswered', 'survey'). "</th>";
|
||||
@@ -567,6 +562,13 @@ function survey_print_multi($question) {
|
||||
$q->text = get_string($q->text, "survey");
|
||||
}
|
||||
|
||||
$oneanswer = ($q->type == 1 || $q->type == 2) ? true : false;
|
||||
if ($q->type == 2) {
|
||||
$P = "P";
|
||||
} else {
|
||||
$P = "";
|
||||
}
|
||||
|
||||
echo "<tr class=\"$rowclass rblock\">";
|
||||
if ($oneanswer) {
|
||||
echo "<th scope=\"row\" class=\"optioncell\">";
|
||||
|
||||
Reference in New Issue
Block a user