3 require_once(
"./Modules/Category/classes/class.ilCategoryExporter.php");
4 require_once(
"./Services/Xml/classes/class.ilXmlWriter.php");
5 require_once(
"./Services/Export/classes/class.ilExport.php");
21 $writer->xmlStartTag(
"OrgUnits");
22 foreach($nodes as $orgu_ref_id){
27 $writer->xmlStartTag(
"OrgUnit", $attributes);
28 $writer->xmlElement(
"external_id", null, $this->
buildExternalId($orgu_ref_id));
29 $writer->xmlElement(
"title", null, $orgu->getTitle());
30 $writer->xmlElement(
"description", null, $orgu->getDescription());
31 $writer->xmlEndTag(
"OrgUnit");
33 $writer->xmlEndTag(
"OrgUnits");
42 return "orgu_".CLIENT_ID.
"_".$orgu_ref_id;
51 $file_name =
"org_unit_export_" . $orgu_ref_id;
52 require_once(
'./Services/Excel/classes/class.ilExcel.php');
71 foreach ($nodes as $node) {
100 $sub_dir = $ts.
'__'.IL_INST_ID.
'__'.
"orgu".
'_'.$orgu_id.
"";
101 $new_file = $sub_dir.
'.zip';
103 $export_run_dir = $export_dir.
"/".$sub_dir;
107 $writer->xmlDumpFile($export_run_dir.
"/manifest.xml",
false);
110 ilUtil::zip($export_run_dir , $export_dir.
"/".$new_file);
114 include_once
'./Services/Export/classes/class.ilExportFileInfo.php';
118 $exp->setExportType(
'xml');
119 $exp->setFilename($new_file);
128 "directory" => $export_dir
134 $tree = $DIC[
'tree'];
135 $open =
array($root_node_ref);
138 $current = array_shift($open);
139 $closed[] = $current;
140 foreach($tree->getChildsByType($current,
"orgu") as
$new){
141 if(!in_array(
$new[
"child"], $closed) && !in_array(
$new[
"child"], $open))
142 $open[] =
$new[
"child"];
154 $tree = $DIC[
'tree'];
155 $parent_ref = $tree->getParentId($orgu->getRefId());
159 $ou_parent_id =
"__ILIAS";
163 $attr =
array(
"ou_id" => $this->
buildExternalId(
$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.
Stores information of creation date and versions of export files
getStructure($root_node_ref)
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
static zip($a_dir, $a_file, $compress_content=false)
zips given directory/file into given zip.file
Create styles array
The data for the language used.
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.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
simpleExportExcel($orgu_ref_id)
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively