Merge branch 'MDL-30639_m21' of git://github.com/rwijaya/moodle into MOODLE_21_STABLE
This commit is contained in:
@@ -177,6 +177,8 @@ class lesson_page_type_essay extends lesson_page {
|
||||
$answers = $this->get_answers();
|
||||
$formattextdefoptions = new stdClass;
|
||||
$formattextdefoptions->para = false; //I'll use it widely in this page
|
||||
$formattextdefoptions->context = $answerpage->context;
|
||||
|
||||
foreach ($answers as $answer) {
|
||||
if ($useranswer != NULL) {
|
||||
$essayinfo = unserialize($useranswer->useranswer);
|
||||
@@ -216,7 +218,7 @@ class lesson_page_type_essay extends lesson_page {
|
||||
// dont think this should ever be reached....
|
||||
$avescore = get_string("nooneansweredthisquestion", "lesson");
|
||||
}
|
||||
$answerdata->answers[] = array(s($essayinfo->answer), $avescore);
|
||||
$answerdata->answers[] = array(format_text($essayinfo->answer, $answerdata->responseformat, $formattextdefoptions), $avescore);
|
||||
$answerpage->answerdata = $answerdata;
|
||||
}
|
||||
return $answerpage;
|
||||
|
||||
@@ -32,7 +32,7 @@ $pageid = optional_param('pageid', NULL, PARAM_INT); // Lesson Page ID
|
||||
$action = optional_param('action', 'reportoverview', PARAM_ALPHA); // action to take
|
||||
$nothingtodisplay = false;
|
||||
|
||||
$cm = get_coursemodule_from_id('lesson', $id, 0, false, MUST_EXIST);;
|
||||
$cm = get_coursemodule_from_id('lesson', $id, 0, false, MUST_EXIST);
|
||||
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
|
||||
$lesson = new lesson($DB->get_record('lesson', array('id' => $cm->instance), '*', MUST_EXIST));
|
||||
|
||||
@@ -455,6 +455,7 @@ if ($action === 'delete') {
|
||||
|
||||
$answerpage->qtype = $qtypes[$page->qtype].$page->option_description_string();
|
||||
$answerpage->grayout = $page->grayout;
|
||||
$answerpage->context = $context;
|
||||
|
||||
if (empty($userid)) {
|
||||
// there is no userid, so set these vars and display stats.
|
||||
|
||||
Reference in New Issue
Block a user