Minor - Add code inline doc - refs BT#7112

1.9.x
Yannick Warnier 12 years ago
parent 2d518c626f
commit 4474156b46
  1. 4
      main/tracking/courseLog.php

@ -44,11 +44,12 @@ if (!$is_allowedToTrack) {
exit;
}
// If the user is a HR director (drh)
if (api_is_drh()) {
// Blocking course for drh
if (api_drh_can_access_all_session_content()) {
// If the drh has been configured to be allowed to see all session content, give him access to the session courses
$coursesFromSession = SessionManager::getAllCoursesFromAllSessionFromDrh(api_get_user_id());
$coursesFollowedList = CourseManager::get_courses_followed_by_drh(api_get_user_id());
$coursesFollowedList = array_keys($coursesFollowedList);
if (!in_array(api_get_course_id(), $coursesFollowedList)) {
@ -57,6 +58,7 @@ if (api_is_drh()) {
}
}
} else {
// If the drh has *not* been configured to be allowed to see all session content, then check if he has also been given access to the corresponding courses
$coursesFollowedList = CourseManager::get_courses_followed_by_drh(api_get_user_id());
$coursesFollowedList = array_keys($coursesFollowedList);
if (!in_array(api_get_course_id(), $coursesFollowedList)) {

Loading…
Cancel
Save