[svn r19512] FS#3972 - Fixed Windows-related bugs preventing creation of SCORM packages from presentations, reported in the Dokeos forums by irvienhooi.

skala
Ivan Tcholakov 16 years ago
parent 10d471a963
commit 468c8ec77e
  1. 1
      documentation/changelog.html
  2. 1
      main/newscorm/learnpath.class.php
  3. 18
      main/newscorm/openoffice_presentation.class.php

@ -179,6 +179,7 @@
<li>Fixed bug with user image not showing in upgrade from previous versions</li>
<li>Fixed bugs causing wrong attempts to translate some icons on course homepage when the server is in testing mode (FS#3285)</li>
<li>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</li>
<li>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</li>
</ul>
<br />
<h3>CSS changes</h3>

@ -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

@ -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,
'<html>
<head></head>
<body>
<img src="'.api_get_path(REL_COURSE_PATH).$_course['path'].'/document/'.$this->created_dir.'/'.utf8_encode($file_name).'" />
</body>
</html>');
'<html>
<head>
</head>
<body>
<img src="'.$slide_src.'" />
</body>
</html>'); // 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){

Loading…
Cancel
Save