From ba95996cb0bad1b13efea8652aa76bfe9c41c310 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 26 Jan 2012 11:33:50 +0100 Subject: [PATCH] Fixing query due the recent changes when adding the c_id see #3910 --- main/newscorm/learnpath.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index f36d044942..566b777cd3 100644 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -7941,6 +7941,8 @@ class learnpath { */ public function scorm_export() { global $_course; + + $course_id = api_get_course_int_id(); // Remove memory and time limits as much as possible as this might be a long process... if (function_exists('ini_set')) { @@ -8327,7 +8329,7 @@ class learnpath { } $my_file_path = 'link_'.$item->get_id().'.html'; - $sql = 'SELECT url, title FROM '.Database :: get_course_table(TABLE_LINK).' WHERE id='.$item->path; + $sql = 'SELECT url, title FROM '.Database :: get_course_table(TABLE_LINK).' WHERE c_id = '.$course_id.' AND id='.$item->path; $rs = Database::query($sql); if ($link = Database :: fetch_array($rs)) { $url = $link['url'];