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:
committed by
David Monllao
parent
0a64999259
commit
856fa58440
+3
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user