20 declare(strict_types=1);
34 foreach ($this->parent_obj->getFormats() as
$f) {
36 $this->formats[
$f[
'key']] = $f[
'txt'];
40 foreach ($types as $type) {
44 if (!is_dir($dir) || !is_writeable($dir)) {
52 while ($entry = $h_dir->read()) {
53 if ($entry !=
"." && $entry !=
"..") {
54 $ts = substr($entry, 0, strpos($entry,
"__"));
58 $file[$entry . $type] = [
77 protected function fillRow(array $a_set): void
80 $this->tpl->setCurrentBlock(
'custom');
81 $this->tpl->setVariable(
'VAL_CUSTOM', $c[
'obj']->{$c[
'func']}($a_set[
'type'], $a_set[
'file']) .
' ');
82 $this->tpl->parseCurrentBlock();
86 $this->tpl->setVariable(
'VAL_ID', $file_id);
88 $type = ($this->formats[$a_set[
'type']] !=
"")
89 ? $this->formats[$a_set[
'type']]
91 $this->tpl->setVariable(
'VAL_TYPE', $type);
97 ) .
".xlsx" : $a_set[
'file'];
98 $this->tpl->setVariable(
'VAL_FILE',
$filename);
101 $this->tpl->setVariable(
107 $this->tpl->setVariable(
'TXT_DOWNLOAD', $this->
lng->txt(
'download'));
112 $this->tpl->setVariable(
'URL_DOWNLOAD',
$url);
118 if ($type ==
'xlsx') {
120 return $this->
lng->txt(
'dcl_export_started');
122 return $this->
lng->txt(
'dcl_export_finished');
125 return $this->
lng->txt(
'dcl_export_finished');
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
static _getExportDirectory(int $a_obj_id, string $a_type="xml", string $a_obj_type="", string $a_entity="")
Get export directory for an repository object.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(ilDclExportGUI $a_parent_obj, string $a_parent_cmd, ilObject $a_exp_obj)
static formatSize(int $size, string $a_mode='short', ?ilLanguage $a_lng=null)
Returns the specified file size value in a human friendly form.
addCustomColumn(string $a_txt, object $a_obj, string $a_func)
parseExportStatus(string $type, string $file)
const IN_PROGRESS_POSTFIX
isExportInProgress(string $file)