MDL-61520 quiz: fix references for xhtml on stats report

This commit is contained in:
Simey Lameze 2018-04-10 12:17:54 +08:00
parent 2bd2660751
commit de81dc8763
2 changed files with 6 additions and 6 deletions

View File

@ -90,7 +90,7 @@ class quiz_last_responses_table extends quiz_attempts_report_table {
$summary = trim($value);
}
if ($this->is_downloading() && $this->is_downloading() != 'xhtml') {
if ($this->is_downloading() && $this->is_downloading() != 'html') {
return $summary;
}
$summary = s($summary);

View File

@ -190,7 +190,7 @@ class quiz_statistics_report extends quiz_default_report {
if ($quizstats->s()) {
$this->output_quiz_structure_analysis_table($questionstats);
if ($this->table->is_downloading() == 'xhtml' && $quizstats->s() != 0) {
if ($this->table->is_downloading() == 'html' && $quizstats->s() != 0) {
$this->output_statistics_graph($quiz->id, $qubaids);
}
@ -403,14 +403,14 @@ class quiz_statistics_report extends quiz_default_report {
$questiontabletitle = get_string('analysisnameonly', 'quiz_statistics', $a);
}
if ($this->table->is_downloading() == 'xhtml') {
if ($this->table->is_downloading() == 'html') {
$questiontabletitle = get_string('analysisofresponsesfor', 'quiz_statistics', $questiontabletitle);
}
// Set up the table.
$exportclass->start_table($questiontabletitle);
if ($this->table->is_downloading() == 'xhtml') {
if ($this->table->is_downloading() == 'html') {
echo $this->render_question_text($question);
}
}
@ -487,8 +487,8 @@ class quiz_statistics_report extends quiz_default_report {
protected function download_quiz_info_table($quizinfo) {
global $OUTPUT;
// XHTML download is a special case.
if ($this->table->is_downloading() == 'xhtml') {
// HTML download is a special case.
if ($this->table->is_downloading() == 'html') {
echo $OUTPUT->heading(get_string('quizinformation', 'quiz_statistics'), 3);
echo $this->output_quiz_info_table($quizinfo);
return;