Skip to content

Commit

Permalink
Hide protected folders from student BT#15437
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Mar 20, 2019
1 parent 2f12906 commit 9be1fe6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Chamilo/CoreBundle/Component/Editor/Driver/CourseDriver.php
Expand Up @@ -127,6 +127,17 @@ public function getConfiguration()
unset($defaultDisabled['mkdir']);
$defaultDisabled = array_flip($defaultDisabled);
$config['disabled'] = $defaultDisabled;
} else {
$protectedFolders = \DocumentManager::getProtectedFolderFromStudent();
foreach ($protectedFolders as $folder) {
$config['attributes'][] = [
'pattern' => $folder.'/',
'read' => false,
'write' => false,
'hidden' => true,
'locked' => false,
];
}
}

$foldersToHide = \DocumentManager::get_all_document_folders(
Expand Down

0 comments on commit 9be1fe6

Please sign in to comment.