mirror of
https://github.com/moodle/moodle.git
synced 2025-06-02 14:15:11 +02:00
MDL-60105 mod_folder: Set timemodified on change
Changes to the folder contents were not resulting in the timemodied of the folder activity being set. This prevented global search from picking up the changes.
This commit is contained in:
parent
3043fe924d
commit
41dfbb6235
@ -61,11 +61,11 @@ if ($mform->is_cancelled()) {
|
||||
|
||||
} else if ($formdata = $mform->get_data()) {
|
||||
$formdata = file_postupdate_standard_filemanager($formdata, 'files', $options, $context, 'mod_folder', 'content', 0);
|
||||
$DB->set_field('folder', 'revision', $folder->revision+1, array('id'=>$folder->id));
|
||||
|
||||
// Update the variable of the folder revision so we can pass it as an accurate snapshot later.
|
||||
$folder->timemodified = time();
|
||||
$folder->revision = $folder->revision + 1;
|
||||
|
||||
$DB->update_record('folder', $folder);
|
||||
|
||||
$params = array(
|
||||
'context' => $context,
|
||||
'objectid' => $folder->id
|
||||
|
Loading…
x
Reference in New Issue
Block a user