Fixing course export when a scorm in inside the course the path field should not be changed see #5182

skala
Julio Montoya 13 years ago
parent b0d272ef91
commit 195cb39232
  1. 14
      main/coursecopy/classes/CourseRestorer.class.php
  2. 2
      main/newscorm/blank.php
  3. 4
      main/newscorm/learnpath.class.php

@ -1559,14 +1559,18 @@ class CourseRestorer
$old_refs = array();
$prerequisite_ids = array();
foreach ($lp->get_items() as $index => $item) {
foreach ($lp->get_items() as $index => $item) {
// we set the ref code here and then we update in a for loop
$ref = $item['ref'];
//Dealing with path the same way as ref as some data has been put into path when it's a
//local resource
$path = self::DBUTF8escapestring($item['path']);
$path = $this->get_new_id($item['item_type'], $path);
//Dealing with path the same way as ref as some data has been put into path when it's a local resource
//Only fix the path for no scos
if ($item['item_type'] == 'sco') {
$path = self::DBUTF8escapestring($item['path']);
} else {
$path = self::DBUTF8escapestring($item['path']);
$path = $this->get_new_id($item['item_type'], $path);
}
$sql = "INSERT INTO ".$table_item." SET
c_id = ".$this->destination_course_id." ,

@ -16,7 +16,7 @@ require_once '../inc/global.inc.php';
Display::display_reduced_header();
if (isset($_GET['error'])) {
switch($_GET['error']){
switch ($_GET['error']){
case 'document_deleted':
echo '<br /><br />';
Display::display_error_message(get_lang('DocumentHasBeenDeleted'));

@ -3053,8 +3053,8 @@ class learnpath {
//prerequisites did not match
//$file = 'blank.php';
//}
// We want to use parameters if they were defined in the imsmanifest.
if ($file != 'blank.php') {
// We want to use parameters if they were defined in the imsmanifest
if (strpos($file, 'blank.php') === false) {
$file .= (strstr($file, '?') === false ? '?' : '') . $lp_item_params;
}
} else {

Loading…
Cancel
Save