From c8fa99de72bdb4b4705ea30a3d057afa247811c6 Mon Sep 17 00:00:00 2001 From: Rossiani Wijaya Date: Mon, 5 Sep 2011 11:16:33 +0800 Subject: [PATCH] MDL-29018 lesson module statistics: fixed statistics diplay for whole the class --- mod/lesson/report.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mod/lesson/report.php b/mod/lesson/report.php index 1d670c915bd..9a867e161ce 100644 --- a/mod/lesson/report.php +++ b/mod/lesson/report.php @@ -560,7 +560,7 @@ if ($action === 'delete') { $table->data[] = array($fontstart.get_string("question", "lesson").":
".$fontend.$fontstart2.$page->contents.$fontend2, " "); $table->data[] = array($fontstart.get_string("answer", "lesson").":".$fontend, ' '); // apply the font to each answer - if (!empty($page->answerdata) && isset($page->answerdata->response)) { + if (!empty($page->answerdata)) { foreach ($page->answerdata->answers as $answer){ $modified = array(); foreach ($answer as $single) { @@ -569,12 +569,12 @@ if ($action === 'delete') { } $table->data[] = $modified; } - if ($page->answerdata->response != NULL) { + if (isset($page->answerdata->response)) { $table->data[] = array($fontstart.get_string("response", "lesson").":
".$fontend.$fontstart2.format_text($page->answerdata->response,$page->answerdata->responseformat,$formattextdefoptions).$fontend2, " "); } $table->data[] = array($page->answerdata->score, " "); } else { - $table->data[] = array(0, " "); + $table->data[] = array(get_string('didnotanswerquestion', 'lesson'), " "); } echo html_writer::table($table); }