Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-29018 lesson module statistics: fixed statistics diplay for whole…

… the class
  • Loading branch information...
commit 55b0567707384c363f9241a091c5d65da9e04ae6 1 parent 15141ad
rwijaya rwijaya authored

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

  1. +3 3 mod/lesson/report.php
6 mod/lesson/report.php
@@ -560,7 +560,7 @@
560 560 $table->data[] = array($fontstart.get_string("question", "lesson").": <br />".$fontend.$fontstart2.$page->contents.$fontend2, " ");
561 561 $table->data[] = array($fontstart.get_string("answer", "lesson").":".$fontend, ' ');
562 562 // apply the font to each answer
563   - if (!empty($page->answerdata) && isset($page->answerdata->response)) {
  563 + if (!empty($page->answerdata)) {
564 564 foreach ($page->answerdata->answers as $answer){
565 565 $modified = array();
566 566 foreach ($answer as $single) {
@@ -569,12 +569,12 @@
569 569 }
570 570 $table->data[] = $modified;
571 571 }
572   - if ($page->answerdata->response != NULL) {
  572 + if (isset($page->answerdata->response)) {
573 573 $table->data[] = array($fontstart.get_string("response", "lesson").": <br />".$fontend.$fontstart2.format_text($page->answerdata->response,$page->answerdata->responseformat,$formattextdefoptions).$fontend2, " ");
574 574 }
575 575 $table->data[] = array($page->answerdata->score, " ");
576 576 } else {
577   - $table->data[] = array(0, " ");
  577 + $table->data[] = array(get_string('didnotanswerquestion', 'lesson'), " ");
578 578 }
579 579 echo html_writer::table($table);
580 580 }

0 comments on commit 55b0567

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