From 8109408b4a5aa697f4ad93838f7b2ca74e8c01c6 Mon Sep 17 00:00:00 2001 From: Jonathon Fowler Date: Wed, 28 Aug 2019 10:59:52 +1000 Subject: [PATCH] preserve filename and metadata fields on backup/restore Most obvious for instances of the module where the icon used in Moodle on the course page is derived from the filename rather than the mimetype field, e.g. MP3. The generic icon gets used instead on the restored resources. --- backup/moodle2/backup_equella_stepslib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup/moodle2/backup_equella_stepslib.php b/backup/moodle2/backup_equella_stepslib.php index 66d284a..f2a4ebe 100644 --- a/backup/moodle2/backup_equella_stepslib.php +++ b/backup/moodle2/backup_equella_stepslib.php @@ -18,7 +18,7 @@ class backup_equella_activity_structure_step extends backup_activity_structure_s protected function define_structure() { $equella = new backup_nested_element('equella', array('id'), - array('course','name','intro','introformat','timecreated','timemodified','url','mimetype','popup','activation','uuid','version','path','attachmentuuid','ltisalt') + array('course','name','intro','introformat','timecreated','timemodified','url','mimetype','popup','activation','uuid','version','path','attachmentuuid','ltisalt','filename','metadata') ); $equella->set_source_table('equella', array('id' => backup::VAR_ACTIVITYID)); $equella->annotate_files('mod_equella', 'intro', null);