4 include_once
'./Services/Table/classes/class.ilTable2GUI.php';
5 include_once
'./Services/Export/classes/class.ilExportOptions.php';
6 include_once
'./Services/Export/classes/class.ilExportFileInfo.php';
30 parent::__construct($a_parent_class,$a_parent_cmd);
33 $this->lng->loadLanguageModule(
'export');
36 $this->
setTitle($this->lng->txt(
'export_select_resources'));
39 $this->
addColumn($this->lng->txt(
'title'),
'');
40 $this->
addColumn($this->lng->txt(
'export_last_export'),
'');
41 $this->
addColumn($this->lng->txt(
'export_last_export_file'),
'');
42 $this->
addColumn($this->lng->txt(
'export_create_new_file'),
'');
43 $this->
addColumn($this->lng->txt(
'export_omit_resource'),
'');
46 $this->
setFormAction($ilCtrl->getFormAction($this->getParentObject()));
47 $this->
setRowTemplate(
"tpl.export_item_selection_row.html",
"Services/Export");
54 $this->
addCommandButton(
'saveItemSelection', $this->lng->txt(
'export_save_selection'));
62 $this->tpl->setCurrentBlock(
'footer_export_e');
63 $this->tpl->setVariable(
'TXT_EXPORT_E_ALL',$this->lng->txt(
'select_all'));
64 $this->tpl->parseCurrentBlock();
65 $this->tpl->setCurrentBlock(
'footer_export');
66 $this->tpl->setVariable(
'TXT_EXPORT_ALL',$this->lng->txt(
'select_all'));
67 $this->tpl->parseCurrentBlock();
68 $this->tpl->setCurrentBlock(
'footer_omit');
69 $this->tpl->setVariable(
'TXT_OMIT_ALL',$this->lng->txt(
'select_all'));
70 $this->tpl->parseCurrentBlock();
74 for($i = 0; $i < $s[
'depth']; $i++)
76 $this->tpl->touchBlock(
'padding');
77 $this->tpl->touchBlock(
'end_padding');
80 $this->tpl->setVariable(
'TREE_ALT_IMG',$this->lng->txt(
'obj_'.$s[
'type']));
81 $this->tpl->setVariable(
'TREE_TITLE',$s[
'title']);
90 $this->tpl->setVariable(
'VAL_LAST_EXPORT',$this->lng->txt(
'no_file'));
99 if($s[
'perm_export']
and $s[
'last_export'])
101 $this->tpl->setCurrentBlock(
'radio_export_e');
102 $this->tpl->setVariable(
'TXT_EXPORT_E',$this->lng->txt(
'export_existing'));
103 $this->tpl->setVariable(
'NAME_EXPORT_E',
'cp_options['.$s[
'ref_id'].
'][type]');
105 $this->tpl->setVariable(
'ID_EXPORT_E',$s[
'depth'].
'_'.$s[
'type'].
'_'.$s[
'ref_id'].
'_export_e');
106 $this->tpl->setVariable(
'EXPORT_E_CHECKED',
'checked="checked"');
107 $this->tpl->parseCurrentBlock();
109 elseif(!$s[
'perm_export'])
111 $this->tpl->setCurrentBlock(
'missing_export_perm');
112 $this->tpl->setVariable(
'TXT_MISSING_EXPORT_PERM',$this->lng->txt(
'missing_perm'));
113 $this->tpl->parseCurrentBlock();
118 if($s[
'perm_export']
and $s[
'export'])
120 $this->tpl->setCurrentBlock(
'radio_export');
121 $this->tpl->setVariable(
'TXT_EXPORT',$this->lng->txt(
'export'));
122 $this->tpl->setVariable(
'NAME_EXPORT',
'cp_options['.$s[
'ref_id'].
'][type]');
124 $this->tpl->setVariable(
'ID_EXPORT',$s[
'depth'].
'_'.$s[
'type'].
'_'.$s[
'ref_id'].
'_export');
125 if(!$copy
or !$perm_copy)
127 $this->tpl->setVariable(
'EXPORT_CHECKED',
'checked="checked"');
129 $this->tpl->parseCurrentBlock();
133 $this->tpl->setCurrentBlock(
'missing_export_perm');
134 $this->tpl->setVariable(
'TXT_MISSING_EXPORT_PERM',$this->lng->txt(
'missing_perm'));
135 $this->tpl->parseCurrentBlock();
139 $this->tpl->setCurrentBlock(
'omit_radio');
140 $this->tpl->setVariable(
'TXT_OMIT',$this->lng->txt(
'omit'));
141 $this->tpl->setVariable(
'NAME_OMIT',
'cp_options['.$s[
'ref_id'].
'][type]');
143 $this->tpl->setVariable(
'ID_OMIT',$s[
'depth'].
'_'.$s[
'type'].
'_'.$s[
'ref_id'].
'_omit');
144 if((!$s[
'copy']
or !$s[
'perm_copy'])
and (!$s[
'link']))
146 $this->tpl->setVariable(
'OMIT_CHECKED',
'checked="checked"');
148 $this->tpl->parseCurrentBlock();
160 global $tree,$objDefinition, $ilAccess;
163 foreach($tree->getSubTree($root = $tree->getNodeData($a_source)) as $node)
165 if($node[
'type'] ==
'rolf')
169 if(!$objDefinition->allowExport($node[
'type']))
173 include_once(
"./Modules/File/classes/class.ilObjFileAccess.php");
174 if ($node[
'type'] ==
"file" &&
183 $r[
'last_export'] = $last->getCreationDate()->get(
IL_CAL_UNIX);
187 $r[
'last_export'] = 0;
191 $r[
'source']= $first;
192 $r[
'ref_id']= $node[
'child'];
193 $r[
'depth'] = $node[
'depth'] - $root[
'depth'];
194 $r[
'type'] = $node[
'type'];
195 $r[
'title'] = $node[
'title'];
196 $r[
'export'] = $objDefinition->allowExport($node[
'type']);
197 $r[
'perm_export'] = $ilAccess->checkAccess(
'write',
'',$node[
'child']);
204 $rows[] =
array(
'last' =>
true);
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
parseContainer($a_source)
parse tree
setEnableNumInfo($a_val)
Set enable num info.
static _isFileHidden($a_file_name)
Returns true, if a file with the specified name, is usually hidden from the user. ...
Object selection for export.
__construct($a_parent_class, $a_parent_cmd)
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
static _lookupObjId($a_id)
static lookupLastExport($a_obj_id, $a_type, $a_version='')
Lookup last export.
static formatDate(ilDateTime $date)
Format a date public.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setFormName($a_formname="")
Set Form name.
setEnableHeader($a_enableheader)
Set Enable Header.
setEnableTitle($a_enabletitle)
Set Enable Title.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setLimit($a_limit=0, $a_default_limit=0)