mirror of
https://github.com/moodle/moodle.git
synced 2025-01-29 19:50:14 +01:00
MDL-72169 privacy: format course name/summary during export.
This commit is contained in:
parent
206023c15f
commit
69d3e67189
@ -192,11 +192,17 @@ class provider implements
|
||||
$context = \context_course::instance($course->id);
|
||||
$courseformat = $course->format !== 'site' ? get_string('pluginname', 'format_' . $course->format) : get_string('site');
|
||||
$data = (object) [
|
||||
'fullname' => $course->fullname,
|
||||
'fullname' => format_string($course->fullname, true, ['context' => $context]),
|
||||
'shortname' => $course->shortname,
|
||||
'idnumber' => $course->idnumber,
|
||||
'summary' => writer::with_context($context)->rewrite_pluginfile_urls([], 'course', 'summary', 0,
|
||||
format_string($course->summary)),
|
||||
'summary' => format_text(
|
||||
writer::with_context($context)->rewrite_pluginfile_urls(
|
||||
[],
|
||||
'course',
|
||||
'summary',
|
||||
0,
|
||||
$course->summary
|
||||
), $course->summaryformat, ['context' => $context]),
|
||||
'format' => $courseformat,
|
||||
'startdate' => transform::datetime($course->startdate),
|
||||
'enddate' => transform::datetime($course->enddate)
|
||||
|
Loading…
x
Reference in New Issue
Block a user