Permalink
Browse files

Merging changes for MDL-9947 from MOODLE_17_STABLE

  • Loading branch information...
1 parent b42cae4 commit e8cd2b38cc788069e6cda09432abcb28494f4638 mark-nielsen committed May 28, 2007
Showing with 9 additions and 0 deletions.
  1. +9 −0 mod/lesson/restorelib.php
@@ -812,6 +812,15 @@ function lesson_decode_content_links_caller($restore) {
}
}
+ // Remap activity links
+ if ($lessons = get_records_select('lesson', "activitylink != 0 AND course = $restore->course_id", '', 'id, activitylink')) {
+ foreach ($lessons as $lesson) {
+ if ($newcmid = backup_getid($restore->backup_unique_code, 'course_modules', $lesson->activitylink)) {
+ $status = $status and set_field('lesson', 'activitylink', $newcmid->new_id, 'id', $lesson->id);
+ }
+ }
+ }
+
return $status;
}

0 comments on commit e8cd2b3

Please sign in to comment.