diff --git a/main/mySpace/index.php b/main/mySpace/index.php index a5bb70c5c8..cbc73b050f 100644 --- a/main/mySpace/index.php +++ b/main/mySpace/index.php @@ -25,6 +25,9 @@ $nameTools = get_lang('MySpace'); $user_id = api_get_user_id(); $is_coach = api_is_coach($_GET['session_id']); // This is used? + +$session_id = isset($_GET['session_id']) ? intval($_GET['session_id']) : 0; + $is_platform_admin = api_is_platform_admin(); $is_drh = api_is_drh(); $is_session_admin = api_is_session_admin(); @@ -122,13 +125,8 @@ if ($is_platform_admin) { $title = get_lang('CoachList'); $menu_items[] = Display::url(Display::return_icon('teacher.png', get_lang('TeacherInterface'), array(), 32), api_get_self().'?view=teacher'); $menu_items[] = Display::url(Display::return_icon('star_na.png', get_lang('AdminInterface'), array(), 32), api_get_self().'?view=admin'); - $menu_items[] = Display::url(Display::return_icon('quiz.png', get_lang('ExamTracking'), array(), 32), api_get_path(WEB_CODE_PATH).'tracking/exams.php'); - - //$menu_items[] = Display::url(Display::return_icon('quiz.png', get_lang('CurrentCoursesReport'), array(), 32), api_get_path(WEB_CODE_PATH).'mySpace/current_courses.php'); - - - - + $menu_items[] = Display::url(Display::return_icon('quiz.png', get_lang('ExamTracking'), array(), 32), api_get_path(WEB_CODE_PATH).'tracking/exams.php'); + //$menu_items[] = Display::url(Display::return_icon('quiz.png', get_lang('CurrentCoursesReport'), array(), 32), api_get_path(WEB_CODE_PATH).'mySpace/current_courses.php'); } else { $menu_items[] = Display::return_icon('teacher_na.png', get_lang('TeacherInterface'), array(), 32); $menu_items[] = Display::url(Display::return_icon('star.png', get_lang('AdminInterface'), array(), 32), api_get_self().'?view=admin'); @@ -334,11 +332,12 @@ if (empty($session_id)) { $nb_posts = null; } } else { - $courses = Tracking::get_courses_followed_by_coach($user_id, $session_id); + $courses = Tracking::get_courses_followed_by_coach($user_id, $session_id); + + //Courses for the user + $count_courses = count($courses); } - - if ($count_courses || $count_sessions) { //If we are in course if (empty($session_id)) { diff --git a/main/mySpace/myStudents.php b/main/mySpace/myStudents.php index 4db4f54feb..742070a2b9 100644 --- a/main/mySpace/myStudents.php +++ b/main/mySpace/myStudents.php @@ -6,7 +6,7 @@ */ // name of the language file that needs to be included -$language_file = array('registration', 'index', 'tracking', 'exercice', 'admin', 'gradebook'); +$language_file = array('registration', 'index', 'tracking', 'exercice', 'admin', 'gradebook', 'survey'); $cidReset = true; @@ -21,6 +21,8 @@ require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/be/linkfactory.class.php require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/be/category.class.php'; require_once api_get_path(LIBRARY_PATH).'attendance.lib.php'; +require_once api_get_path(SYS_CODE_PATH).'survey/survey.lib.php'; + $htmlHeadXtra[] = '