From 204aeef946d8b80b640ee3462e8042301810d1c8 Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Fri, 12 May 2017 14:54:01 +0200 Subject: [PATCH] Add boss access to user report (from ofaj branch) --- main/mySpace/lp_tracking.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main/mySpace/lp_tracking.php b/main/mySpace/lp_tracking.php index 5dd1a0d8f6..bd1a895162 100755 --- a/main/mySpace/lp_tracking.php +++ b/main/mySpace/lp_tracking.php @@ -27,13 +27,15 @@ $csv_content = array(); $course_info = api_get_course_info($courseCode); if (empty($course_info) || empty($lp_id)) { - api_not_allowed(); + api_not_allowed(api_get_origin() !== 'learnpath'); } $userInfo = api_get_user_info($user_id); $name = $userInfo['complete_name']; +$isBoss = UserManager::userIsBossOfStudent(api_get_user_id(), $user_id); if (!api_is_platform_admin(true) && !CourseManager :: is_course_teacher(api_get_user_id(), $courseCode) && + !$isBoss && !Tracking :: is_allowed_to_coach_student(api_get_user_id(), $user_id) && !api_is_drh() && !api_is_course_tutor() ) { api_not_allowed(