diff --git a/main/auth/profile.php b/main/auth/profile.php index 710c7f6f43..b03629b27b 100644 --- a/main/auth/profile.php +++ b/main/auth/profile.php @@ -1,5 +1,5 @@ '; $form->display(); -echo '
- '.get_lang('MyStats').' - | '.get_lang('MyCourses').'
'; - Display :: display_footer(); ?> \ No newline at end of file diff --git a/main/mySpace/index.php b/main/mySpace/index.php index 0874157cb3..a911ce6cca 100644 --- a/main/mySpace/index.php +++ b/main/mySpace/index.php @@ -126,7 +126,7 @@ if($isCoach) $avgResultsToExercises = $avgResultsToExercises/$nbStudents; // average courses by student - $avgCoursesPerStudent = round($totalCourses / $nbStudents,1); + $avgCoursesPerStudent = round($totalCourses / $nbStudents,2); // average time spent on the platform $avgTimeSpent = $totalTimeSpent / $nbStudents; @@ -190,7 +190,7 @@ if($isCoach) '.get_lang('AverageProgressInLearnpath').' - '.round($avgTotalProgress,1).' % + '.round($avgTotalProgress,2).' % @@ -198,7 +198,7 @@ if($isCoach) '.get_lang('AverageResultsToTheExercices').' - '.round($avgResultsToExercises,1).' % + '.round($avgResultsToExercises,2).' % @@ -206,7 +206,7 @@ if($isCoach) '.get_lang('AveragePostsInForum').' - '.round($nb_posts,1).' + '.round($nb_posts,2).' @@ -214,7 +214,7 @@ if($isCoach) '.get_lang('AverageAssignments').' - '.round($nb_assignments,1).' + '.round($nb_assignments,2).' @@ -257,7 +257,7 @@ if($isCoach) } $a_courses = array_merge($a_courses, Tracking::get_courses_list_from_session($a_session['id'])); } - $nb_courses_per_session = round(count($a_courses)/$nbSessions,1); + $nb_courses_per_session = round(count($a_courses)/$nbSessions,2); //csv part @@ -267,7 +267,7 @@ if($isCoach) $csv_content[] = array( get_lang('NbActiveSessions').';'.$nb_sessions_current); $csv_content[] = array( get_lang('NbPastSessions').';'.$nb_sessions_past); $csv_content[] = array( get_lang('NbFutureSessions').';'.$nb_sessions_future); - $csv_content[] = array( get_lang('NbStudentPerSession').';'.round($nbStudents/$nbSessions,1)); + $csv_content[] = array( get_lang('NbStudentPerSession').';'.round($nbStudents/$nbSessions,2)); $csv_content[] = array( get_lang('NbCoursesPerSession').';'.$nb_courses_per_session); $csv_content[] = array(); } @@ -310,7 +310,7 @@ if($isCoach) '.get_lang('NbStudentPerSession').' - '.round($nbStudents/$nbSessions,1).' + '.round($nbStudents/$nbSessions,2).' @@ -417,10 +417,10 @@ if($nb_teacher_courses) if($nb_students_in_course>0) { $avg_time_spent_in_course = api_time_to_hms($avg_time_spent_in_course / $nb_students_in_course); - $avg_progress_in_course = round($avg_progress_in_course / $nb_students_in_course,1).' %'; - $avg_score_in_course = round($avg_score_in_course / $nb_students_in_course,1).' %'; - $avg_messages_in_course = round($avg_messages_in_course / $nb_students_in_course,1); - $avg_assignments_in_course = round($avg_assignments_in_course / $nb_students_in_course,1); + $avg_progress_in_course = round($avg_progress_in_course / $nb_students_in_course,2).' %'; + $avg_score_in_course = round($avg_score_in_course / $nb_students_in_course,2).' %'; + $avg_messages_in_course = round($avg_messages_in_course / $nb_students_in_course,2); + $avg_assignments_in_course = round($avg_assignments_in_course / $nb_students_in_course,2); } $table_row = array(); @@ -443,7 +443,7 @@ if($nb_teacher_courses) $avg_assignments_in_course, ); - $table -> addRow($table_row, 'align="right"'); + $table -> addRow($table_row, 'align="left"'); } $table -> setColAttributes(7,array('align'=>'center')); diff --git a/main/mySpace/myStudents.php b/main/mySpace/myStudents.php index eac047d0d2..4a20fd3901 100644 --- a/main/mySpace/myStudents.php +++ b/main/mySpace/myStudents.php @@ -184,9 +184,12 @@ if(!empty($_GET['student'])) $avg_student_score += Tracking :: get_avg_student_score($a_infosUser['user_id'],$course_code); } } - $avg_student_progress = round($avg_student_progress / $nb_courses,1); - $avg_student_score = round($avg_student_score / $nb_courses,1); + $avg_student_progress = round($avg_student_progress / $nb_courses,2); + $avg_student_score = round($avg_student_score / $nb_courses,2); $last_connection_date = Tracking::get_last_connection_date($a_infosUser['user_id']); + if($last_connection_date==''){ + $last_connection_date=get_lang('NoConnexion'); + } $time_spent_on_the_platform = api_time_to_hms(Tracking::get_time_spent_on_the_platform($a_infosUser['user_id'])); // cvs informations @@ -294,34 +297,34 @@ if(!empty($_GET['student'])) - - - - - - - - @@ -381,7 +384,7 @@ if(!empty($_GET['student'])) $a_date_end = explode('-',$a_infosCours['date_end']); $date_end = $a_date_end[2].'/'.$a_date_end[1].'/'.$a_date_end[0]; $dateSession = get_lang('From').' '.$date_start.' '.get_lang('To').' '.$date_end; - $tableTitle = $a_infosCours['title'].'  |  '.get_lang('Tutor').' : '.$a_infosCours['tutor_name']; + $tableTitle = $a_infosCours['title'].'  |  '.get_lang('Tutor').' : '.stripslashes($a_infosCours['tutor_name']); $csv_content[] = array(); $csv_content[] = array($tableTitle); @@ -478,7 +481,7 @@ if(!empty($_GET['student']))
+ +
+ +
+ +
+ +
- + set_header(4, get_lang('Score'),false); $table -> set_header(5, get_lang('Student_publication'),false); $table -> set_header(6, get_lang('Messages'),false); - $table -> set_header(7, get_lang('LatestLogin'),false); + $table -> set_header(7, get_lang('LatestLogin')); $table -> set_header(8, get_lang('Details'),false); if($export_csv) @@ -148,7 +148,18 @@ if($isCoach) $row[] = $avg_student_score.' %'; $row[] = $total_assignments; $row[] = $total_messages; - $row[] = Tracking :: get_last_connection_date($student_id); + + $string_date=Tracking :: get_last_connection_date($student_id); + $timestamp=strtotime($string_date); + $currentTimestamp=mktime(); + + //If the last connection is > than 7 days, the text is red + if($currentTimestamp-$timestamp>345600){ + $row[] = ''.$string_date.''; + } + else{ + $row[] = $string_date; + } if($export_csv) { diff --git a/main/tracking/courseLog.php b/main/tracking/courseLog.php index b3a06c7f21..b452c0ece1 100644 --- a/main/tracking/courseLog.php +++ b/main/tracking/courseLog.php @@ -472,7 +472,7 @@ else { $table -> set_header(4, get_lang('Score'),false); $table -> set_header(5, get_lang('Student_publication'),false); $table -> set_header(6, get_lang('Messages'),false); - $table -> set_header(7, get_lang('LatestLogin'),false); + $table -> set_header(7, get_lang('LatestLogin')); $table -> set_header(8, get_lang('Details'),false); if($export_csv)