mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-56307 course: Return time updated and times updated
This commit is contained in:
parent
cebce76f61
commit
65b2669d98
13 changed files with 146 additions and 63 deletions
|
@ -1516,8 +1516,13 @@ function scorm_check_updates_since(cm_info $cm, $from, $filter = array()) {
|
|||
}
|
||||
$updates = course_check_module_updates_since($cm, $from, array('package'), $filter);
|
||||
|
||||
$updates->tracks = (object) array('updated' => false);
|
||||
$select = 'scormid = ? AND userid = ? AND timemodified > ?';
|
||||
$params = array($scorm->id, $USER->id, $from);
|
||||
$updates->tracks = $DB->count_records_select('scorm_scoes_track', $select, $params) > 0;
|
||||
$tracks = $DB->get_records_select('scorm_scoes_track', $select, $params, '', 'id');
|
||||
if (!empty($tracks)) {
|
||||
$updates->tracks->updated = true;
|
||||
$updates->tracks->itemids = array_keys($tracks);
|
||||
}
|
||||
return $updates;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue