[svn r18834] Teachers can access to hidden files and directories as they can in the tool documents

skala
Juan Carlos Raña 16 years ago
parent ec120d17f0
commit a30340ac73
  1. 13
      main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/ImageManager.php

@ -142,9 +142,13 @@ class ImageManager
global $_course; global $_course;
$doc_id = DocumentManager::get_document_id($_course, $new_dir ); $doc_id = DocumentManager::get_document_id($_course, $new_dir );
$visible_status= api_get_item_visibility($_course,TOOL_DOCUMENT,$doc_id); $visible_status= api_get_item_visibility($_course,TOOL_DOCUMENT,$doc_id);
//Teachers can access to hidden files and directories as they can in the tool documents
/*
if ($visible_status=='0' || $visible_status=='-1') { if ($visible_status=='0' || $visible_status=='-1') {
continue; continue;
} }
*/
/* if (strpos($fullpath, '/shared_folder/') !== false) { /* if (strpos($fullpath, '/shared_folder/') !== false) {
if (!preg_match('/.*\/shared_folder\/$/', $fullpath)) { if (!preg_match('/.*\/shared_folder\/$/', $fullpath)) {
@ -233,10 +237,12 @@ class ImageManager
$visible_status= api_get_item_visibility($_course,TOOL_DOCUMENT,$doc_id); $visible_status= api_get_item_visibility($_course,TOOL_DOCUMENT,$doc_id);
} }
//Teachers can access to hidden files and directories as they can in the tool documents
/*
if ($visible_status=='0' || $visible_status=='-1') { if ($visible_status=='0' || $visible_status=='-1') {
continue; continue;
} }
*/
$relative = Files::fixPath($path.$entry); $relative = Files::fixPath($path.$entry);
$full = Files::fixPath($fullpath.$entry); $full = Files::fixPath($fullpath.$entry);
$count = $this->countFiles($full); $count = $this->countFiles($full);
@ -256,9 +262,14 @@ class ImageManager
$doc_id = DocumentManager::get_document_id($_course, $new_dir ); $doc_id = DocumentManager::get_document_id($_course, $new_dir );
$visible_status= api_get_item_visibility($_course,TOOL_DOCUMENT,$doc_id); $visible_status= api_get_item_visibility($_course,TOOL_DOCUMENT,$doc_id);
} }
//Teachers can access to hidden files and directories as they can in the tool documents
/*
if ($visible_status=='0' || $visible_status=='-1') { if ($visible_status=='0' || $visible_status=='-1') {
continue; continue;
} }
*/
$file['url'] = Files::makePath($this->config['base_url'],$path).$entry; $file['url'] = Files::makePath($this->config['base_url'],$path).$entry;
$file['relative'] = $path.$entry; $file['relative'] = $path.$entry;
$file['fullpath'] = $fullpath.$entry; $file['fullpath'] = $fullpath.$entry;

Loading…
Cancel
Save