minor - fixed time inside reporting

skala
Arthur Portugal 15 years ago
parent 164c9836d1
commit e6e1d24f8e
  1. 2
      main/mySpace/myStudents.php
  2. 11
      main/mySpace/student.php

@ -918,7 +918,7 @@ if ($timezone !== null) {
$title = '';
if (empty($session_id)) {
$title = get_lang('TrainingsWithoutSessions');
$title = get_lang('Courses');
} else {
$title = ucfirst($session_name).($date_session?' ('.$date_session.')':'');
}

@ -186,11 +186,11 @@ if ($isCoach || api_is_platform_admin() || api_is_drh()) {
if (count($students) > 0) {
$table = new SortableTable('tracking_student', 'count_student_coached', null, ($is_western_name_order xor $sort_by_first_name) ? 1 : 0);
if ($is_western_name_order) {
$table -> set_header(0, get_lang('FirstName'), true, 'align="center');
$table -> set_header(1, get_lang('LastName'), true, 'align="center');
$table -> set_header(0, get_lang('FirstName'), false, 'align="center');
$table -> set_header(1, get_lang('LastName'), false, 'align="center');
} else {
$table -> set_header(0, get_lang('LastName'), true, 'align="center');
$table -> set_header(1, get_lang('FirstName'), true, 'align="center');
$table -> set_header(0, get_lang('LastName'), false, 'align="center');
$table -> set_header(1, get_lang('FirstName'), false, 'align="center');
}
$table -> set_header(2, get_lang('Time'), false);
$table -> set_header(3, get_lang('Progress'), false);
@ -240,7 +240,7 @@ if ($isCoach || api_is_platform_admin() || api_is_drh()) {
$nb_courses_student = 0;
foreach ($courses as $course_code) {
if (CourseManager :: is_user_subscribed_in_course($student_id, $course_code, true)) {
$avg_time_spent += Tracking :: get_time_spent_on_the_platform($student_id, $course_code);
$avg_time_spent += Tracking :: get_time_spent_on_the_course($student_id, $course_code, $_GET['id_session']);
$avg_student_score += Tracking :: get_avg_student_score($student_id, $course_code);
$avg_student_progress += Tracking :: get_avg_student_progress($student_id, $course_code);
$total_assignments += Tracking :: count_student_assignments($student_id, $course_code);
@ -267,6 +267,7 @@ if ($isCoach || api_is_platform_admin() || api_is_drh()) {
$row[] = $student_data['lastname'];
$row[] = $student_data['firstname'];
}
$row[] = api_time_to_hms($avg_time_spent);
$row[] = is_null($avg_student_progress) ? null : round($avg_student_progress, 2).'%';
$row[] = is_null($avg_student_score) ? null : round($avg_student_score, 2).'%';

Loading…
Cancel
Save