diff --git a/main/mySpace/index.php b/main/mySpace/index.php index cd93da13e8..ef8af34551 100755 --- a/main/mySpace/index.php +++ b/main/mySpace/index.php @@ -63,9 +63,7 @@ $tbl_admin = Database :: get_main_table(TABLE_MAIN_ADMIN); $tbl_track_cours_access = Database :: get_statistic_table(TABLE_STATISTIC_TRACK_E_COURSE_ACCESS); -/* - * FUNCTIONS - */ +/* * FUNCTIONS */ function count_teacher_courses() { global $nb_teacher_courses; @@ -108,9 +106,7 @@ function rsort_sessions($a, $b) { } } -/* - * MAIN CODE - */ +/* * MAIN CODE */ $is_coach = api_is_coach(); $is_platform_admin = api_is_platform_admin(); @@ -162,10 +158,9 @@ if (api_is_allowed_to_create_course() && $_GET['display'] != 'yourstudents') { } else { if (!empty($session_id)) { $session_name = api_get_session_name($session_id); - $title = ucfirst($session_name); + $title = get_lang('Session').' '.$session_name; } - $menu_items[] = ''.get_lang('TeacherInterface').''; - + $menu_items[] = ''.get_lang('TeacherInterface').''; } } } @@ -178,13 +173,11 @@ if ($is_coach && $_GET['display'] != 'yourstudents') { $menu_items[] = get_lang('CoachInterface'); $title = get_lang('YourStatistics'); } else { - $menu_items[] = ''.get_lang('CoachInterface').''; - + $menu_items[] = ''.get_lang('CoachInterface').''; } } if ($is_platform_admin && $_GET['display'] != 'yourstudents') { - if ($nb_teacher_courses == 0 && $nb_sessions == 0) { $view = 'admin'; } @@ -210,8 +203,7 @@ if ($is_drh || $_GET['display'] == 'yourstudents') { // Actions menu $nb_menu_items = count($menu_items); -if ($nb_teacher_courses > 0 ) { - +if ($nb_teacher_courses > 0 ) { echo '
'; if (empty($session_id)) { if ($nb_menu_items > 1) { @@ -239,7 +231,7 @@ if ($nb_teacher_courses > 0 ) { } -echo '

'.get_lang('Session').' '.$title.'

'; +echo '

'.$title.'

'; if (($is_drh && $view == 'drh') || $_GET['display'] == 'yourstudents') { // get data for human resources manager @@ -457,7 +449,7 @@ if ($view == 'coach') { $csv_content[] = array(get_lang('NbStudentPerSession', '').';'.$nb_students_per_session); $csv_content[] = array(get_lang('NbCoursesPerSession', '').';'.$nb_courses_per_session); $csv_content[] = array(); - } else { + } else { // html part echo '
diff --git a/main/mySpace/myspace.lib.php b/main/mySpace/myspace.lib.php index c22eed32e8..90d4709cf6 100755 --- a/main/mySpace/myspace.lib.php +++ b/main/mySpace/myspace.lib.php @@ -1272,12 +1272,13 @@ class MySpace { if (count($users) > 0) { $nb_students_in_course = count($users); - $avg_assignments_in_course = Tracking::count_student_assignments($users, $course_code, $session_id); - $avg_messages_in_course = Tracking::count_student_messages($users, $course_code, $session_id); - $avg_progress_in_course = Tracking::get_avg_student_progress($users, $course_code, array(), $session_id); - $avg_score_in_course = Tracking :: get_avg_student_score($users, $course_code, array(), $session_id); - $avg_score_in_exercise = Tracking::get_avg_student_exercise_score($users, $course_code, 0, $session_id); - $avg_time_spent_in_course = Tracking::get_time_spent_on_the_course($users, $course_code, $session_id); + $avg_assignments_in_course = Tracking::count_student_assignments($users, $course_code, $session_id); + $avg_messages_in_course = Tracking::count_student_messages($users, $course_code, $session_id); + $avg_progress_in_course = Tracking::get_avg_student_progress($users, $course_code, array(), $session_id); + $avg_score_in_course = Tracking::get_avg_student_score($users, $course_code, array(), $session_id); + $avg_score_in_exercise = Tracking::get_avg_student_exercise_score($users, $course_code, 0, $session_id); + + $avg_time_spent_in_course = Tracking::get_time_spent_on_the_course($users, $course_code, $session_id); $avg_progress_in_course = round($avg_progress_in_course / $nb_students_in_course, 2); if (is_numeric($avg_score_in_course)) { diff --git a/main/tracking/courseLog.php b/main/tracking/courseLog.php index 861aac450a..95b868e8db 100755 --- a/main/tracking/courseLog.php +++ b/main/tracking/courseLog.php @@ -156,7 +156,9 @@ if ($_GET['studentlist'] == 'false') { echo ' | '.get_lang('ExamTracking').' '; } elseif($_GET['studentlist'] == '' || $_GET['studentlist'] == 'true') { - echo ' '.Display::return_icon('back.png', get_lang('Back')).get_lang('Back').''; + if (!empty($_GET['from'])) { + echo ' '.Display::return_icon('back.png', get_lang('Back')).get_lang('Back').''; + } /* echo get_lang('StudentsTracking').' | '; diff --git a/main/tracking/exams.php b/main/tracking/exams.php index 1227973312..735e90512e 100644 --- a/main/tracking/exams.php +++ b/main/tracking/exams.php @@ -8,6 +8,9 @@ require_once api_get_path(LIBRARY_PATH).'course.lib.php'; require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php'; require_once api_get_path(LIBRARY_PATH).'pear/Spreadsheet_Excel_Writer/Writer.php'; +$this_section = SECTION_TRACKING; + + $is_allowedToTrack = $is_courseAdmin || $is_platformAdmin || $is_courseCoach || $is_sessionAdmin; if(!$is_allowedToTrack) {