mirror of
https://github.com/moodle/moodle.git
synced 2025-04-19 07:25:30 +02:00
Merge branch 'MDL-29378-survey' of git://github.com/mudrd8mz/moodle
This commit is contained in:
commit
fb76f7492e
@ -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.
|
||||
|
||||
|
@ -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 "<tr class=\"smalltext\"><th scope=\"row\">$strresponses</th>";
|
||||
echo "<th scope=\"col\" class=\"hresponse\">". get_string('notyetanswered', 'survey'). "</th>";
|
||||
while (list ($key, $val) = each ($options)) {
|
||||
@ -518,28 +532,21 @@ 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));
|
||||
|
||||
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 "<tr class=\"$rowclass rblock\">";
|
||||
if ($oneanswer) {
|
||||
echo "<th scope=\"row\" class=\"optioncell\">";
|
||||
@ -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 "<th scope=\"row\" class=\"optioncell\">";
|
||||
echo "<b class=\"qnumtopcell\">$qnum</b> ";
|
||||
$qnum++;
|
||||
echo "<span class=\"preferthat smalltext\">$stripreferthat</span> ";
|
||||
echo "<span class=\"preferthat\">$stripreferthat</span> ";
|
||||
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++) {
|
||||
@ -578,7 +584,7 @@ function survey_print_multi($question) {
|
||||
echo "<tr class=\"$rowclass rblock\">";
|
||||
echo "<th scope=\"row\" class=\"optioncell\">";
|
||||
echo "<b class=\"qnumtopcell\">$qnum</b> ";
|
||||
echo "<span class=\"foundthat smalltext\">$strifoundthat</span> ";
|
||||
echo "<span class=\"foundthat\">$strifoundthat</span> ";
|
||||
echo "<span class=\"option\">$q->text</span></th>\n";
|
||||
|
||||
$default = get_accesshide($strdefault);
|
||||
|
Loading…
x
Reference in New Issue
Block a user