From c484d58cf86cc4cb4ecc741b4aec6e12670664a0 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Fri, 14 May 2004 00:17:29 +0000 Subject: [PATCH] Now wiki links to activities are decoded to its new location when restoring courses. If the link belongs to the course, it's adjusted as internal, else it's modified to link its original source. --- backup/restorelib.php | 140 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) diff --git a/backup/restorelib.php b/backup/restorelib.php index ffed41616c..48fd435e5b 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -99,11 +99,151 @@ } } } + + //Now I'm going to decode to their new location all the links in wiki texts + //having the syntax " modulename:moduleid". + echo "
  • wiki"; + $status = restore_decode_wiki_texts($restore); + echo ""; return $status; } + //This function search for some wiki texts in differenct parts of Moodle to + //decode them to their new ids. + function restore_decode_wiki_texts($restore) { + + global $CFG; + + $status = true; + + echo "