| @@ 836-859 (lines=24) @@ | ||
| 833 | } |
|
| 834 | ||
| 835 | //showing only the courses of the current Chamilo access_url_id |
|
| 836 | if (api_is_multiple_url_enabled()) { |
|
| 837 | $url_access_id = api_get_current_access_url_id(); |
|
| 838 | $tbl_url_rel_course = Database::get_main_table( |
|
| 839 | TABLE_MAIN_ACCESS_URL_REL_COURSE |
|
| 840 | ); |
|
| 841 | if ($category_code != "ALL") { |
|
| 842 | $sql = "SELECT * FROM $tbl_course as course |
|
| 843 | INNER JOIN $tbl_url_rel_course as url_rel_course |
|
| 844 | ON (url_rel_course.c_id = course.id) |
|
| 845 | WHERE |
|
| 846 | access_url_id = $url_access_id AND |
|
| 847 | category_code='$category_code' |
|
| 848 | $without_special_courses |
|
| 849 | $visibilityCondition |
|
| 850 | ORDER BY title $limitFilter"; |
|
| 851 | } else { |
|
| 852 | $sql = "SELECT * FROM $tbl_course as course |
|
| 853 | INNER JOIN $tbl_url_rel_course as url_rel_course |
|
| 854 | ON (url_rel_course.c_id = course.id) |
|
| 855 | WHERE |
|
| 856 | access_url_id = $url_access_id |
|
| 857 | $without_special_courses |
|
| 858 | $visibilityCondition |
|
| 859 | ORDER BY title $limitFilter"; |
|
| 860 | } |
|
| 861 | } |
|
| 862 | } |
|
| @@ 7275-7291 (lines=17) @@ | ||
| 7272 | ON (s.id_coach = u.user_id) ". |
|
| 7273 | $where; |
|
| 7274 | ||
| 7275 | if (api_is_multiple_url_enabled()) { |
|
| 7276 | $table_access_url_rel_session= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION); |
|
| 7277 | $access_url_id = api_get_current_access_url_id(); |
|
| 7278 | if ($access_url_id != -1) { |
|
| 7279 | $where.= " AND ar.access_url_id = $access_url_id "; |
|
| 7280 | $query = "$select |
|
| 7281 | FROM $tbl_session s |
|
| 7282 | LEFT JOIN $tbl_session_field_values fv ON (fv.session_id = s.id) |
|
| 7283 | LEFT JOIN $tbl_session_field_options fvo ON (fv.field_id = fvo.field_id) |
|
| 7284 | LEFT JOIN $tbl_session_rel_course src ON (src.id_session = s.id) |
|
| 7285 | LEFT JOIN $tbl_course c ON (src.c_id = c.id) |
|
| 7286 | LEFT JOIN $tbl_session_category sc ON (s.session_category_id = sc.id) |
|
| 7287 | INNER JOIN $tbl_user u ON (s.id_coach = u.user_id) |
|
| 7288 | INNER JOIN $table_access_url_rel_session ar ON (ar.session_id = s.id) |
|
| 7289 | $where"; |
|
| 7290 | } |
|
| 7291 | } |
|
| 7292 | ||
| 7293 | $query .= ") AS session_table"; |
|
| 7294 | ||