Browse Source

Add setting 'allow_drh_access_announcement' see BT#15072

Allow DRH users to access all announcements from course
Julio Montoya 6 years ago
parent
commit
3bfab64cd0
2 changed files with 7 additions and 1 deletions
  1. 4 1
      main/inc/lib/AnnouncementManager.php
  2. 3 0
      main/install/configuration.dist.php

+ 4 - 1
main/inc/lib/AnnouncementManager.php

@@ -1622,8 +1622,11 @@ class AnnouncementManager
             $extraGroupCondition = " AND ip.to_group_id = $group_id ";
         }
 
+        $allowDrhAccess = api_get_configuration_value('allow_drh_access_announcement');
+
         if (api_is_allowed_to_edit(false, true) ||
-            ($allowUserEditSetting && !api_is_anonymous())
+            ($allowUserEditSetting && !api_is_anonymous()) ||
+            ($allowDrhAccess && api_is_drh())
         ) {
             // A.1. you are a course admin with a USER filter
             // => see only the messages of this specific user + the messages of the group (s)he is member of.

+ 3 - 0
main/install/configuration.dist.php

@@ -1018,6 +1018,9 @@ VALUES (2, 13, 'session_courses_read_only_mode', 'Lock Course In Session', 1, 1,
 // Activate the view with ViewerJS for PDF files within the lessons for IPad and IPhone
 // $_configuration['allow_pdf_viewerjs_in_lp'] = false;
 
+// Allow DRH user to access all session course announcements
+// $_configuration['allow_drh_access_announcement'] = false;
+
 // ------ Custom DB changes (keep this at the end)
 // Add user activation by confirmation email
 // This option prevents the new user to login in the platform if your account is not confirmed via email