Merge branch 'MDL-51704-29' of git://github.com/dpalou/moodle into MOODLE_29_STABLE

This commit is contained in:
David Monllao
2016-02-01 17:21:08 +08:00
+12 -3
View File
@@ -402,7 +402,7 @@
}
}
echo "<p <p class=\"centerpara\">";
echo "<p class=\"centerpara\">";
echo $OUTPUT->user_picture($user, array('courseid'=>$course->id));
echo "</p>";
@@ -411,7 +411,7 @@
if ($showscales) {
// Print overall summary
echo "<p <p class=\"centerpara\">>";
echo "<p class=\"centerpara\">";
survey_print_graph("id=$id&amp;sid=$student&amp;type=student.png");
echo "</p>";
@@ -448,7 +448,16 @@
$table = new html_table();
$table->head = array(get_string($question->text, "survey"));
$table->align = array ("left");
$table->data[] = array(s($answer->answer1)); // no html here, just plain text
if (!empty($question->options) && $answer->answer1 > 0) {
$answers = explode(',', get_string($question->options, 'survey'));
if ($answer->answer1 <= count($answers)) {
$table->data[] = array(s($answers[$answer->answer1 - 1])); // No html here, just plain text.
} else {
$table->data[] = array(s($answer->answer1)); // No html here, just plain text.
}
} else {
$table->data[] = array(s($answer->answer1)); // No html here, just plain text.
}
echo html_writer::table($table);
echo $OUTPUT->spacer(array('height'=>30));
}