From 1f5d8cf36c439f3b34fc8ff9c663d3bc5d438757 Mon Sep 17 00:00:00 2001 From: Eric Marguin Date: Tue, 6 Mar 2007 17:31:46 +0100 Subject: [PATCH] [svn r11440] set the path to mp3 in fck to absolute path (example : /dokeos/courses/...) --- main/newscorm/learnpath.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index 811f1488d1..21263c54c8 100644 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -4380,6 +4380,9 @@ class learnpath { */ function edit_document($_course) { + global $_configuration; + + $dir = isset($_GET['dir']) ? $_GET['dir'] : $_POST['dir']; // please do not modify this dirname formatting if(strstr($dir, '..')) @@ -4418,8 +4421,7 @@ class learnpath { if($fp = @fopen($file, 'w')) { $content = text_filter($content); - $path_to_remove = api_get_path('WEB_COURSE_PATH') . $_course['path'] . '/document' . $dir; - $content = str_replace($path_to_remove, './', $content); + $content = str_replace(api_get_path('WEB_COURSE_PATH'), $_configuration['url_append'].'/courses/', $content); fputs($fp, $content); fclose($fp);