From 468c8ec77edbc444446b51e1d2e6ec8aa8a3c2cc Mon Sep 17 00:00:00 2001 From: Ivan Tcholakov Date: Thu, 2 Apr 2009 21:13:29 +0200 Subject: [PATCH] [svn r19512] FS#3972 - Fixed Windows-related bugs preventing creation of SCORM packages from presentations, reported in the Dokeos forums by irvienhooi. --- documentation/changelog.html | 1 + main/newscorm/learnpath.class.php | 1 + .../newscorm/openoffice_presentation.class.php | 18 +++++++++++------- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/documentation/changelog.html b/documentation/changelog.html index 408145c48b..8aa7bd35c0 100644 --- a/documentation/changelog.html +++ b/documentation/changelog.html @@ -179,6 +179,7 @@
  • Fixed bug with user image not showing in upgrade from previous versions
  • Fixed bugs causing wrong attempts to translate some icons on course homepage when the server is in testing mode (FS#3285)
  • A fix for the Oogie converter to work on Windows OS has been applied. Initial code has been proposed in the Dokeos forums by Øyvind Johansen (oyvind) and wilbrod - see FS#3969
  • +
  • Fixed Windows-related bugs preventing creation of SCORM packages from presentations, see FS#3972. The problem has been reported in the Dokeos forums by irvienhooi

  • CSS changes

    diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index b11fcea44d..2ecb75069b 100644 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -8191,6 +8191,7 @@ class learnpath { } //$file_path = realpath(api_get_path(SYS_PATH).$doc_info[0]); $file_path = realpath(api_get_path(SYS_PATH).$abs_img_path_without_subdir); + $file_path = str_replace('\\','/',$file_path); $file_path = str_replace('//','/',$file_path); //error_log(__LINE__.'Abs path: '.$file_path,0); //prepare the current directory path (until just under 'document') with a trailing slash diff --git a/main/newscorm/openoffice_presentation.class.php b/main/newscorm/openoffice_presentation.class.php index a0557a5026..d46784d518 100644 --- a/main/newscorm/openoffice_presentation.class.php +++ b/main/newscorm/openoffice_presentation.class.php @@ -100,14 +100,18 @@ class OpenofficePresentation extends OpenofficeDocument { // create an html file $html_file = $file_name.'.html'; $fp = fopen($this->base_work_dir.$this->created_dir.'/'.$html_file, 'w+'); - + + $slide_src = api_get_path(REL_COURSE_PATH).$_course['path'].'/document/'.$this->created_dir.'/'.utf8_encode($file_name); + $slide_src = str_replace('//', '/', $slide_src); fwrite($fp, - ' - - - - - '); +' + + + + + +'); // This indentation is to make the generated html files to look well. + fclose($fp); $document_id = add_document($_course,$this->created_dir.'/'.urlencode($html_file),'file',filesize($this->base_work_dir.$this->created_dir.'/'.$html_file),$slide_name); if ($document_id){