0 ) { array_map('intval', $idChecked); $idChecked = implode(',',$idChecked); } if (!empty($idChecked)) { Database::query("DELETE FROM $tbl_session_rel_course_rel_user WHERE id_session='$id_session' AND course_code='".$course_code."' AND id_user IN($idChecked)"); $nbr_affected_rows = Database::affected_rows(); Database::query("UPDATE $tbl_session_rel_course SET nbr_users=nbr_users-$nbr_affected_rows WHERE id_session='$id_session' AND course_code='".$course_code."'"); } header('Location: '.api_get_self().'?id_session='.$id_session.'&course_code='.urlencode($course_code).'&sort='.$sort); exit(); break; case 'add': SessionManager::subscribe_users_to_session_course($idChecked, $id_session, $course_code); header('Location: '.api_get_self().'?id_session='.$id_session.'&course_code='.urlencode($course_code).'&sort='.$sort); exit; break; } $limit = 20; $from = $page * $limit; $is_western_name_order = api_is_western_name_order(); //scru.status<>2 scru.course_code='".$course_code."' $sql = "SELECT DISTINCT u.user_id,".($is_western_name_order ? 'u.firstname, u.lastname' : 'u.lastname, u.firstname').", u.username, scru.id_user as is_subscribed FROM $tbl_session_rel_user s INNER JOIN $tbl_user u ON (u.user_id=s.id_user) LEFT JOIN $tbl_session_rel_course_rel_user scru ON (u.user_id=scru.id_user AND scru.course_code = '".$course_code."' ) WHERE s.id_session='$id_session' ORDER BY $sort $direction LIMIT $from,".($limit+1); if ($direction == 'desc') { $direction = 'asc'; } else { $direction = 'desc'; } $result = Database::query($sql); $Users = Database::store_result($result); $nbr_results = sizeof($Users); $tool_name = get_lang('Session').': '.$session_name.' - '.get_lang('Course').': '.$course_title; $interbreadcrumb[] = array("url" => "index.php","name" => get_lang('PlatformAdmin')); $interbreadcrumb[] = array("url" => "session_list.php","name" => get_lang('SessionList')); $interbreadcrumb[] = array('url' => "resume_session.php?id_session=".$id_session,"name" => get_lang('SessionOverview')); //$interbreadcrumb[]=array("url" => "session_course_list.php?id_session=$id_session","name" => get_lang('ListOfCoursesOfSession')." "".api_htmlentities($session_name,ENT_QUOTES,$charset)."""); Display::display_header($tool_name); echo Display::page_header($tool_name); ?>
| $limit) { ?>

$enreg) { if ($key == $limit) { break; } ?>
 

| $limit) { ?>