MDL-75058 course: Fix support for dates on WebServices
This commit is contained in:
@@ -50,6 +50,7 @@ class dates extends activity_dates {
|
||||
if ($timeopen) {
|
||||
$openlabelid = $timeopen > $now ? 'activitydate:opens' : 'activitydate:opened';
|
||||
$dates[] = [
|
||||
'dataid' => 'timeopen',
|
||||
'label' => get_string($openlabelid, 'course'),
|
||||
'timestamp' => (int) $timeopen,
|
||||
];
|
||||
@@ -58,6 +59,7 @@ class dates extends activity_dates {
|
||||
if ($timeclose) {
|
||||
$closelabelid = $timeclose > $now ? 'activitydate:closes' : 'activitydate:closed';
|
||||
$dates[] = [
|
||||
'dataid' => 'timeclose',
|
||||
'label' => get_string($closelabelid, 'course'),
|
||||
'timestamp' => (int) $timeclose,
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user