".COURSE_RELATION_TYPE_RRHH." AND t3.c_id = '".$course_id."' AND t2.last_connection>'".$date_inter."' $extra_condition ORDER BY username"; $result = Database::query($query); $users = Database::store_result($result); } else { // select learners $query = "SELECT DISTINCT t1.user_id,username,firstname,lastname,picture_uri FROM $tbl_user t1, $tbl_chat_connected t2, $tbl_session_course_user t3 WHERE t2.c_id = $course_id AND t1.user_id=t2.user_id AND t3.id_user=t2.user_id AND t3.id_session = '".$session_id."' AND t3.c_id = '".$course_id."' AND t2.last_connection>'".$date_inter."' $extra_condition ORDER BY username"; $result = Database::query($query); while ($learner = Database::fetch_array($result)) { $users[$learner['user_id']] = $learner; } // select session coach $query = "SELECT DISTINCT t1.user_id,username,firstname,lastname,picture_uri FROM $tbl_user t1,$tbl_chat_connected t2,$tbl_session t3 WHERE t2.c_id = $course_id AND t1.user_id=t2.user_id AND t3.id_coach=t2.user_id AND t3.id = '".$session_id."' AND t2.last_connection>'".$date_inter."' $extra_condition ORDER BY username"; $result = Database::query($query); if ($coach = Database::fetch_array($result)) { $users[$coach['user_id']] = $coach; } // select session course coach $query = "SELECT DISTINCT t1.user_id,username,firstname,lastname,picture_uri FROM $tbl_user t1,$tbl_chat_connected t2,$tbl_session_course_user t3 WHERE t2.c_id = $course_id AND t1.user_id=t2.user_id AND t3.id_user=t2.user_id AND t3.status=2 AND t3.id_session = '".$session_id."' AND t3.c_id = '".api_get_course_int_id()."' AND t2.last_connection>'".$date_inter."' $extra_condition ORDER BY username"; $result = Database::query($query); $course_coaches = array(); while ($coaches = Database::fetch_array($result)) { //$course_coaches[] = $coaches['user_id']; $users[$coaches['user_id']] = $coaches; } //if ($coach = Database::fetch_array($result)) // $users[$coach['user_id']] = $coach; } $user_id = $enreg['user_id']; require 'header_frame.inc.php'; ?>
'11')).' '; else echo Display::return_icon('students.gif', get_lang('Student'), array('height' => '11')); ?> name="user_" href="?&showPic=#user_">