From 4040de39c7d17110abf7006189e0799bfe546b57 Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Tue, 22 Jul 2014 14:40:16 +1200 Subject: [PATCH] Allow older backup files to be restored correctly. --- backup/moodle2/restore_attendance_activity_task.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backup/moodle2/restore_attendance_activity_task.class.php b/backup/moodle2/restore_attendance_activity_task.class.php index 629cecd..989557b 100644 --- a/backup/moodle2/restore_attendance_activity_task.class.php +++ b/backup/moodle2/restore_attendance_activity_task.class.php @@ -72,6 +72,12 @@ class restore_attendance_activity_task extends restore_activity_task { $rules[] = new restore_decode_rule('ATTENDANCEVIEWBYIDSTUD', '/mod/attendance/view.php?id=$1&studentid=$2', array('course_module', 'user')); + // Older style backups using previous plugin name + $rules[] = new restore_decode_rule('ATTFORBLOCKVIEWBYID', + '/mod/attendance/view.php?id=$1', 'course_module'); + $rules[] = new restore_decode_rule('ATTFORBLOCKVIEWBYIDSTUD', + '/mod/attendance/view.php?id=$1&studentid=$2', array('course_module', 'user')); + return $rules; }