diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index 9609fa8376..a38d01ec38 100644 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -3976,9 +3976,18 @@ class learnpath { $content = stripslashes(text_filter($content)); + //if flv player, change absolute paht temporarely to prevent from erasing it in the following lines + $content = str_replace('flv=h','flv=h|',$content); + $content = str_replace('flv=/','flv=/|',$content); + $path_to_remove = api_get_path('WEB_COURSE_PATH') . $_course['path'] . '/document' . $dir; $content = str_replace($path_to_remove, './', $content); + // for flv player : change back the url to absolute + $content = str_replace('flv=h|','flv=h',$content); + $content = str_replace('flv=/|','flv=/',$content); + + if(!file_exists($filepath . $filename)) { if($fp = @fopen($filepath . $filename, 'w'))