Skip to content

Commit

Permalink
MDL-43460 calendar: Decode event description links on restore
Browse files Browse the repository at this point in the history
  • Loading branch information
FMCorz committed Jan 6, 2014
1 parent bbb291b commit bc21351
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions backup/moodle2/restore_course_task.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ static public function define_decode_contents() {
$contents = array();

$contents[] = new restore_decode_content('course', 'summary');
$contents[] = new restore_decode_content('event', 'description');

return $contents;
}
Expand Down
1 change: 1 addition & 0 deletions backup/moodle2/restore_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2223,6 +2223,7 @@ public function process_calendarevents($data) {
$result = $DB->record_exists_sql($sql, $arg);
if (empty($result)) {
$newitemid = $DB->insert_record('event', $params);
$this->set_mapping('event', $oldid, $newitemid);
$this->set_mapping('event_description', $oldid, $newitemid, $restorefiles);
}

Expand Down

0 comments on commit bc21351

Please sign in to comment.