From 05e23fa9a27ee100eb0c3bb0deecde190cd93155 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Mon, 3 Feb 2014 11:34:14 +0100 Subject: [PATCH] Applying fix see BT#4704 --- .../classes/CourseRestorer.class.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/main/coursecopy/classes/CourseRestorer.class.php b/main/coursecopy/classes/CourseRestorer.class.php index 44fe823a54..6fe5284f6f 100644 --- a/main/coursecopy/classes/CourseRestorer.class.php +++ b/main/coursecopy/classes/CourseRestorer.class.php @@ -226,7 +226,7 @@ class CourseRestorer } } } - } + } } /** @@ -1249,7 +1249,7 @@ class CourseRestorer 'expired_time' => (int)$quiz->expired_time, 'end_button' => (int)$quiz->end_button ); - + if ($respect_base_content) { $my_session_id = $quiz->session_id; if (!empty($quiz->session_id)) { @@ -1835,7 +1835,15 @@ class CourseRestorer Database::query($sql); $new_lp_id = Database::insert_id(); if ($lp->visibility) { - $sql = "INSERT INTO $table_tool SET c_id = ".$this->destination_course_id." , name='".self::DBUTF8escapestring($lp->name)."', link='newscorm/lp_controller.php?action=view&lp_id=$new_lp_id', image='scormbuilder.gif', visibility='1', admin='0', address='squaregrey.gif'"; + $sql = "INSERT INTO $table_tool SET + c_id = ".$this->destination_course_id." , + name = '".self::DBUTF8escapestring($lp->name)."', + link = 'newscorm/lp_controller.php?action=view&lp_id=$new_lp_id&id_session=$session_id', + image = 'scormbuilder.gif', + visibility = '1', + admin = '0', + address = 'squaregrey.gif' + "; Database::query($sql); } @@ -1979,7 +1987,7 @@ class CourseRestorer * restore works * @todo fix this crappy function */ - function restore_student_publication() + function restore_student_publication() { $work_assignment_table = Database :: get_course_table(TABLE_STUDENT_PUBLICATION_ASSIGNMENT); $work_table = Database :: get_course_table(TABLE_STUDENT_PUBLICATION); @@ -2132,7 +2140,7 @@ class CourseRestorer } } - function restore_wiki($session_id = 0) + function restore_wiki($session_id = 0) { if ($this->course->has_resources(RESOURCE_WIKI)) { // wiki table of the target course