[svn r12208] fix a bug when importing a scorm content, then exporting and reimporting it

skala
Eric Marguin 18 years ago
parent 0f871ee16e
commit 253048b721
  1. 5
      main/newscorm/learnpath.class.php
  2. 3
      main/newscorm/learnpathItem.class.php

@ -6704,7 +6704,10 @@ function display_thread_form($action = 'add', $id = 0, $extra_info = '')
if(!in_array($item->type , array(TOOL_QUIZ, TOOL_FORUM, TOOL_THREAD, TOOL_LINK)))
{
//get included documents from this item
$inc_docs = $item->get_resources_from_source();
if($item->type=='sco')
$inc_docs = $item->get_resources_from_source(null,api_get_path(SYS_COURSE_PATH).api_get_course_path().'/'.'scorm/'.$this->path.'/'.$item->get_path());
else
$inc_docs = $item->get_resources_from_source();
//error_log('Dealing with document '.$item->get_file_path().', found included documents: '.print_r($inc_docs,true),0);
//give a child element <item> to the <organization> element
$my_item = $xmldoc->createElement('item');

@ -494,8 +494,9 @@ class learnpathItem{
$type = $this->get_type();
switch($type)
{
case TOOL_DOCUMENT:
case TOOL_DOCUMENT : case 'sco':
//get the document and, if HTML, open it
if(is_file($abs_path))
{
//for now, read the whole file in one go (that's gonna be a problem when the file is too big)

Loading…
Cancel
Save