Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/monara/public_html/test.athavaneng.com/themes.php on line 99
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 227
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 228
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 229
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 230
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 231
.
/**
* Print private files tree
*
* @package block_private_files
* @copyright 2010 Dongsheng Cai
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
class block_private_files_renderer extends plugin_renderer_base {
/**
* Prints private files tree view
* @return string
*/
public function private_files_tree() {
return $this->render(new private_files_tree);
}
public function render_private_files_tree(private_files_tree $tree) {
if (empty($tree->dir['subdirs']) && empty($tree->dir['files'])) {
$html = $this->output->box(get_string('nofilesavailable', 'repository'));
} else {
$htmlid = 'private_files_tree_'.uniqid();
$this->page->requires->js_call_amd('block_private_files/files_tree', 'init', [$htmlid]);
$html = '';
$html .= $this->htmllize_tree($tree, $tree->dir, true);
$html .= '
';
}
return $html;
}
/**
* Internal function - creates htmls structure suitable for core/tree AMD.
*
* @param private_files_tree $tree The renderable tree.
* @param array $dir The directory in the tree
* @param bool $isroot If it is the root directory in the tree.
* @return string
*/
protected function htmllize_tree($tree, $dir, $isroot) {
global $CFG;
if (empty($dir['subdirs']) and empty($dir['files'])) {
return '';
}
if ($isroot) {
$result = '';
} else {
$result = '';
return $result;
}
}
class private_files_tree implements renderable {
public $context;
public $dir;
public function __construct() {
global $USER;
$this->context = context_user::instance($USER->id);
$fs = get_file_storage();
$this->dir = $fs->get_area_tree($this->context->id, 'user', 'private', 0);
}
}