From 795a8ac8a0f2d29839ffb64fc4121da3291167fe Mon Sep 17 00:00:00 2001 From: Juan Leyva Date: Fri, 27 Nov 2020 18:10:04 +0100 Subject: [PATCH] MDL-70340 mod_workshop: Do not apply format to peer comments This text is not directly output to final users, it is used just in the textarea in both the site and the app. Applying format, case issues like adding glossary links etc... --- mod/workshop/classes/external.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mod/workshop/classes/external.php b/mod/workshop/classes/external.php index f3ce788dbf0..f185649bada 100644 --- a/mod/workshop/classes/external.php +++ b/mod/workshop/classes/external.php @@ -1271,10 +1271,7 @@ class mod_workshop_external extends external_api { if (!empty($formdata[$typeofdata])) { $alldata = (array) $formdata[$typeofdata]; foreach ($alldata as $key => $val) { - if (strpos($key, 'peercomment__idx_') === 0) { - // Format reviewer comment. - list($val, $format) = external_format_text($val, FORMAT_MOODLE, $context->id); - } else if (strpos($key, 'description__idx_')) { + if (strpos($key, 'description__idx_')) { // Format dimension description. $id = str_replace('description__idx_', '', $key); list($val, $format) = external_format_text($val, $alldata['dimensionid__idx_' . $id . 'format'],