diff --git a/main/admin/dashboard_add_courses_to_user.php b/main/admin/dashboard_add_courses_to_user.php index f8d8067020..cafd78e1be 100755 --- a/main/admin/dashboard_add_courses_to_user.php +++ b/main/admin/dashboard_add_courses_to_user.php @@ -36,11 +36,11 @@ $current_user_id = api_get_user_id(); // setting the name of the tool if (UserManager::is_admin($user_id)) { - $tool_name = get_lang('AssignCoursesToPlatformAdministrator'); -} else if ($user_info['status'] == SESSIONADMIN) { - $tool_name = get_lang('AssignCoursesToSessionsAdministrator'); + $tool_name = get_lang('AssignCoursesToPlatformAdministrator'); +} elseif ($user_info['status'] == SESSIONADMIN) { + $tool_name = get_lang('AssignCoursesToSessionsAdministrator'); } else { - $tool_name = get_lang('AssignCoursesToHumanResourcesManager'); + $tool_name = get_lang('AssignCoursesToHumanResourcesManager'); } $add_type = 'multiple'; @@ -74,20 +74,20 @@ function search_courses($needle, $type) if (api_is_multiple_url_enabled()) { $sql = "SELECT c.code, c.title FROM $tbl_course c - LEFT JOIN $tbl_course_rel_access_url a + LEFT JOIN $tbl_course_rel_access_url a ON (a.c_id = c.id) - WHERE - c.code LIKE '$needle%' $without_assigned_courses AND - access_url_id = ".api_get_current_access_url_id(); + WHERE + c.code LIKE '$needle%' $without_assigned_courses AND + access_url_id = ".api_get_current_access_url_id(); } else { $sql = "SELECT c.code, c.title - FROM $tbl_course c - WHERE - c.code LIKE '$needle%' - $without_assigned_courses "; + FROM $tbl_course c + WHERE + c.code LIKE '$needle%' + $without_assigned_courses "; } - $rs = Database::query($sql); + $rs = Database::query($sql); $return .= ' @@ -232,11 +232,11 @@ if (!empty($msg)) {
:
- + - - + +
@@ -268,13 +268,13 @@ if (!empty($msg)) {
: