27 require_once
"./classes/class.ilObject.php";
67 parent::__construct($a_id, $a_call_by_reference);
79 $cont_dir = $webspace_dir.
"/container_data";
80 if (!is_dir($cont_dir))
84 $obj_dir = $cont_dir.
"/obj_".$this->
getId();
85 if (!is_dir($obj_dir))
149 $this->hiddenfilesfound = $a_hiddenfilesfound;
167 return $this->style_id;
175 $this->style_id = $a_style_id;
190 $q =
"SELECT * FROM container_settings WHERE ".
191 " id = ".$ilDB->quote($a_id ,
'integer').
" AND ".
192 " keyword = ".$ilDB->quote($a_keyword ,
'text');
193 $set = $ilDB->query(
$q);
196 return $rec[
"value"];
203 $query =
"DELETE FROM container_settings WHERE ".
204 "id = ".$ilDB->quote($a_id,
'integer').
" ".
205 "AND keyword = ".$ilDB->quote($a_keyword,
'text');
208 $query =
"INSERT INTO container_settings (id, keyword, value) VALUES (".
209 $ilDB->quote($a_id ,
'integer').
", ".
210 $ilDB->quote($a_keyword ,
'text').
", ".
211 $ilDB->quote($a_value ,
'text').
234 $file_name = $cont_dir.
"/icon_".$a_size.
".gif";
248 function saveIcons($a_big_icon, $a_small_icon, $a_tiny_icon)
256 $big_geom = $this->ilias->getSetting(
"custom_icon_big_width").
"x".
257 $this->ilias->getSetting(
"custom_icon_big_height");
258 $big_file_name = $cont_dir.
"/icon_big.gif";
260 if (is_file($a_big_icon))
268 if (is_file($cont_dir.
"/icon_big.gif"))
278 $small_geom = $this->ilias->getSetting(
"custom_icon_small_width").
"x".
279 $this->ilias->getSetting(
"custom_icon_small_height");
280 $small_file_name = $cont_dir.
"/icon_small.gif";
282 if (is_file($a_small_icon))
289 if (is_file($cont_dir.
"/icon_small.gif"))
299 $tiny_geom = $this->ilias->getSetting(
"custom_icon_tiny_width").
"x".
300 $this->ilias->getSetting(
"custom_icon_tiny_height");
301 $tiny_file_name = $cont_dir.
"/icon_tiny.gif";
303 if (is_file($a_tiny_icon))
310 if (is_file($cont_dir.
"/icon_tiny.gif"))
327 $big_file_name = $cont_dir.
"/icon_big.gif";
328 @unlink($big_file_name);
338 $small_file_name = $cont_dir.
"/icon_small.gif";
339 @unlink($small_file_name);
349 $tiny_file_name = $cont_dir.
"/icon_tiny.gif";
350 @unlink($tiny_file_name);
364 include_once(
"./Services/Blocks/class.ilBlockColumn.php");
365 $block_column =
new ilBlockColumn($col_id);
366 return $block_column;
383 include_once(
'./Services/Container/classes/class.ilContainerSortingSettings.php');
389 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
395 $new_page_object->setParentId($new_obj->getId());
396 $new_page_object->setId($new_obj->getId());
397 $new_page_object->createFromXML();
398 $new_page_object->setXMLContent($orig_page->getXMLContent());
399 $new_page_object->buildDom();
400 $new_page_object->update();
416 include_once(
'./Services/Container/classes/class.ilContainerSorting.php');
436 include_once(
'classes/class.ilLink.php');
437 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
439 global $ilAccess,
$ilErr,$rbacsystem,$tree,$ilUser;
444 $wizard_options->saveOwner($ilUser->getId());
445 $wizard_options->saveRoot($clone_source);
448 $wizard_options->initContainer($clone_source,
$ref_id);
450 foreach($options as $source_id => $option)
452 $wizard_options->addEntry($source_id,$option);
454 $wizard_options->read();
455 $wizard_options->storeTree($clone_source);
460 $ilLog->write(__METHOD__.
': Copy course in course...');
461 $ilLog->write(__METHOD__.
': Added mapping, source ID: '.$clone_source.
', target ID: '.
$ref_id);
462 $wizard_options->read();
463 $wizard_options->dropFirstNode();
464 $wizard_options->appendMapping($clone_source,
$ref_id);
471 include_once
'Services/WebServices/SOAP/classes/class.ilSoapClient.php';
473 $soap_client =
new ilSoapClient();
474 $soap_client->setTimeout(30);
475 $soap_client->setResponseTimeout(30);
476 $soap_client->enableWSDL(
true);
478 $ilLog->write(__METHOD__.
': Trying to call Soap client...');
479 if($soap_client->init())
481 $ilLog->write(__METHOD__.
': Calling soap clone method...');
482 $res = $soap_client->call(
'ilClone',array($new_session_id.
'::'.
$client_id, $copy_id));
486 $ilLog->write(__METHOD__.
': SOAP call failed. Calling clone method manually. ');
487 $wizard_options->disableSOAP();
488 $wizard_options->read();
489 include_once(
'./webservice/soap/include/inc.soap_functions.php');
521 $this->order_type = $a_value;
532 function getSubItems($a_admin_panel_enabled =
false, $a_include_side_block =
false)
534 global $objDefinition,
$ilBench, $tree;
537 if (is_array($this->items[(
int) $a_admin_panel_enabled][(
int) $a_include_side_block]))
539 return $this->items[(int) $a_admin_panel_enabled][(
int) $a_include_side_block];
543 $objects = $tree->getChilds($this->
getRefId(),
"title");
547 include_once(
'Services/Container/classes/class.ilContainerSorting.php');
552 include_once
'./Modules/Session/classes/class.ilEventItems.php';
555 foreach ($objects as
$key => $object)
558 if ($objDefinition->getDevMode($object[
"type"]) || $object[
"type"] ==
"adm"
559 || $object[
"type"] ==
"rolf")
565 if (in_array($object[
'type'], array(
'file',
'fold',
'cat')))
567 include_once
'Modules/File/classes/class.ilObjFileAccess.php';
571 if (!$a_admin_panel_enabled)
580 if (in_array($object[
'ref_id'],$event_items))
586 if(!$a_include_side_block && $objDefinition->isSideBlock($object[
'type']))
592 $type = $objDefinition->getGroupOfObj($object[
"type"]);
595 $type = $object[
"type"];
601 $this->items[
"_all"][
$key] = $object;
602 if ($object[
"type"] !=
"sess")
604 $this->items[
"_non_sess"][
$key] = $object;
608 $this->items[(int) $a_admin_panel_enabled][(
int) $a_include_side_block]
609 = $sort->sortItems($this->items);
611 return $this->items[(int) $a_admin_panel_enabled][(
int) $a_include_side_block];
619 if (is_array($this->items[
"_all"]) && count($this->items[
"_all"]) > 0)
641 global $objDefinition;
643 if (empty($this->type_grps))
645 $this->type_grps = $objDefinition->getGroupedRepositoryObjectTypes($this->
getType());
647 return $this->type_grps;
658 if ($ilSetting->get(
"enable_cat_page_edit"))
673 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
687 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
705 include_once(
"./Services/Container/classes/class.ilContainerSortingSettings.php");
708 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");