17 $writer->xmlStartTag(
"OrgUnits");
18 foreach (
$nodes as $orgu_ref_id) {
25 $writer->xmlElement(
"external_id", null, $this->
getExternalId($orgu_ref_id));
26 $writer->xmlElement(
"title", null, $orgu->getTitle());
27 $writer->xmlElement(
"description", null, $orgu->getDescription());
28 $writer->xmlEndTag(
"OrgUnit");
30 $writer->xmlEndTag(
"OrgUnits");
52 return "orgu_" . CLIENT_ID .
"_" . $orgu_ref_id;
62 $file_name =
"org_unit_export_" . $orgu_ref_id;
64 $worksheet->addSheet(
'org_units');
68 $worksheet->setCell(
$row, 0,
"ou_id");
69 $worksheet->setCell(
$row, 1,
"ou_id_type");
70 $worksheet->setCell(
$row, 2,
"ou_parent_id");
71 $worksheet->setCell(
$row, 3,
"ou_parent_id_type");
72 $worksheet->setCell(
$row, 4,
"reference_id");
73 $worksheet->setCell(
$row, 5,
"title");
74 $worksheet->setCell(
$row, 6,
"description");
75 $worksheet->setCell(
$row, 7,
"action");
80 foreach (
$nodes as $node) {
87 $worksheet->setCell(
$row, 0, $attrs[
"ou_id"]);
88 $worksheet->setCell(
$row, 1, $attrs[
"ou_id_type"]);
89 $worksheet->setCell(
$row, 2, $attrs[
"ou_parent_id"]);
90 $worksheet->setCell(
$row, 3, $attrs[
"ou_parent_id_type"]);
91 $worksheet->setCell(
$row, 4, $orgu->getRefId());
92 $worksheet->setCell(
$row, 5, $orgu->getTitle());
93 $worksheet->setCell(
$row, 6, $orgu->getDescription());
94 $worksheet->setCell(
$row, 7,
"create");
96 $worksheet->sendToClient($file_name);
109 $sub_dir = $ts .
'__' . IL_INST_ID .
'__' .
"orgu" .
'_' . $orgu_id .
"";
110 $new_file = $sub_dir .
'.zip';
112 $export_run_dir = $export_dir .
"/" . $sub_dir;
116 $writer->xmlDumpFile($export_run_dir .
"/manifest.xml",
false);
119 ilUtil::zip($export_run_dir, $export_dir .
"/" . $new_file);
126 $exp->setExportType(
'xml');
127 $exp->setFilename($new_file);
131 $export_dir .
"/" . $new_file,
138 "directory" => $export_dir
145 $tree = $DIC[
'tree'];
146 $open = array($root_node_ref);
148 while (count($open)) {
152 if (!in_array($new[
"child"], $closed) && !in_array($new[
"child"], $open)) {
153 $open[] = $new[
"child"];
167 $tree = $DIC[
'tree'];
168 $parent_ref =
$tree->getParentId($orgu->getRefId());
172 $ou_parent_id =
"__ILIAS";
175 $ref_id = $orgu->getRefId();
176 $attr = array(
"ou_id" => $this->
getExternalId($ref_id),
"ou_id_type" =>
"external_id",
"ou_parent_id" => $ou_parent_id,
"ou_parent_id_type" =>
"external_id",
"action" =>
"create");
static _createExportDirectory($a_obj_id, $a_export_type="xml", $a_obj_type="")
static makeDirParents($a_dir)
Create a new directory and all parent directories.
const ILIAS_VERSION_NUMERIC
buildExternalId($orgu_ref_id)
getAttributesForOrgu($orgu)
Class for category export.
static _lookupObjectId($a_ref_id)
lookup object id
getExternalId($orgu_ref_id)
Stores information of creation date and versions of export files
getStructure($root_node_ref)
if(array_key_exists('yes', $_REQUEST)) $attributes
static zip($a_dir, $a_file, $compress_content=false)
zips given directory/file into given zip.file
simpleExport($orgu_ref_id)
sendAndCreateSimpleExportFile()
static _getExportDirectory($a_obj_id, $a_type="xml", $a_obj_type="", $a_entity="")
Get export directory for an repository object.
simpleExportExcel($orgu_ref_id)
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.