From 963c3b552d63c6b8b3f952b8e0295673e0e49d5c Mon Sep 17 00:00:00 2001 From: thepurpleblob Date: Fri, 27 Aug 2004 14:31:40 +0000 Subject: [PATCH] $courseid now sent to wiki conversion properly --- lib/weblib.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/weblib.php b/lib/weblib.php index 19d590d139..600fe1df8b 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -623,7 +623,7 @@ function format_text($text, $format=FORMAT_MOODLE, $options=NULL, $courseid=NULL break; case FORMAT_WIKI: - $text = wiki_to_html($text); + $text = wiki_to_html($text,$courseid); $text = rebuildnolinktag($text); if (!isset($options->noclean)) { $text = clean_text($text, $format); @@ -908,14 +908,14 @@ function text_to_html($text, $smiley=true, $para=true, $newlines=true) { } } -function wiki_to_html($text) { +function wiki_to_html($text,$courseid) { /// Given Wiki formatted text, make it into XHTML using external function - global $CFG, $course; + global $CFG; require_once("$CFG->libdir/wiki.php"); $wiki = new Wiki; - return $wiki->format($text); + return $wiki->format($text,$courseid); } function markdown_to_html($text) { -- 2.39.5