mirror of
https://github.com/moodle/moodle.git
synced 2025-06-02 14:15:11 +02:00
MDL-62029 core_course: Site format is not a standard plugin
This commit is contained in:
parent
9eb19cdf94
commit
9fa74e9374
@ -158,13 +158,14 @@ class provider implements
|
||||
|
||||
foreach ($coursedata as $course) {
|
||||
$context = \context_course::instance($course->id);
|
||||
$courseformat = $course->format !== 'site' ? get_string('pluginname', 'format_' . $course->format) : get_string('site');
|
||||
$data = (object) [
|
||||
'fullname' => $course->fullname,
|
||||
'shortname' => $course->shortname,
|
||||
'idnumber' => $course->idnumber,
|
||||
'summary' => writer::with_context($context)->rewrite_pluginfile_urls([], 'course', 'summary', 0,
|
||||
format_string($course->summary)),
|
||||
'format' => get_string('pluginname', 'format_' . $course->format),
|
||||
'format' => $courseformat,
|
||||
'startdate' => transform::datetime($course->startdate),
|
||||
'enddate' => transform::datetime($course->enddate)
|
||||
];
|
||||
|
@ -105,7 +105,7 @@ class core_course_privacy_testcase extends \core_privacy\tests\provider_testcase
|
||||
$this->resetAfterTest();
|
||||
|
||||
// Create a course and a single module.
|
||||
$course1 = $this->getDataGenerator()->create_course(['fullname' => 'Course 1', 'shortname' => 'C1']);
|
||||
$course1 = $this->getDataGenerator()->create_course(['fullname' => 'Course 1', 'shortname' => 'C1', 'format' => 'site']);
|
||||
$context1 = context_course::instance($course1->id);
|
||||
$modassign = $this->getDataGenerator()->create_module('assign', ['course' => $course1->id, 'name' => 'assign test 1']);
|
||||
$assigncontext = context_module::instance($modassign->cmid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user