From 699afe5bafa797a4c0845c58aacd190bb8ee5740 Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Tue, 12 Jan 2016 10:08:17 +0100 Subject: [PATCH 1/2] Fix query see BT#10692 --- main/admin/course_list.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main/admin/course_list.php b/main/admin/course_list.php index 874d535d1d..c86dc5eab4 100755 --- a/main/admin/course_list.php +++ b/main/admin/course_list.php @@ -95,13 +95,14 @@ function get_course_data($from, $number_of_items, $column, $direction) visibility AS col8, directory as col9, visual_code - FROM $course_table"; + FROM $course_table course"; if ((api_is_platform_admin() || api_is_session_admin()) && api_is_multiple_url_enabled() && api_get_current_access_url_id() != -1 ) { $access_url_rel_course_table = Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE); - $sql.= " INNER JOIN $access_url_rel_course_table url_rel_course ON (id = url_rel_course.c_id)"; + $sql.= " INNER JOIN $access_url_rel_course_table url_rel_course + ON (course.id = url_rel_course.c_id)"; } if (isset ($_GET['keyword'])) { From 7e1a62256e2da3e95b85e094bb001a2309465431 Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Tue, 12 Jan 2016 11:38:52 +0100 Subject: [PATCH 2/2] Fix url course relation --- main/admin/access_url_edit_courses_to_url.php | 7 ++++--- main/inc/lib/urlmanager.lib.php | 8 +++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/main/admin/access_url_edit_courses_to_url.php b/main/admin/access_url_edit_courses_to_url.php index 95da58fb89..1cd0f7aa95 100755 --- a/main/admin/access_url_edit_courses_to_url.php +++ b/main/admin/access_url_edit_courses_to_url.php @@ -129,7 +129,7 @@ if($ajax_search) { } $tbl_course = Database :: get_main_table(TABLE_MAIN_COURSE); - $sql="SELECT code, title + $sql="SELECT id, code, title FROM $tbl_course u ORDER BY title, code"; $result = Database::query($sql); @@ -210,7 +210,7 @@ $url_list = UrlManager::get_url_data(); - + - +