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...
This commit is contained in:
Juan Leyva
2020-11-27 18:10:04 +01:00
parent f34b44674f
commit 795a8ac8a0
+1 -4
View File
@@ -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'],