Skip to content

Commit

Permalink
Merge branch 'MDL-59453-33' of git://github.com/jleyva/moodle into MO…
Browse files Browse the repository at this point in the history
…ODLE_33_STABLE
  • Loading branch information
David Monllao committed Jul 25, 2017
2 parents ae5b161 + 8388f22 commit db52eda
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions mod/lesson/classes/external.php
Original file line number Diff line number Diff line change
Expand Up @@ -993,8 +993,10 @@ protected static function get_page_fields(lesson_page $page, $returncontents = f
if ($returncontents || $canmanage || (lesson_displayleftif($lesson) && $page->displayinmenublock && $page->display)) {
$pagedata->title = external_format_string($page->title, $context->id);

$options = array('noclean' => true);
list($pagedata->contents, $pagedata->contentsformat) =
external_format_text($page->contents, $page->contentsformat, $context->id, 'mod_lesson', 'page_contents', $page->id);
external_format_text($page->contents, $page->contentsformat, $context->id, 'mod_lesson', 'page_contents', $page->id,
$options);

}
return $pagedata;
Expand Down Expand Up @@ -1309,10 +1311,13 @@ public static function get_page_data($lessonid, $pageid, $password = '', $revie
$answer[$prop] = $a->{$prop};
}

$options = array('noclean' => true);
list($answer['answer'], $answer['answerformat']) =
external_format_text($a->answer, $a->answerformat, $context->id, 'mod_lesson', 'page_answers', $a->id);
external_format_text($a->answer, $a->answerformat, $context->id, 'mod_lesson', 'page_answers', $a->id,
$options);
list($answer['response'], $answer['responseformat']) =
external_format_text($a->response, $a->responseformat, $context->id, 'mod_lesson', 'page_responses', $a->id);
external_format_text($a->response, $a->responseformat, $context->id, 'mod_lesson', 'page_responses',
$a->id, $options);
}
$answers[] = $answer;
}
Expand Down

0 comments on commit db52eda

Please sign in to comment.