diff --git a/main/newscorm/learnpathList.class.php b/main/newscorm/learnpathList.class.php index 61883ac014..be916f926a 100755 --- a/main/newscorm/learnpathList.class.php +++ b/main/newscorm/learnpathList.class.php @@ -219,12 +219,12 @@ class LearnpathList * @param int $session_id Id of session * @return array List of lessons with lessons id as keys */ - public static function get_course_lessons($course_code, $session_id) + public static function get_course_lessons($course_code, $session_id) { - $tbl_course_lp = Database::get_course_table(TABLE_LP_MAIN); + $table = Database::get_course_table(TABLE_LP_MAIN); $course = api_get_course_info($course_code); // @todo AND session_id = %s ? - $sql = "SELECT * FROM $tbl_course_lp WHERE c_id = %s "; + $sql = "SELECT * FROM $table WHERE c_id = %s "; $sql_query = sprintf($sql, $course['real_id']); $result = Database::query($sql_query); diff --git a/main/newscorm/lp_build.php b/main/newscorm/lp_build.php index 8d3c62b72d..ea13249b68 100755 --- a/main/newscorm/lp_build.php +++ b/main/newscorm/lp_build.php @@ -11,22 +11,12 @@ * @package chamilo.learnpath */ -/** - * INIT SECTION -*/ - $_SESSION['whereami'] = 'lp/build'; $this_section = SECTION_COURSES; api_protect_course_script(); -/* Libraries */ - -// The main_api.lib.php, database.lib.php and display.lib.php -// libraries are included by default. - include 'learnpath_functions.inc.php'; -//include '../resourcelinker/resourcelinker.inc.php'; include 'resourcelinker.inc.php'; /* Constants and variables */ @@ -125,8 +115,8 @@ echo $_SESSION['oLP']->build_action_menu(); echo '
'; echo '
'; // Build the tree with the menu items in it. -echo $_SESSION['oLP']->return_new_tree(); -echo '
'; +echo $_SESSION['oLP']->return_new_tree(); +echo '
'; echo '
'; if (isset($is_success) && $is_success === true) { @@ -139,18 +129,18 @@ if (isset($is_success) && $is_success === true) { $gradebook = isset($_GET['gradebook']) ? Security::remove_XSS($_GET['gradebook']) : null; echo Display::page_subheader(get_lang('LearnPathAddedTitle')); - + echo ''; + + echo ''; } echo '
'; echo '';