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
|
@ -661,7 +661,12 @@ function book_check_updates_since(cm_info $cm, $from, $filter = array()) {
|
|||
if (!has_capability('mod/book:viewhiddenchapters', $context)) {
|
||||
$select .= ' AND hidden = 0';
|
||||
}
|
||||
$updates->entries = $DB->count_records_select('book_chapters', $select, $params) > 0;
|
||||
$updates->entries = (object) array('updated' => false);
|
||||
$entries = $DB->get_records_select('book_chapters', $select, $params, '', 'id');
|
||||
if (!empty($entries)) {
|
||||
$updates->entries->updated = true;
|
||||
$updates->entries->itemids = array_keys($entries);
|
||||
}
|
||||
|
||||
return $updates;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue