Skip to content

Commit

Permalink
Documents: Avoid to show ElFinder CourseDriver to students if tool Do…
Browse files Browse the repository at this point in the history
…cuments is hidden - refs BT#20558
  • Loading branch information
AngelFQC committed Feb 13, 2023
1 parent c33fe2b commit 6e3965e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main/inc/lib/elfinder/connectorAction.php
Expand Up @@ -20,9 +20,14 @@
//'CourseUserDriver',
//'HomeDriver'
];
$isVisible = CourseHome::getToolVisibility(
TOOL_DOCUMENT,
api_get_course_int_id(),
api_get_session_id()
);
$block = api_get_configuration_value('block_editor_file_manager_for_students');
$newDriverList = [];
if ($block && !api_is_allowed_to_edit()) {
if (($block || !$isVisible) && !api_is_allowed_to_edit()) {
foreach ($driverList as $driver) {
if ($driver === 'CourseDriver') {
continue;
Expand Down

0 comments on commit 6e3965e

Please sign in to comment.