".COURSE_RELATION_TYPE_RRHH." AND t3.course_code = '".$_course['sysCode']."' 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 t1.user_id=t2.user_id AND t3.id_user=t2.user_id AND t3.id_session = '".$session_id."' AND t3.course_code = '".$_course['sysCode']."' 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 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 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.course_code = '".$_course['sysCode']."' AND t2.last_connection>'".$date_inter."' $extra_condition ORDER BY username"; $result=Database::query($query); $course_coachs = array(); while ($coachs = Database::fetch_array($result)) { //$course_coachs[] = $coachs['user_id']; $Users[$coachs['user_id']] = $coachs; } //if($coach = Database::fetch_array($result)) //$Users[$coach['user_id']] = $coach; } $user_id=$enreg['user_id']; include('header_frame.inc.php'); ?>
'11')).' '; else echo Display::return_icon('students.gif', get_lang('Student'), array('height' => '11'));?> name="user_" href="?&showPic=#user_"> | |