MDL-65026 course: Fix modules intro formatting in WS

The Web Service seems to be doing excessive text cleaning.
This commit is contained in:
Juan Leyva
2019-09-16 13:04:26 +02:00
parent 1c3efe48f8
commit dfd4881589
23 changed files with 55 additions and 32 deletions
+2 -1
View File
@@ -549,8 +549,9 @@ class mod_chat_external extends external_api {
$chatdetails['course'] = $chat->course;
$chatdetails['name'] = external_format_string($chat->name, $chatcontext->id);
// Format intro.
$options = array('noclean' => true);
list($chatdetails['intro'], $chatdetails['introformat']) =
external_format_text($chat->intro, $chat->introformat, $chatcontext->id, 'mod_chat', 'intro', null);
external_format_text($chat->intro, $chat->introformat, $chatcontext->id, 'mod_chat', 'intro', null, $options);
$chatdetails['introfiles'] = external_util::get_area_files($chatcontext->id, 'mod_chat', 'intro', false, false);
if (has_capability('mod/chat:chat', $chatcontext)) {