Permalink
Browse files

Merge branch 'MDL-29018_m20' of git://github.com/rwijaya/moodle into …

…MOODLE_20_STABLE
  • Loading branch information...
2 parents 2c90eef + 55b0567 commit f364f5628f7c28724b853be62a9d888c252e309c Sam Hemelryk committed Sep 5, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 mod/lesson/report.php
@@ -560,7 +560,7 @@
$table->data[] = array($fontstart.get_string("question", "lesson").": <br />".$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 @@
}
$table->data[] = $modified;
}
- if ($page->answerdata->response != NULL) {
+ if (isset($page->answerdata->response)) {
$table->data[] = array($fontstart.get_string("response", "lesson").": <br />".$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);
}

0 comments on commit f364f56

Please sign in to comment.