mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 08:22:07 +02:00
Merge branch 'MDL-73084-master' of https://github.com/jleyva/moodle
This commit is contained in:
commit
42900a7550
@ -435,6 +435,7 @@ class core_enrol_external extends external_api {
|
||||
'overviewfiles' => $overviewfiles,
|
||||
'showactivitydates' => $course->showactivitydates,
|
||||
'showcompletionconditions' => $course->showcompletionconditions,
|
||||
'timemodified' => $course->timemodified,
|
||||
];
|
||||
if ($returnusercount) {
|
||||
$courseresult['enrolledusercount'] = $enrolledusercount;
|
||||
@ -483,6 +484,8 @@ class core_enrol_external extends external_api {
|
||||
'overviewfiles' => new external_files('Overview files attached to this course.', VALUE_OPTIONAL),
|
||||
'showactivitydates' => new external_value(PARAM_BOOL, 'Whether the activity dates are shown or not'),
|
||||
'showcompletionconditions' => new external_value(PARAM_BOOL, 'Whether the activity completion conditions are shown or not'),
|
||||
'timemodified' => new external_value(PARAM_INT, 'Last time course settings were updated (timestamp).',
|
||||
VALUE_OPTIONAL),
|
||||
)
|
||||
)
|
||||
);
|
||||
|
@ -546,6 +546,7 @@ class core_enrol_externallib_testcase extends externallib_advanced_testcase {
|
||||
$this->assertTrue($courseenrol['hidden']);
|
||||
$this->assertTrue($courseenrol['isfavourite']);
|
||||
$this->assertEquals(2, $courseenrol['enrolledusercount']);
|
||||
$this->assertEquals($course1->timemodified, $courseenrol['timemodified']);
|
||||
} else {
|
||||
// Check language pack. Should be empty since an incorrect one was used when creating the course.
|
||||
$this->assertEmpty($courseenrol['lang']);
|
||||
@ -559,6 +560,7 @@ class core_enrol_externallib_testcase extends externallib_advanced_testcase {
|
||||
$this->assertFalse($courseenrol['hidden']);
|
||||
$this->assertFalse($courseenrol['isfavourite']);
|
||||
$this->assertEquals(1, $courseenrol['enrolledusercount']);
|
||||
$this->assertEquals($course2->timemodified, $courseenrol['timemodified']);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@ information provided here is intended especially for developers.
|
||||
|
||||
* Final deprecation of the following webservice:
|
||||
* core_enrol_edit_user_enrolment
|
||||
* External function core_enrol_external::get_users_courses now returns the last time a course was modified (timemodified field)
|
||||
|
||||
=== 3.11 ===
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user