mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
Merge branch 'MDL-67028-additional-custom-parameters' of https://github.com/cengage/moodle
This commit is contained in:
commit
76ddbf3822
@ -2074,6 +2074,18 @@ function lti_calculate_custom_parameter($value) {
|
||||
return implode(",", groups_get_user_groups($COURSE->id, $USER->id)[0]);
|
||||
case 'Context.id.history':
|
||||
return implode(",", get_course_history($COURSE));
|
||||
case 'CourseSection.timeFrame.begin':
|
||||
if (empty($COURSE->startdate)) {
|
||||
return "";
|
||||
}
|
||||
$dt = new DateTime("@$COURSE->startdate", new DateTimeZone('UTC'));
|
||||
return $dt->format(DateTime::ATOM);
|
||||
case 'CourseSection.timeFrame.end':
|
||||
if (empty($COURSE->enddate)) {
|
||||
return "";
|
||||
}
|
||||
$dt = new DateTime("@$COURSE->enddate", new DateTimeZone('UTC'));
|
||||
return $dt->format(DateTime::ATOM);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -3739,7 +3751,8 @@ function lti_get_capabilities() {
|
||||
'CourseSection.label' => 'context_label',
|
||||
'CourseSection.sourcedId' => 'lis_course_section_sourcedid',
|
||||
'CourseSection.longDescription' => '$COURSE->summary',
|
||||
'CourseSection.timeFrame.begin' => '$COURSE->startdate',
|
||||
'CourseSection.timeFrame.begin' => null,
|
||||
'CourseSection.timeFrame.end' => null,
|
||||
'ResourceLink.id' => 'resource_link_id',
|
||||
'ResourceLink.title' => 'resource_link_title',
|
||||
'ResourceLink.description' => 'resource_link_description',
|
||||
|
Loading…
x
Reference in New Issue
Block a user