27 require_once
"./classes/class.ilObject.php";
70 parent::__construct($a_id, $a_call_by_reference);
82 $cont_dir = $webspace_dir.
"/container_data";
83 if (!is_dir($cont_dir))
87 $obj_dir = $cont_dir.
"/obj_".$this->
getId();
88 if (!is_dir($obj_dir))
152 $this->hiddenfilesfound = $a_hiddenfilesfound;
170 return $this->style_id;
178 $this->style_id = $a_style_id;
193 $q =
"SELECT * FROM container_settings WHERE ".
194 " id = ".$ilDB->quote($a_id ,
'integer').
" AND ".
195 " keyword = ".$ilDB->quote($a_keyword ,
'text');
196 $set = $ilDB->query($q);
199 return $rec[
"value"];
206 $query =
"DELETE FROM container_settings WHERE ".
207 "id = ".$ilDB->quote($a_id,
'integer').
" ".
208 "AND keyword = ".$ilDB->quote($a_keyword,
'text');
211 $query =
"INSERT INTO container_settings (id, keyword, value) VALUES (".
212 $ilDB->quote($a_id ,
'integer').
", ".
213 $ilDB->quote($a_keyword ,
'text').
", ".
214 $ilDB->quote($a_value ,
'text').
237 $file_name = $cont_dir.
"/icon_".$a_size.
".gif";
251 function saveIcons($a_big_icon, $a_small_icon, $a_tiny_icon)
259 $big_geom = $this->ilias->getSetting(
"custom_icon_big_width").
"x".
260 $this->ilias->getSetting(
"custom_icon_big_height");
261 $big_file_name = $cont_dir.
"/icon_big.gif";
263 if (is_file($a_big_icon))
270 if (is_file($cont_dir.
"/icon_big.gif"))
280 $small_geom = $this->ilias->getSetting(
"custom_icon_small_width").
"x".
281 $this->ilias->getSetting(
"custom_icon_small_height");
282 $small_file_name = $cont_dir.
"/icon_small.gif";
284 if (is_file($a_small_icon))
290 if (is_file($cont_dir.
"/icon_small.gif"))
300 $tiny_geom = $this->ilias->getSetting(
"custom_icon_tiny_width").
"x".
301 $this->ilias->getSetting(
"custom_icon_tiny_height");
302 $tiny_file_name = $cont_dir.
"/icon_tiny.gif";
304 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';
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, $ilObjDataCache, $ilUser, $rbacsystem;
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"];
600 $this->items[
$type][$key] = $object;
602 $obj_ids_of_type[
$type][] = $object[
"obj_id"];
603 $ref_ids_of_type[
$type][] = $object[
"child"];
604 $all_ref_ids[] = $object[
"child"];
605 $all_obj_ids[] = $object[
"obj_id"];
607 $this->items[
"_all"][$key] = $object;
608 if ($object[
"type"] !=
"sess")
610 $this->items[
"_non_sess"][$key] = $object;
614 $this->items[(int) $a_admin_panel_enabled][(
int) $a_include_side_block]
615 = $sort->sortItems($this->items);
618 if (!self::$data_preloaded && is_array($this->items))
621 foreach ($this->items as
$t => $items)
623 if (!in_array(
$t, array(
"_all",
"_non_sess")) && !is_numeric(
$t))
626 include_once(
"./classes/class.ilConditionHandler.php");
628 $obj_ids_of_type[
$t]);
633 $tree->preloadDeleted($all_ref_ids);
634 $tree->preloadDepthParent($all_ref_ids);
635 $ilObjDataCache->preloadReferenceCache($all_ref_ids,
false);
637 $rbacsystem->preloadRbacPaCache($all_ref_ids, $ilUser->getId());
639 self::$data_preloaded =
true;
642 return $this->items[(int) $a_admin_panel_enabled][(
int) $a_include_side_block];
650 if (is_array($this->items[
"_all"]) && count($this->items[
"_all"]) > 0)
672 global $objDefinition;
674 if (empty($this->type_grps))
676 $this->type_grps = $objDefinition->getGroupedRepositoryObjectTypes($this->
getType());
678 return $this->type_grps;
689 if ($ilSetting->get(
"enable_cat_page_edit"))
704 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
718 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
736 include_once(
"./Services/Container/classes/class.ilContainerSortingSettings.php");
739 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");