Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions main/install/configuration.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -1959,6 +1959,11 @@
// Enable improved tracking section in main/mySpace/myStudents.php
//$_configuration['improve_tracking_in_mystudent_php'] = false;

// Allow teachers to access all course/session tracking in main/mySpace/myStudents.php
// When enabled, teachers can view tracking for all courses and sessions
// of a student even if they are not the course admin or session coach
//$_configuration['teacher_access_all_tracking'] = false;

// Add teachers column in course list.
// $_configuration['add_teachers_in_course_list'] = false;

Expand Down
5 changes: 5 additions & 0 deletions main/mySpace/myStudents.php
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,11 @@
if (api_is_drh() || api_is_platform_admin() || api_is_student_boss() || api_is_session_admin()) {
$drh_can_access_all_courses = true;
}
// Allow teachers to access tracking of all courses/sessions when enabled in configuration
$teacherCanAccessAll = api_get_configuration_value('teacher_access_all_tracking');
if (!$drh_can_access_all_courses && $teacherCanAccessAll && api_is_teacher()) {
$drh_can_access_all_courses = true;
}

$courses = CourseManager::get_course_list_of_user_as_course_admin(api_get_user_id());
$courses_in_session_by_coach = [];
Expand Down
Loading