MDL-63591 assignfeedback_comments: fix privacy provider file URLs

This commit is contained in:
Mark Nelson
2018-11-21 14:38:13 +08:00
parent 0225ad42ea
commit 4f95f92edc
@@ -107,18 +107,18 @@ class provider implements
$gradeid = $exportdata->get_pluginobject()->id;
$comments = $plugin->get_feedback_comments($gradeid);
if ($comments && !empty($comments->commenttext)) {
$currentpath = array_merge(
$exportdata->get_subcontext(),
[get_string('privacy:commentpath', 'assignfeedback_comments')]
);
$comments->commenttext = writer::with_context($assign->get_context())->rewrite_pluginfile_urls(
[],
$currentpath,
ASSIGNFEEDBACK_COMMENTS_COMPONENT,
ASSIGNFEEDBACK_COMMENTS_FILEAREA,
$gradeid,
$comments->commenttext
);
$currentpath = array_merge(
$exportdata->get_subcontext(),
[get_string('privacy:commentpath', 'assignfeedback_comments')]
);
$data = (object)
[
'commenttext' => format_text($comments->commenttext, $comments->commentformat,