Permalink
Browse files

Merge branch 'MDL-29579_21' of git://github.com/timhunt/moodle into M…

…OODLE_21_STABLE
  • Loading branch information...
2 parents 9389659 + c1e850f commit 55dae3ac866e08577ed28f8efa7dfbe59ed53fed @stronk7 stronk7 committed Dec 8, 2011
Showing with 16 additions and 5 deletions.
  1. +16 −5 mod/quiz/report/statistics/report.php
@@ -312,16 +312,23 @@ protected function output_individual_question_data($quiz, $question) {
// Display the various bits.
echo $OUTPUT->heading(get_string('questioninformation', 'quiz_statistics'));
echo html_writer::table($questioninfotable);
-
- echo $OUTPUT->box(format_text($question->questiontext, $question->questiontextformat,
- array('overflowdiv' => true)) . $actions,
- 'questiontext boxaligncenter generalbox boxwidthnormal mdl-align');
-
+ echo $this->render_question_text($question);
echo $OUTPUT->heading(get_string('questionstatistics', 'quiz_statistics'));
echo html_writer::table($questionstatstable);
}
/**
+ * @param object $question question data.
+ * @return string HTML of question text, ready for display.
+ */
+ protected function render_question_text($question){
+ global $OUTPUT;
+ return $OUTPUT->box(format_text($question->questiontext, $question->questiontextformat,
+ array('overflowdiv' => true)),
+ 'questiontext boxaligncenter generalbox boxwidthnormal mdl-align');
+ }
+
+ /**
* Display the response analysis for a question.
* @param object $question the question to report on.
* @param moodle_url $reporturl the URL to resisplay this report.
@@ -355,6 +362,10 @@ protected function output_individual_question_response_analysis($question,
// Set up the table.
$exportclass->start_table($questiontabletitle);
+
+ if ($this->table->is_downloading() == 'xhtml') {
+ echo $this->render_question_text($question);
+ }
}
$responesstats = new quiz_statistics_response_analyser($question);

0 comments on commit 55dae3a

Please sign in to comment.