27 require_once
"./classes/class.ilObject.php";
72 parent::__construct($a_id, $a_call_by_reference);
84 $cont_dir = $webspace_dir.
"/container_data";
85 if (!is_dir($cont_dir))
89 $obj_dir = $cont_dir.
"/obj_".$this->
getId();
90 if (!is_dir($obj_dir))
154 $this->hiddenfilesfound = $a_hiddenfilesfound;
172 return $this->style_id;
180 $this->style_id = $a_style_id;
195 $q =
"SELECT * FROM container_settings WHERE ".
196 " id = ".$ilDB->quote($a_id ,
'integer').
" AND ".
197 " keyword = ".$ilDB->quote($a_keyword ,
'text');
198 $set = $ilDB->query($q);
201 return $rec[
"value"];
208 $query =
"DELETE FROM container_settings WHERE ".
209 "id = ".$ilDB->quote($a_id,
'integer').
" ".
210 "AND keyword = ".$ilDB->quote($a_keyword,
'text');
213 $query =
"INSERT INTO container_settings (id, keyword, value) VALUES (".
214 $ilDB->quote($a_id ,
'integer').
", ".
215 $ilDB->quote($a_keyword ,
'text').
", ".
216 $ilDB->quote($a_value ,
'text').
239 $file_name = $cont_dir.
"/icon_".$a_size.
".gif";
253 function saveIcons($a_big_icon, $a_small_icon, $a_tiny_icon)
261 $big_geom = $this->ilias->getSetting(
"custom_icon_big_width").
"x".
262 $this->ilias->getSetting(
"custom_icon_big_height");
263 $big_file_name = $cont_dir.
"/icon_big.gif";
265 if (is_file($a_big_icon))
272 if (is_file($cont_dir.
"/icon_big.gif"))
282 $small_geom = $this->ilias->getSetting(
"custom_icon_small_width").
"x".
283 $this->ilias->getSetting(
"custom_icon_small_height");
284 $small_file_name = $cont_dir.
"/icon_small.gif";
286 if (is_file($a_small_icon))
292 if (is_file($cont_dir.
"/icon_small.gif"))
302 $tiny_geom = $this->ilias->getSetting(
"custom_icon_tiny_width").
"x".
303 $this->ilias->getSetting(
"custom_icon_tiny_height");
304 $tiny_file_name = $cont_dir.
"/icon_tiny.gif";
306 if (is_file($a_tiny_icon))
312 if (is_file($cont_dir.
"/icon_tiny.gif"))
329 $big_file_name = $cont_dir.
"/icon_big.gif";
330 @unlink($big_file_name);
340 $small_file_name = $cont_dir.
"/icon_small.gif";
341 @unlink($small_file_name);
351 $tiny_file_name = $cont_dir.
"/icon_tiny.gif";
352 @unlink($tiny_file_name);
366 include_once(
"./Services/Blocks/class.ilBlockColumn.php");
367 $block_column =
new ilBlockColumn($col_id);
368 return $block_column;
385 include_once(
'./Services/Container/classes/class.ilContainerSortingSettings.php');
391 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
397 $new_page_object->setParentId($new_obj->getId());
398 $new_page_object->setId($new_obj->getId());
399 $new_page_object->createFromXML();
400 $new_page_object->setXMLContent($orig_page->getXMLContent());
401 $new_page_object->buildDom();
402 $new_page_object->update();
420 include_once(
'./Services/Container/classes/class.ilContainerSorting.php');
440 include_once(
'classes/class.ilLink.php');
441 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
443 global $ilAccess,
$ilErr,$rbacsystem,$tree,$ilUser;
448 $wizard_options->saveOwner($ilUser->getId());
449 $wizard_options->saveRoot($clone_source);
452 $wizard_options->initContainer($clone_source,
$ref_id);
454 foreach($options as $source_id => $option)
456 $wizard_options->addEntry($source_id,$option);
458 $wizard_options->read();
459 $wizard_options->storeTree($clone_source);
464 $ilLog->write(__METHOD__.
': Copy course in course...');
465 $ilLog->write(__METHOD__.
': Added mapping, source ID: '.$clone_source.
', target ID: '.
$ref_id);
466 $wizard_options->read();
467 $wizard_options->dropFirstNode();
468 $wizard_options->appendMapping($clone_source,
$ref_id);
475 include_once
'Services/WebServices/SOAP/classes/class.ilSoapClient.php';
478 $soap_client->setResponseTimeout(30);
479 $soap_client->enableWSDL(
true);
481 $ilLog->write(__METHOD__.
': Trying to call Soap client...');
482 if($soap_client->init())
484 $ilLog->write(__METHOD__.
': Calling soap clone method...');
485 $res = $soap_client->call(
'ilClone',array($new_session_id.
'::'.
$client_id, $copy_id));
489 $ilLog->write(__METHOD__.
': SOAP call failed. Calling clone method manually. ');
490 $wizard_options->disableSOAP();
491 $wizard_options->read();
492 include_once(
'./webservice/soap/include/inc.soap_functions.php');
524 $this->order_type = $a_value;
535 function getSubItems($a_admin_panel_enabled =
false, $a_include_side_block =
false,
538 global $objDefinition,
$ilBench, $tree, $ilObjDataCache, $ilUser, $rbacsystem,
542 if (is_array($this->items[(
int) $a_admin_panel_enabled][(
int) $a_include_side_block]) &&
545 return $this->items[(int) $a_admin_panel_enabled][(
int) $a_include_side_block];
549 $objects = $tree->getChilds($this->
getRefId(),
"title");
552 $all_obj_types = array();
553 $all_ref_ids = array();
554 $all_obj_ids = array();
556 include_once(
'Services/Container/classes/class.ilContainerSorting.php');
561 include_once
'./Modules/Session/classes/class.ilEventItems.php';
564 foreach ($objects as $key => $object)
566 if ($a_get_single > 0 && $object[
"child"] != $a_get_single)
572 if ($objDefinition->getDevMode($object[
"type"]) || $object[
"type"] ==
"adm"
573 || $object[
"type"] ==
"rolf")
579 if ($objDefinition->isInactivePlugin($object[
"type"]))
585 if (in_array($object[
'type'], array(
'file',
'fold',
'cat')))
587 include_once
'Modules/File/classes/class.ilObjFileAccess.php';
591 if (!$a_admin_panel_enabled)
600 if (in_array($object[
'ref_id'],$event_items))
606 if(!$a_include_side_block && $objDefinition->isSideBlock($object[
'type']))
612 $type = $objDefinition->getGroupOfObj($object[
"type"]);
615 $type = $object[
"type"];
620 $this->items[
$type][$key] = $object;
622 $all_obj_types[$object[
"type"]] = $object[
"type"];
623 $obj_ids_of_type[$object[
"type"]][] = $object[
"obj_id"];
624 $ref_ids_of_type[$object[
"type"]][] = $object[
"child"];
626 $all_ref_ids[] = $object[
"child"];
627 $all_obj_ids[] = $object[
"obj_id"];
629 $this->items[
"_all"][$key] = $object;
630 if ($object[
"type"] !=
"sess")
632 $this->items[
"_non_sess"][$key] = $object;
636 $this->items[(int) $a_admin_panel_enabled][(
int) $a_include_side_block]
637 = $sort->sortItems($this->items);
640 if (!self::$data_preloaded && is_array($this->items))
643 foreach ($all_obj_types as
$t)
646 include_once(
"./Services/AccessControl/classes/class.ilConditionHandler.php");
648 $obj_ids_of_type[$t]);
650 $class = $objDefinition->getClassName($t);
651 $location = $objDefinition->getLocation($t);
652 $full_class =
"ilObj".$class.
"Access";
653 include_once(
$location.
"/class.".$full_class.
".php");
654 call_user_func(array($full_class,
"_preloadData"),
655 $obj_ids_of_type[$t], $ref_ids_of_type[$t]);
659 $tree->preloadDeleted($all_ref_ids);
660 $tree->preloadDepthParent($all_ref_ids);
661 $ilObjDataCache->preloadReferenceCache($all_ref_ids,
false);
663 $rbacsystem->preloadRbacPaCache($all_ref_ids, $ilUser->getId());
664 include_once(
"./Services/Object/classes/class.ilObjectListGUI.php");
668 self::$data_preloaded =
true;
671 return $this->items[(int) $a_admin_panel_enabled][(
int) $a_include_side_block];
679 if (is_array($this->items[
"_all"]) && count($this->items[
"_all"]) > 0)
701 global $objDefinition;
703 if (empty($this->type_grps))
705 $this->type_grps = $objDefinition->getGroupedRepositoryObjectTypes($this->
getType());
707 return $this->type_grps;
718 if ($ilSetting->get(
"enable_cat_page_edit"))
733 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
747 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
765 include_once(
"./Services/Container/classes/class.ilContainerSortingSettings.php");
768 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");