From: stronk7 Date: Fri, 14 May 2004 00:17:29 +0000 (+0000) Subject: Now wiki links to activities are decoded to its new location X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c484d58cf86cc4cb4ecc741b4aec6e12670664a0;p=moodle.git 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. --- 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 "