MDL-60377 webservice: Format correctly text returned by WS

This commit is contained in:
Juan Leyva
2017-10-10 15:17:12 +02:00
parent 3393db1467
commit 19bda8aa7e
+2 -1
View File
@@ -256,8 +256,9 @@ class core_course_external extends external_api {
if (!empty($cm->showdescription) or $cm->modname == 'label') {
// We want to use the external format. However from reading get_formatted_content(), $cm->content format is always FORMAT_HTML.
$options = array('noclean' => true);
list($module['description'], $descriptionformat) = external_format_text($cm->content,
FORMAT_HTML, $modcontext->id, $cm->modname, 'intro', $cm->id);
FORMAT_HTML, $modcontext->id, $cm->modname, 'intro', $cm->id, $options);
}
//url of the module