diff --git a/mod/survey/lang/en/survey.php b/mod/survey/lang/en/survey.php index a664a9cb32e..893d3ad77ed 100644 --- a/mod/survey/lang/en/survey.php +++ b/mod/survey/lang/en/survey.php @@ -98,7 +98,7 @@ $string['clicktocontinue'] = 'Click here to continue'; $string['clicktocontinuecheck'] = 'Click here to check and continue'; $string['collesaintro'] = 'The purpose of this survey is to help us understand how well the online delivery of this unit enabled you to learn. -Each one of the 24 statements below asks about your experience in this unit. +Each couple of the 24 statements below asks about your experience in this unit. There are no \'right\' or \'wrong\' answers; we are interested only in your opinion. Please be assured that your responses will be treated with a high degree of confidentiality, and will not affect your assessment. diff --git a/mod/survey/lib.php b/mod/survey/lib.php index cebafac633e..07f12aa420e 100644 --- a/mod/survey/lib.php +++ b/mod/survey/lib.php @@ -509,8 +509,22 @@ function survey_print_multi($question) { $options = explode( ",", $question->options); $numoptions = count($options); + // COLLES Actual (which is having questions of type 1) and COLLES Preferred (type 2) + // expect just one answer per question. COLLES Actual and Preferred (type 3) expects + // two answers per question. ATTLS (having a single question of type 1) expects one + // answer per question. CIQ is not using multiquestions (i.e. a question with subquestions). + // Note that the type of subquestions does not really matter, it's the type of the + // question itself that determines everything. $oneanswer = ($question->type == 1 || $question->type == 2) ? true : false; + // COLLES Preferred (having questions of type 2) will use the radio elements with the name + // like qP1, qP2 etc. COLLES Actual and ATTLS have radios like q1, q2 etc. + if ($question->type == 2) { + $P = "P"; + } else { + $P = ""; + } + echo "$strresponses"; echo "". get_string('notyetanswered', 'survey'). ""; while (list ($key, $val) = each ($options)) { @@ -518,28 +532,21 @@ 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)); foreach ($subquestions as $q) { $qnum++; - $rowclass = survey_question_rowclass($qnum); + if ($oneanswer) { + $rowclass = survey_question_rowclass($qnum); + } else { + $rowclass = survey_question_rowclass(round($qnum / 2)); + } if ($q->text) { $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 ""; if ($oneanswer) { echo ""; @@ -557,15 +564,14 @@ function survey_print_multi($question) { $checklist["q$P$q->id"] = 0; } else { - // yu : fix for MDL-7501, possibly need to use user flag as this is quite ugly. echo ""; echo "$qnum   "; $qnum++; - echo "$stripreferthat   "; + echo "$stripreferthat   "; echo "$q->text\n"; $default = get_accesshide($strdefault); - echo ''; + echo ''; for ($i=1;$i<=$numoptions;$i++) { @@ -578,7 +584,7 @@ function survey_print_multi($question) { echo ""; echo ""; echo "$qnum   "; - echo "$strifoundthat   "; + echo "$strifoundthat   "; echo "$q->text\n"; $default = get_accesshide($strdefault);