Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

…OODLE_21_STABLE
  • Loading branch information...
commit 55dae3ac866e08577ed28f8efa7dfbe59ed53fed 2 parents 9389659 + c1e850f
Eloy Lafuente (stronk7) stronk7 authored

Showing 1 changed file with 16 additions and 5 deletions. Show diff stats Hide diff stats

  1. +16 5 mod/quiz/report/statistics/report.php
21 mod/quiz/report/statistics/report.php
@@ -312,16 +312,23 @@ protected function output_individual_question_data($quiz, $question) {
312 312 // Display the various bits.
313 313 echo $OUTPUT->heading(get_string('questioninformation', 'quiz_statistics'));
314 314 echo html_writer::table($questioninfotable);
315   -
316   - echo $OUTPUT->box(format_text($question->questiontext, $question->questiontextformat,
317   - array('overflowdiv' => true)) . $actions,
318   - 'questiontext boxaligncenter generalbox boxwidthnormal mdl-align');
319   -
  315 + echo $this->render_question_text($question);
320 316 echo $OUTPUT->heading(get_string('questionstatistics', 'quiz_statistics'));
321 317 echo html_writer::table($questionstatstable);
322 318 }
323 319
324 320 /**
  321 + * @param object $question question data.
  322 + * @return string HTML of question text, ready for display.
  323 + */
  324 + protected function render_question_text($question){
  325 + global $OUTPUT;
  326 + return $OUTPUT->box(format_text($question->questiontext, $question->questiontextformat,
  327 + array('overflowdiv' => true)),
  328 + 'questiontext boxaligncenter generalbox boxwidthnormal mdl-align');
  329 + }
  330 +
  331 + /**
325 332 * Display the response analysis for a question.
326 333 * @param object $question the question to report on.
327 334 * @param moodle_url $reporturl the URL to resisplay this report.
@@ -355,6 +362,10 @@ protected function output_individual_question_response_analysis($question,
355 362
356 363 // Set up the table.
357 364 $exportclass->start_table($questiontabletitle);
  365 +
  366 + if ($this->table->is_downloading() == 'xhtml') {
  367 + echo $this->render_question_text($question);
  368 + }
358 369 }
359 370
360 371 $responesstats = new quiz_statistics_response_analyser($question);

0 comments on commit 55dae3a

Please sign in to comment.
Something went wrong with that request. Please try again.