Skip to content

Commit

Permalink
Merge branch 'MDL-72169-311' of https://github.com/paulholden/moodle
Browse files Browse the repository at this point in the history
…into MOODLE_311_STABLE
  • Loading branch information
sarjona committed Sep 1, 2021
2 parents 4b63194 + 97997d1 commit f06450a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions course/classes/privacy/provider.php
Expand Up @@ -192,11 +192,17 @@ public static function export_context_data(\core_privacy\local\request\contextli
$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)
Expand Down

0 comments on commit f06450a

Please sign in to comment.