@@ -56,6 +56,7 @@ function get_users($from, $limit, $column, $direction)
5656 $ active = isset ($ _GET ['active ' ]) ? $ _GET ['active ' ] : 1 ;
5757 $ keyword = isset ($ _GET ['keyword ' ]) ? Security::remove_XSS ($ _GET ['keyword ' ]) : null ;
5858 $ sleepingDays = isset ($ _GET ['sleeping_days ' ]) ? intval ($ _GET ['sleeping_days ' ]) : null ;
59+ $ sessionId = isset ($ _GET ['id_session ' ]) ? (int ) $ _GET ['id_session ' ] : 0 ;
5960
6061 $ lastConnectionDate = null ;
6162 if (!empty ($ sleepingDays )) {
@@ -111,7 +112,7 @@ function get_users($from, $limit, $column, $direction)
111112 foreach ($ students as $ student_data ) {
112113 $ student_id = $ student_data ['user_id ' ];
113114 if (isset ($ _GET ['id_session ' ])) {
114- $ courses = Tracking :: get_course_list_in_session_from_student ($ student_id , $ _GET [ ' id_session ' ] );
115+ $ courses = Tracking :: get_course_list_in_session_from_student ($ student_id , $ sessionId );
115116 }
116117
117118 $ avg_time_spent = $ avg_student_score = $ avg_student_progress = $ total_assignments = $ total_messages = 0 ;
@@ -121,8 +122,8 @@ function get_users($from, $limit, $column, $direction)
121122 $ courseInfo = api_get_course_info ($ course_code );
122123 $ courseId = $ courseInfo ['real_id ' ];
123124 if (CourseManager :: is_user_subscribed_in_course ($ student_id , $ course_code , true )) {
124- $ avg_time_spent += Tracking :: get_time_spent_on_the_course ($ student_id , $ courseId , $ _GET [ ' id_session ' ] );
125- $ my_average = Tracking :: get_avg_student_score ($ student_id , $ course_code );
125+ $ avg_time_spent += Tracking :: get_time_spent_on_the_course ($ student_id , $ courseId , $ sessionId );
126+ $ my_average = Tracking :: get_avg_student_score ($ student_id , $ course_code );
126127 if (is_numeric ($ my_average )) {
127128 $ avg_student_score += $ my_average ;
128129 }
@@ -158,7 +159,7 @@ function get_users($from, $limit, $column, $direction)
158159 $ row [] = $ string_date ;
159160
160161 if (isset ($ _GET ['id_coach ' ]) && intval ($ _GET ['id_coach ' ]) != 0 ) {
161- $ detailsLink = '<a href="myStudents.php?student= ' .$ student_id .'&id_coach= ' .$ coach_id .'&id_session= ' .$ _GET [ ' id_session ' ] .'">
162+ $ detailsLink = '<a href="myStudents.php?student= ' .$ student_id .'&id_coach= ' .$ coach_id .'&id_session= ' .$ sessionId .'">
162163 ' .Display::return_icon ('2rightarrow.png ' ).'</a> ' ;
163164 } else {
164165 $ detailsLink = '<a href="myStudents.php?student= ' .$ student_id .'">
0 commit comments