Browse Source

Allow older backup files to be restored correctly.

MOODLE_26_STABLE
Dan Marsden 11 years ago
parent
commit
effd1acc96
  1. 6
      backup/moodle2/restore_attendance_activity_task.class.php

6
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', $rules[] = new restore_decode_rule('ATTENDANCEVIEWBYIDSTUD',
'/mod/attendance/view.php?id=$1&studentid=$2', array('course_module', 'user')); '/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; return $rules;
} }

Loading…
Cancel
Save