104 function ilObjectGUI($a_data, $a_id = 0, $a_call_by_reference =
true, $a_prepare_output =
true)
108 $this->tabs_gui =& $ilTabs;
113 $ilErr->setErrorHandling(PEAR_ERROR_CALLBACK,array($ilErr,
'errorHandler'));
126 $params = array(
"ref_id");
128 if (!$a_call_by_reference)
130 $params = array(
"ref_id",
"obj_id");
133 $this->ctrl->saveParameter($this, $params);
136 $this->tree =&
$tree;
137 $this->formaction = array();
138 $this->return_location = array();
139 $this->target_frame = array();
141 $this->sub_objects =
"";
143 $this->data = $a_data;
145 $this->call_by_reference = $a_call_by_reference;
146 $this->prepare_output = $a_prepare_output;
147 $this->creation_mode =
false;
149 $this->ref_id = ($this->call_by_reference) ? $this->
id :
$_GET[
"ref_id"];
150 $this->obj_id = ($this->call_by_reference) ?
$_GET[
"obj_id"] : $this->
id;
154 $this->link_params =
"ref_id=".$this->ref_id;
161 if (is_object($this->
object))
163 if ($this->call_by_reference && $this->ref_id =
$_GET[
"ref_id"])
165 $this->ctrl->setContext($this->object->getId(),
166 $this->
object->getType());
174 if ($a_prepare_output)
188 $next_class = $this->ctrl->getNextClass($this);
189 $cmd = $this->ctrl->getCmd();
214 return $this->call_by_reference;
225 $this->creation_mode = $a_mode;
233 return $this->creation_mode;
242 if ($this->call_by_reference)
244 $this->
object =& $this->ilias->obj_factory->getInstanceByRefId($this->
id);
248 $this->
object =& $this->ilias->obj_factory->getInstanceByObjId($this->
id);
258 global $ilLocator,
$tpl;
260 $this->tpl->getStandardTemplate();
262 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
292 $class_name = $this->objDefinition->getClassName($obj_type);
293 $class = strtolower(
"ilObj".$class_name.
"GUI");
294 $class_path = $this->ctrl->lookupClassPath($class);
295 include_once($class_path);
296 $class_name = $this->ctrl->getClassForClasspath($class_path);
298 $this->parent_gui_obj =
new $class_name(
"",
$_GET[
"ref_id"],
true,
false);
299 $this->parent_gui_obj->setTitleAndDescription();
311 require_once
'Services/WebDAV/classes/class.ilDAVServer.php';
313 $this->ilias->account->getId() != ANONYMOUS_USER_ID)
329 $this->tpl->setTitle($this->object->getPresentationTitle());
330 $this->tpl->setDescription($this->object->getLongDescription());
331 $this->tpl->setTitleIcon(
ilUtil::getImagePath(
"icon_".$this->object->getType().
"_b.gif"), $this->lng->txt(
"obj_" . $this->object->getType()));
338 if ($this->object->getRefId() ==
"")
343 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
345 if ($this->object->getRefId() != ROOT_FOLDER_ID &&
346 $this->
object->getRefId() != SYSTEM_FOLDER_ID)
348 $par_id = $tree->getParentId($this->object->getRefId());
350 $class_name = $objDefinition->getClassName($obj_type);
351 $class = strtolower(
"ilObj".$class_name.
"GUI");
352 $this->ctrl->setParameterByClass($class,
"ref_id", $par_id);
353 $tpl->setUpperIcon($this->ctrl->getLinkTargetByClass($class,
"view"));
354 $this->ctrl->clearParametersByClass($class);
357 else if ($this->object->getRefId() == ROOT_FOLDER_ID)
359 $this->ctrl->setParameterByClass(
"iladministrationgui",
"ref_id",
"");
360 $this->ctrl->setParameterByClass(
"iladministrationgui",
"admin_mode",
"settings");
361 $tpl->setUpperIcon($this->ctrl->getLinkTargetByClass(
"iladministrationgui",
"frameset"),
363 $this->ctrl->clearParametersByClass(
"iladministrationgui");
368 if ($this->object->getRefId() != ROOT_FOLDER_ID &&
369 $this->
object->getRefId() != SYSTEM_FOLDER_ID &&
370 $_GET[
"obj_id"] ==
"")
372 if (defined(
"ILIAS_MODULE"))
376 $par_id = $tree->getParentId($this->object->getRefId());
377 $tpl->setUpperIcon($prefix.
"repository.php?cmd=frameset&ref_id=".$par_id,
387 if ($this->object->getRefId() ==
"")
392 $tpl->setMountWebfolderIcon($this->object->getRefId());
403 $this->
getTabs($this->tabs_gui);
422 if (
$_GET[
"admin_mode"] ==
"repository")
424 $this->ctrl->setParameterByClass(
"iladministrationgui",
"admin_mode",
"settings");
425 $tabs_gui->setBackTarget($this->lng->txt(
"administration"),
426 $this->ctrl->getLinkTargetByClass(
"iladministrationgui",
"frameset"),
428 $this->ctrl->setParameterByClass(
"iladministrationgui",
"admin_mode",
"repository");
431 if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
433 $tabs_gui->addTarget(
"view",
434 $this->ctrl->getLinkTarget($this,
"view"), array(
"",
"view"), get_class($this));
437 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
439 $tabs_gui->addTarget(
"perm_settings",
440 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
"",
"ilpermissiongui");
443 if ($this->tree->getSavedNodeData($this->object->getRefId()))
445 $tabs_gui->addTarget(
"trash",
446 $this->ctrl->getLinkTarget($this,
"trash"),
"trash", get_class($this));
465 if (is_array($a_actions))
467 foreach ($a_actions as $name =>
$lng)
469 $this->actions[$name] = array(
"name" => $name,
"lng" =>
$lng);
486 if (is_array($a_sub_objects))
488 foreach ($a_sub_objects as $name => $options)
490 $this->sub_objects[$name] = array(
"name" => $name,
"max" => $options[
"max"]);
495 $this->sub_objects =
"";
509 global $ilLocator,
$tpl;
511 if ($this->omit_locator)
521 : $this->object->getRefId();
522 $ilLocator->addRepositoryItems(
$ref_id);
524 if(!$this->creation_mode)
530 if (
$_GET[
"admin_mode"] ==
"" &&
531 strtolower($this->ctrl->getCmdClass()) ==
"ilobjrolegui")
533 $this->ctrl->setParameterByClass(
"ilobjrolegui",
534 "rolf_ref_id",
$_GET[
"rolf_ref_id"]);
535 $this->ctrl->setParameterByClass(
"ilobjrolegui",
536 "obj_id",
$_GET[
"obj_id"]);
537 $ilLocator->addItem($this->lng->txt(
"role"),
538 $this->ctrl->getLinkTargetByClass(array(
"ilpermissiongui",
539 "ilobjrolegui"),
"perm"));
555 $this->omit_locator = $a_omit;
566 if (
$_GET[
"admin_mode"] ==
"settings")
568 $ilLocator->addItem($this->lng->txt(
"administration"),
569 $this->ctrl->getLinkTargetByClass(
"iladministrationgui",
"frameset"),
571 if ($this->object->getRefId() != SYSTEM_FOLDER_ID)
573 $ilLocator->addItem($this->object->getTitle(),
574 $this->ctrl->getLinkTarget($this,
"view"));
579 $this->ctrl->setParameterByClass(
"iladministrationgui",
581 $this->ctrl->setParameterByClass(
"iladministrationgui",
582 "admin_mode",
"settings");
586 $this->ctrl->clearParametersByClass(
"iladministrationgui");
587 $ilLocator->addAdministrationItems();
599 global $rbacsystem,
$log, $ilAppEventHandler;
602 if (!isset($_POST[
"trash_id"]))
604 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
607 foreach ($_POST[
"trash_id"] as $id)
609 $obj_data =& $this->ilias->obj_factory->getInstanceByRefId($id);
611 if (!$rbacsystem->checkAccess(
'create',
$_GET[
"ref_id"],$obj_data->getType()))
617 if (count($no_create))
619 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_paste").
" ".
620 implode(
',',$no_create),$this->ilias->error_obj->MESSAGE);
623 $affected_ids = array();
625 foreach ($_POST[
"trash_id"] as $id)
627 $affected_ids[$id] = $id;
632 $saved_tree =
new ilTree(-(
int)$id);
633 $saved_tree->deleteTree($saved_tree->getNodeData($id));
636 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
639 global $ilUser,
$tree;
641 $node_data = $saved_tree->getNodeData($id);
642 $saved_tree->deleteTree($node_data);
645 $node_data = $tree->getNodeData($id);
646 $parent_data = $tree->getParentNodeData($node_data[
'ref_id']);
648 $parent_data[
'obj_id']);
656 foreach ($affected_ids as $id)
659 $ilAppEventHandler->raise(
"Services/Object",
"undelete",
667 $this->ctrl->redirect($this,
"view");
681 global $rbacadmin, $rbacreview,
$log;
683 $this->tree->insertNode($a_source_id,$a_dest_id,
IL_LAST_NODE,
true);
684 $a_affected_ids[$a_source_id] = $a_source_id;
687 $log->write(
"ilObjectGUI::insertSavedNodes(), restored ref_id $a_source_id from trash");
690 $parentRoles = $rbacreview->getParentRoleIds($a_dest_id);
691 $obj =& $this->ilias->obj_factory->getInstanceByRefId($a_source_id);
693 foreach ($parentRoles as $parRol)
695 $ops = $rbacreview->getOperationsOfRole($parRol[
"obj_id"], $obj->getType(), $parRol[
"parent"]);
696 $rbacadmin->grantPermission($parRol[
"obj_id"],$ops,$a_source_id);
699 $saved_tree =
new ilTree($a_tree_id);
700 $childs = $saved_tree->getChilds($a_source_id);
702 foreach ($childs as $child)
704 $this->
insertSavedNodes($child[
"child"],$a_source_id,$a_tree_id,$a_affected_ids);
719 global $ilAppEventHandler;
721 include_once
'./payment/classes/class.ilPaymentObject.php';
723 global $rbacsystem, $rbacadmin,
$log;
724 global $ilUser,
$tree;
733 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
739 if($this->tree->isDeleted($id))
741 $log->write(__METHOD__.
': Object with ref_id: '.$id.
' already deleted.');
743 $this->ctrl->returnToParent($this);
747 $node_data = $this->tree->getNodeData($id);
748 $subtree_nodes = $this->tree->getSubTree($node_data);
750 $all_node_data[] = $node_data;
751 $all_subtree_nodes[] = $subtree_nodes;
754 foreach ($subtree_nodes as $node)
756 if($node[
'type'] ==
'rolf')
760 if (!$rbacsystem->checkAccess(
'delete',$node[
"child"]))
762 $not_deletable[] = $node[
"child"];
763 $perform_delete =
false;
767 $buyable[] = $node[
'child'];
768 $perform_delete =
false;
774 if (count($not_deletable))
776 $not_deletable = implode(
',',$not_deletable);
777 session_unregister(
"saved_post");
778 ilUtil::sendInfo($this->lng->txt(
"msg_no_perm_delete").
" ".$not_deletable.
"<br/>".$this->lng->txt(
"msg_cancel"),
true);
780 $this->ctrl->returnToParent($this);
785 foreach($buyable as $id)
789 $titles[] = $tmp_object->getTitle();
791 $title_str = implode(
',',$titles);
793 ilUtil::sendInfo($this->lng->txt(
'msg_obj_not_deletable_sold').
' '.$title_str,
true);
802 if (!$all_node_data[0][
"type"])
805 if ($rbacsystem->checkAccess(
'delete',
$_GET[
"ref_id"]))
809 $obj =& $this->ilias->obj_factory->getInstanceByObjId($id);
813 $log->write(
"ilObjectGUI::confirmedDeleteObject(), deleted obj_id ".$obj->getId().
814 ", type: ".$obj->getType().
", title: ".$obj->getTitle());
820 ilUtil::sendInfo($this->lng->txt(
"no_perm_delete").
"<br/>".$this->lng->txt(
"msg_cancel"),
true);
821 $this->ctrl->returnToParent($this);
827 $affected_ids = array();
830 if($this->tree->isDeleted($id))
832 $log->write(__METHOD__.
': Object with ref_id: '.$id.
' already deleted.');
834 $this->ctrl->returnToParent($this);
838 $subnodes = $this->tree->getSubtree($this->tree->getNodeData($id));
840 foreach ($subnodes as $subnode)
842 $rbacadmin->revokePermission($subnode[
"child"]);
846 $affected_ids[$subnode[
"child"]] = $subnode[
"child"];
855 include_once(
'./Services/WebServices/ECS/classes/class.ilECSContentWriter.php');
858 if(!$this->tree->saveSubTree($id,
true))
860 $log->write(__METHOD__.
': Object with ref_id: '.$id.
' already deleted.');
862 $this->ctrl->returnToParent($this);
866 $log->write(
"ilObjectGUI::confirmedDeleteObject(), moved ref_id ".$id.
872 $affected_ids[$id] = $id;
879 foreach ($affected_ids as $aid)
881 $ilAppEventHandler->raise(
"Services/Object",
"toTrash",
889 if ($this->ilias->getSetting(
'enable_trash'))
894 $this->ctrl->returnToParent($this);
898 $_POST[
"trash_id"] =
$_SESSION[
"saved_post"];
911 session_unregister(
"saved_post");
915 $this->ctrl->returnToParent($this);
926 global $rbacsystem,
$log, $ilAppEventHandler;
929 if (!isset($_POST[
"trash_id"]))
931 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
935 $affected_ids = array();
938 foreach ($_POST[
"trash_id"] as $id)
941 $saved_tree =
new ilTree(-(
int)$id);
942 $node_data = $saved_tree->getNodeData($id);
943 $subtree_nodes = $saved_tree->getSubTree($node_data);
946 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
950 global $ilUser,
$tree;
951 $parent_data = $tree->getParentNodeData($node_data[
'ref_id']);
953 $parent_data[
'obj_id']);
958 $checked[] = -(int) $id;
963 foreach ($subtree_nodes as $node)
965 if(!$node_obj =& $this->ilias->obj_factory->getInstanceByRefId($node[
"ref_id"],
false))
971 $log->write(
"ilObjectGUI::removeFromSystemObject(), delete obj_id: ".$node_obj->getId().
972 ", ref_id: ".$node_obj->getRefId().
", type: ".$node_obj->getType().
", ".
973 "title: ".$node_obj->getTitle());
974 $affected_ids[$node[
"ref_id"]] = array(
"ref_id" => $node[
"ref_id"],
975 "obj_id" => $node_obj->getId(),
"type" => $node_obj->getType());
982 #$this->tree->deleteTree($node_data);
984 $saved_tree->deleteTree($node_data);
987 $log->write(
"ilObjectGUI::removeFromSystemObject(), deleted tree, tree_id: ".$node_data[
"tree"].
988 ", child: ".$node_data[
"child"]);
993 foreach ($affected_ids as $aid)
995 $ilAppEventHandler->raise(
"Services/Object",
"delete",
996 array(
"obj_id" => $aid[
"obj_id"],
997 "ref_id" => $aid[
"ref_id"],
998 "type" => $aid[
"type"]));
1003 $this->ctrl->returnToParent($this);
1021 $q =
"SELECT tree FROM tree WHERE parent= ".
1022 $ilDB->quote($a_node_id).
" AND tree < 0";
1024 $r = $this->ilias->db->query($q);
1029 if (!in_array($row->tree,$a_checked))
1031 $deleted_tree =
new ilTree($row->tree);
1032 $a_checked[] = $row->tree;
1034 $row->tree = $row->tree * (-1);
1035 $del_node_data = $deleted_tree->getNodeData($row->tree);
1036 $del_subtree_nodes = $deleted_tree->getSubTree($del_node_data);
1038 $this->
removeDeletedNodes($row->tree,$a_checked, $a_delete_objects, $a_affected_ids);
1040 if ($a_delete_objects)
1042 foreach ($del_subtree_nodes as $node)
1044 $node_obj =& $this->ilias->obj_factory->getInstanceByRefId($node[
"ref_id"]);
1047 $log->write(
"ilObjectGUI::removeDeletedNodes(), delete obj_id: ".$node_obj->getId().
1048 ", ref_id: ".$node_obj->getRefId().
", type: ".$node_obj->getType().
", ".
1049 "title: ".$node_obj->getTitle());
1050 $a_affected_ids[$node[
"ref_id"]] = array(
"ref_id" => $node[
"ref_id"],
1051 "obj_id" => $node_obj->getId(),
"type" => $node_obj->getType());
1053 $node_obj->delete();
1058 $this->tree->deleteTree($del_node_data);
1061 $log->write(
"ilObjectGUI::removeDeletedNodes(), deleted tree, tree_id: ".$del_node_data[
"tree"].
1062 ", child: ".$del_node_data[
"child"]);
1078 $new_type = $_POST[
"new_type"] ? $_POST[
"new_type"] :
$_GET[
"new_type"];
1080 if (!$rbacsystem->checkAccess(
"create",
$_GET[
"ref_id"], $new_type))
1082 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
1088 $data[
"fields"] = array();
1095 $this->tpl->setCurrentBlock(
"img");
1096 $this->tpl->setVariable(
"TYPE_IMG",
1098 $this->tpl->setVariable(
"ALT_IMG",
1099 $this->lng->txt(
"obj_".$new_type));
1100 $this->tpl->parseCurrentBlock();
1102 foreach (
$data[
"fields"] as $key => $val)
1104 $this->tpl->setVariable(
"TXT_".strtoupper($key), $this->lng->txt($key));
1105 $this->tpl->setVariable(strtoupper($key), $val);
1107 if ($this->prepare_output)
1109 $this->tpl->parseCurrentBlock();
1112 $this->ctrl->setParameter($this,
"new_type", $new_type);
1113 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this,
"save"));
1114 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt($new_type.
"_new"));
1115 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
1116 $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt($new_type.
"_add"));
1117 $this->tpl->setVariable(
"CMD_SUBMIT",
"save");
1118 $this->tpl->setVariable(
"TARGET", $this->
getTargetFrame(
"save"));
1119 $this->tpl->setVariable(
"TXT_REQUIRED_FLD", $this->lng->txt(
"required_field"));
1131 session_unregister(
"saved_post");
1142 $this->ctrl->returnToParent($this);
1160 $new_type = $_POST[
"new_type"] ? $_POST[
"new_type"] :
$_GET[
"new_type"];
1163 if (!$rbacsystem->checkAccess(
"create",
$_GET[
"ref_id"], $new_type))
1165 $this->ilias->raiseError($this->lng->txt(
"no_create_permission"), $this->ilias->error_obj->MESSAGE);
1168 $location = $objDefinition->getLocation($new_type);
1171 $class_name =
"ilObj".$objDefinition->getClassName($new_type);
1172 include_once(
$location.
"/class.".$class_name.
".php");
1173 $newObj =
new $class_name();
1174 $newObj->setType($new_type);
1178 $newObj->createReference();
1179 $newObj->putInTree(
$_GET[
"ref_id"]);
1180 $newObj->setPermissions(
$_GET[
"ref_id"]);
1197 if (!$rbacsystem->checkAccess(
'write',
$_GET[
"ref_id"], $_POST[
"new_type"]))
1199 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->WARNING);
1226 if (!$rbacsystem->checkAccess(
"write", $this->ref_id))
1228 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
1258 foreach ($fields as $key => $val)
1260 $this->tpl->setVariable(
"TXT_".strtoupper($key), $this->lng->txt($key));
1261 $this->tpl->setVariable(strtoupper($key), $val);
1266 if (!$this->call_by_reference)
1268 $this->ctrl->setParameter($this,
"obj_id", $this->obj_id);
1271 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this,
"update"));
1272 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt($this->object->getType().
"_edit"));
1273 $this->tpl->setVariable(
"TARGET", $this->
getTargetFrame(
"update"));
1274 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
1275 $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
1276 $this->tpl->setVariable(
"CMD_SUBMIT",
"update");
1277 $this->tpl->setVariable(
"TXT_REQUIRED_FLD", $this->lng->txt(
"required_field"));
1291 $this->update = $this->
object->update();
1300 $this->ctrl->redirect($this);
1310 include_once
'./classes/class.ilPermissionGUI.php';
1314 $this->ctrl->current_node = 1;
1315 $this->ctrl->setCmd(
'perm');
1316 $ret =& $this->ctrl->forwardCommand($perm_gui);
1331 if ($this->formaction[$a_cmd] !=
"")
1333 return $this->formaction[$a_cmd];
1337 return $a_formaction;
1351 $this->formaction[$a_cmd] = $a_formaction;
1363 if ($this->return_location[$a_cmd] !=
"")
1365 return $this->return_location[$a_cmd];
1383 $this->return_location[$a_cmd] = $a_location;
1395 if ($this->target_frame[$a_cmd] !=
"")
1397 return $this->target_frame[$a_cmd];
1399 elseif (!empty($a_target_frame))
1401 return "target=\"".$a_target_frame.
"\"";
1418 $this->target_frame[$a_cmd] =
"target=\"".$a_target_frame.
"\"";
1428 include_once
'./classes/class.ilPermissionGUI.php';
1432 $this->ctrl->current_node = 1;
1433 $this->ctrl->setCmd(
'permSave');
1434 $ret =& $this->ctrl->forwardCommand($perm_gui);
1444 $ilBench->start(
"Explorer",
"setOutput_isVisible");
1445 $visible = $rbacsystem->checkAccess(
'visible,read',$a_ref_id);
1447 if ($visible && $a_type ==
'crs') {
1449 if($crs_id = $tree->checkForParentType($a_ref_id,
'crs'))
1451 if(!$rbacsystem->checkAccess(
'write',$crs_id))
1456 if(!$tmp_obj->isActivated())
1461 if(($crs_id != $a_ref_id) and $tmp_obj->isArchived())
1466 include_once
"./course/classes/class.ilCourseItems.php";
1476 $ilBench->stop(
"Explorer",
"setOutput_isVisible");
1489 include_once
"./Services/Table/classes/class.ilTableGUI.php";
1492 $this->tpl->addBlockfile(
"ADM_CONTENT",
"adm_content",
"tpl.table.html");
1494 $this->tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.obj_tbl_rows.html");
1498 if (!$this->call_by_reference)
1500 $this->ctrl->setParameter($this,
"obj_id", $this->obj_id);
1502 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
1508 $tbl->setTitle($this->object->getTitle(),
"icon_".$this->object->getType().
".gif",
1509 $this->lng->txt(
"obj_".$this->object->getType()));
1510 $tbl->setHelp(
"tbl_help.php",
"icon_help.gif",$this->lng->txt(
"help"));
1512 foreach ($this->data[
"cols"] as $val)
1514 $header_names[] = $this->lng->txt($val);
1517 $tbl->setHeaderNames($header_names);
1521 $header_params = $this->ctrl->getParameterArray($this,
"view");
1522 $tbl->setHeaderVars($this->data[
"cols"],$header_params);
1523 $tbl->setColumnWidth(array(
"15",
"15",
"75%",
"25%"));
1526 $tbl->setOrderColumn(
$_GET[
"sort_by"]);
1527 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
1528 $tbl->setLimit(
$_GET[
"limit"]);
1529 $tbl->setOffset(
$_GET[
"offset"]);
1530 $tbl->setMaxCount($this->maxcount);
1532 $this->tpl->setVariable(
"COLUMN_COUNTS",count($this->data[
"cols"]));
1535 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
1537 if (!empty($this->data[
"data"][0]))
1544 for ($i=0; $i < count($this->data[
"data"]); $i++)
1546 $data = $this->data[
"data"][$i];
1547 $ctrl = $this->data[
"ctrl"][$i];
1563 if (!$this->objDefinition->hasCheckbox($ctrl[
"type"]) or $ctrl[
"obj_id"] == SYSTEM_ROLE_ID or $ctrl[
"obj_id"] == SYSTEM_USER_ID or $ctrl[
"obj_id"] == ANONYMOUS_ROLE_ID)
1565 $this->tpl->touchBlock(
"empty_cell");
1570 if ($ctrl[
"type"] ==
"usr" or $ctrl[
"type"] ==
"role" or $ctrl[
"type"] ==
"rolt")
1572 $link_id = $ctrl[
"obj_id"];
1576 $link_id = $ctrl[
"ref_id"];
1580 $this->ids[] = $link_id;
1582 $this->tpl->setCurrentBlock(
"checkbox");
1583 $this->tpl->setVariable(
"CHECKBOX_ID", $link_id);
1584 $this->tpl->setVariable(
"CSS_ROW", $css_row);
1585 $this->tpl->parseCurrentBlock();
1588 $this->tpl->setCurrentBlock(
"table_cell");
1589 $this->tpl->setVariable(
"CELLSTYLE",
"tblrow1");
1590 $this->tpl->parseCurrentBlock();
1592 foreach (
$data as $key => $val)
1596 $class_name = $this->objDefinition->getClassName($obj_type);
1597 $class = strtolower(
"ilObj".$class_name.
"GUI");
1598 $this->ctrl->setParameterByClass($class,
"ref_id", $ctrl[
"ref_id"]);
1599 $this->ctrl->setParameterByClass($class,
"obj_id", $ctrl[
"obj_id"]);
1600 $link = $this->ctrl->getLinkTargetByClass($class,
"view");
1616 if ($key ==
"name" || $key ==
"title")
1618 $name_field = explode(
"#separator#",$val);
1621 if ($key ==
"title" || $key ==
"name" || $key ==
"type")
1623 $this->tpl->setCurrentBlock(
"begin_link");
1624 $this->tpl->setVariable(
"LINK_TARGET", $link);
1626 $this->tpl->parseCurrentBlock();
1627 $this->tpl->touchBlock(
"end_link");
1631 if (($key ==
"title" || $key ==
"name") and is_array((
$_SESSION[
"clipboard"])))
1634 if (in_array($ctrl[
"ref_id"],
$_SESSION[
"clipboard"][
"ref_ids"]))
1639 $name_field[0] =
"<del>".$name_field[0].
"</del>";
1643 $name_field[0] =
"<font color=\"green\">+</font> ".$name_field[0];
1647 $name_field[0] =
"<font color=\"black\"><</font> ".$name_field[0];
1653 $this->tpl->setCurrentBlock(
"text");
1660 if ($key ==
"name" || $key ==
"title")
1662 $this->tpl->setVariable(
"TEXT_CONTENT", $name_field[0]);
1664 $this->tpl->setCurrentBlock(
"subtitle");
1665 $this->tpl->setVariable(
"DESC",
ilUtil::shortenText($name_field[1],MAXLENGTH_OBJ_DESC,
true));
1666 $this->tpl->parseCurrentBlock();
1670 $this->tpl->setVariable(
"TEXT_CONTENT", $val);
1673 $this->tpl->parseCurrentBlock();
1675 $this->tpl->setCurrentBlock(
"table_cell");
1676 $this->tpl->parseCurrentBlock();
1680 $this->tpl->setCurrentBlock(
"tbl_content");
1681 $this->tpl->setVariable(
"CSS_ROW", $css_row);
1682 $this->tpl->parseCurrentBlock();
1687 $tbl->disable(
"header");
1688 $tbl->disable(
"footer");
1690 $this->tpl->setCurrentBlock(
"text");
1696 $this->tpl->setVariable(
"CSS_ROW",
"tblrow1");
1697 $this->tpl->setVariable(
"TEXT_CONTENT",
1699 $this->tpl->parseCurrentBlock();
1717 if (!$rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
1719 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
1722 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1731 $this->objectList = array();
1732 $this->data[
"data"] = array();
1733 $this->data[
"ctrl"] = array();
1734 $this->data[
"cols"] = array(
"",
"type",
"title",
"last_change");
1736 $childs = $this->tree->getChilds(
$_GET[
"ref_id"],
$_GET[
"order"],
$_GET[
"direction"]);
1738 foreach ($childs as $key => $val)
1741 if (!$rbacsystem->checkAccess(
"visible",$val[
"ref_id"]))
1747 if ($this->objDefinition->getDevMode($val[
"type"]))
1753 if ($val[
"type"] ==
"adm")
1759 $this->data[
"data"][] = array(
1760 "type" => $val[
"type"],
1761 "title" => $val[
"title"].
"#separator#".$val[
"desc"],
1763 "last_change" => $val[
"last_update"],
1764 "ref_id" => $val[
"ref_id"]
1771 $this->maxcount = count($this->data[
"data"]);
1774 $this->data[
"data"] = array_slice($this->data[
"data"],
$_GET[
"offset"],
$_GET[
"limit"]);
1777 foreach ($this->data[
"data"] as $key => $val)
1779 $this->data[
"ctrl"][$key] = array(
1780 "type" => $val[
"type"],
1781 "ref_id" => $val[
"ref_id"]
1784 unset($this->data[
"data"][$key][
"ref_id"]);
1785 $this->data[
"data"][$key][
"last_change"] =
ilFormat::formatDate($this->data[
"data"][$key][
"last_change"]);
1800 if (
$_GET[
"item_ref_id"] !=
"")
1802 $_POST[
"id"] = array(
$_GET[
"item_ref_id"]);
1805 if (!isset($_POST[
"id"]))
1807 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
1814 $this->data[
"cols"] = array(
"type",
"title",
"last_change");
1816 foreach ($_POST[
"id"] as $id)
1822 $obj_data =& $this->ilias->obj_factory->getInstanceByRefId($id);
1829 $this->data[
"data"][
"$id"] = array(
1830 "type" => $obj_data->getType(),
1831 "title" => $obj_data->getTitle().
"#separator#".$obj_data->getDescription().
" ",
1832 "last_update" => $obj_data->getLastUpdateDate()
1836 $this->data[
"buttons"] = array(
"confirmedDelete" => $this->lng->txt(
"confirm"),
1837 "cancelDelete" => $this->lng->txt(
"cancel"));
1843 $msg = $this->lng->txt(
"info_delete_sure");
1845 if (!$this->ilias->getSetting(
'enable_trash'))
1847 $msg .=
"<br/>".$this->lng->txt(
"info_delete_warning_no_trash");
1853 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
1856 foreach ($this->data[
"cols"] as $key)
1858 $this->tpl->setCurrentBlock(
"table_header");
1859 $this->tpl->setVariable(
"TEXT",$this->lng->txt($key));
1860 $this->tpl->parseCurrentBlock();
1867 foreach ($this->data[
"data"] as $key => $value)
1870 foreach ($value as $key => $cell_data)
1872 $this->tpl->setCurrentBlock(
"table_cell");
1879 elseif ($key ==
"title")
1881 $name_field = explode(
"#separator#",$cell_data);
1883 $this->tpl->setVariable(
"TEXT_CONTENT",
"<b>".$name_field[0].
"</b>");
1885 $this->tpl->setCurrentBlock(
"subtitle");
1886 $this->tpl->setVariable(
"DESC", $name_field[1]);
1887 $this->tpl->parseCurrentBlock();
1888 $this->tpl->setCurrentBlock(
"table_cell");
1892 $this->tpl->setVariable(
"TEXT_CONTENT",$cell_data);
1895 $this->tpl->parseCurrentBlock();
1898 $this->tpl->setCurrentBlock(
"table_row");
1900 $this->tpl->parseCurrentBlock();
1906 foreach ($this->data[
"buttons"] as $name => $value)
1908 $this->tpl->setCurrentBlock(
"operation_btn");
1910 $this->tpl->setVariable(
"BTN_NAME",$name);
1911 $this->tpl->setVariable(
"BTN_VALUE",$value);
1912 $this->tpl->parseCurrentBlock();
1923 $objects = $this->tree->getSavedNodeData(
$_GET[
"ref_id"]);
1925 if (count($objects) == 0)
1928 $this->data[
"empty"] =
true;
1932 $this->data[
"empty"] =
false;
1933 $this->data[
"cols"] = array(
"",
"type",
"title",
"last_change");
1935 foreach ($objects as $obj_data)
1937 $this->data[
"data"][
"$obj_data[child]"] = array(
1939 "type" => $obj_data[
"type"],
1940 "title" => $obj_data[
"title"].
"#separator#".$obj_data[
"desc"],
1941 "last_update" => $obj_data[
"last_update"]
1945 $this->data[
"buttons"] = array(
"undelete" => $this->lng->txt(
"btn_undelete"),
1946 "removeFromSystem" => $this->lng->txt(
"btn_remove_system"));
1951 if ($this->data[
"empty"] ==
true)
1963 $this->tpl->setVariable(
"FORMACTION",
1964 $this->ctrl->getFormAction($this));
1965 $this->tpl->setVariable(
"TPLPATH",$this->tpl->tplPath);
1969 foreach ($this->data[
"cols"] as $key)
1971 $this->tpl->setCurrentBlock(
"table_header");
1972 $this->tpl->setVariable(
"TEXT",$this->lng->txt($key));
1973 $this->tpl->parseCurrentBlock();
1980 foreach ($this->data[
"data"] as $key1 => $value)
1983 foreach ($value as $key2 => $cell_data)
1985 $this->tpl->setCurrentBlock(
"table_cell");
1987 if ($key2 ==
"checkbox")
1989 $this->tpl->setVariable(
"TEXT_CONTENT",ilUtil::formCheckBox(0,
"trash_id[]",$key1));
1992 elseif ($key2 ==
"type")
1996 elseif ($key2 ==
"title")
1998 $name_field = explode(
"#separator#",$cell_data);
2000 $this->tpl->setVariable(
"TEXT_CONTENT",
"<b>".$name_field[0].
"</b>");
2002 $this->tpl->setCurrentBlock(
"subtitle");
2003 $this->tpl->setVariable(
"DESC", $name_field[1]);
2004 $this->tpl->parseCurrentBlock();
2005 $this->tpl->setCurrentBlock(
"table_cell");
2009 $this->tpl->setVariable(
"TEXT_CONTENT",$cell_data);
2012 $this->tpl->parseCurrentBlock();
2015 $this->tpl->setCurrentBlock(
"table_row");
2017 $this->tpl->parseCurrentBlock();
2023 foreach ($this->data[
"buttons"] as $name => $value)
2025 $this->tpl->setCurrentBlock(
"operation_btn");
2026 $this->tpl->setVariable(
"BTN_NAME",$name);
2027 $this->tpl->setVariable(
"BTN_VALUE",$value);
2028 $this->tpl->parseCurrentBlock();
2041 include_once
'./classes/class.ilPermissionGUI.php';
2045 $this->ctrl->current_node = 1;
2046 $this->ctrl->setCmd(
'addRole');
2047 $ret =& $this->ctrl->forwardCommand($perm_gui);
2060 $notoperations = array();
2064 $notoperations[] =
"copy";
2065 $notoperations[] =
"paste";
2066 $notoperations[] =
"clear";
2071 $notoperations[] =
"cut";
2072 $notoperations[] =
"copy";
2073 $notoperations[] =
"link";
2076 $operations = array();
2078 if ($this->actions ==
"")
2088 foreach (
$d as $row)
2090 if (!in_array($row[
"name"], $notoperations))
2092 $operations[] = $row;
2096 if (count($operations) > 0)
2098 foreach ($operations as $val)
2100 $this->tpl->setCurrentBlock(
"tbl_action_btn");
2101 $this->tpl->setVariable(
"BTN_NAME", $val[
"name"]);
2102 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt($val[
"lng"]));
2103 $this->tpl->parseCurrentBlock();
2107 if ($with_subobjects ===
true)
2112 if (!empty($this->ids) && count($operations) > 0)
2115 $this->tpl->setCurrentBlock(
"tbl_action_toggle_checkboxes");
2116 $this->tpl->setVariable(
"JS_VARNAME",
"id");
2118 $this->tpl->setVariable(
"TXT_CHECKALL", $this->lng->txt(
"check_all"));
2119 $this->tpl->setVariable(
"TXT_UNCHECKALL", $this->lng->txt(
"uncheck_all"));
2120 $this->tpl->parseCurrentBlock();
2123 if (count($operations) > 0)
2125 $this->tpl->setCurrentBlock(
"tbl_action_row");
2127 $this->tpl->parseCurrentBlock();
2146 if ($this->sub_objects ==
"")
2148 $d = $this->objDefinition->getCreatableSubObjects($this->object->getType());
2159 foreach (
$d as $row)
2163 if ($row[
"max"] > 0)
2166 for ($i=0; $i<count($this->data[
"ctrl"]); $i++)
2168 if ($this->data[
"ctrl"][$i][
"type"] == $row[
"name"])
2175 if ($row[
"max"] ==
"" || $count < $row[
"max"])
2177 $subobj[] = $row[
"name"];
2188 if (is_array($subobj))
2204 $this->tpl->setCurrentBlock(
"add_object");
2205 $this->tpl->setVariable(
"SELECT_OBJTYPE", $opts);
2206 $this->tpl->setVariable(
"BTN_NAME",
"create");
2207 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"add"));
2208 $this->tpl->parseCurrentBlock();
2224 $a_type = $this->type;
2227 $template =
"tpl.".$a_type.
"_".$a_cmd.
".html";
2229 if (!$this->tpl->fileExists($template) &&
2230 !file_exists(
"./templates/default/".$template))
2232 $template =
"tpl.obj_".$a_cmd.
".html";
2235 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content", $template,$a_in_module);
2249 foreach ($a_ref_ids as $id)
2252 $tmp_obj =& $this->ilias->obj_factory->getInstanceByRefId($id);
2253 $title[] = $tmp_obj->getTitle();
2276 $this->tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
2279 $this->tpl->setCurrentBlock(
"btn_cell");
2280 $this->tpl->setVariable(
"BTN_LINK",$this->ctrl->getLinkTarget($this,$a_cmd));
2281 $this->tpl->setVariable(
"BTN_TXT",$a_text);
2284 $this->tpl->setVariable(
"BTN_TARGET",$a_target);
2287 $this->tpl->parseCurrentBlock();
2292 $_SESSION[
"tbl_limit"] = $_POST[
"hitsperpage"];
2293 $_GET[
"limit"] = $_POST[
"hitsperpage"];
2299 include_once
"./Services/Table/classes/class.ilTableGUI.php";
2313 case "clipboardObject":
2314 $offset =
$_GET[
"offset"];
2315 $order =
$_GET[
"sort_by"];
2316 $direction =
$_GET[
"sort_order"];
2317 $tbl->disable(
"footer");
2321 $offset =
$_GET[
"offset"];
2322 $order =
$_GET[
"sort_by"];
2323 $direction =
$_GET[
"sort_order"];
2327 $tbl->setOrderColumn($order);
2328 $tbl->setOrderDirection($direction);
2329 $tbl->setOffset($offset);
2330 $tbl->setLimit(
$_GET[
"limit"]);
2331 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
2332 $tbl->setData($result_set);
2338 $tpl =& $tbl->getTemplateObject();
2340 $tpl->setCurrentBlock(
"tbl_form_header");
2341 $tpl->setVariable(
"FORMACTION",$this->ctrl->getTargetScript().
"?".$this->link_params.
"&cmd=post");
2342 $tpl->parseCurrentBlock();
2344 $tpl->setCurrentBlock(
"tbl_action_btn");
2345 $tpl->setVariable(
"BTN_NAME",
"paste");
2346 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"insert_object_here"));
2347 $tpl->parseCurrentBlock();
2349 $tpl->setCurrentBlock(
"tbl_action_btn");
2350 $tpl->setVariable(
"BTN_NAME",
"clear");
2351 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"clear_clipboard"));
2352 $tpl->parseCurrentBlock();
2354 $tpl->setCurrentBlock(
"tbl_action_row");
2355 $tpl->setVariable(
"COLUMN_COUNTS",3);
2357 $tpl->parseCurrentBlock();
2359 $tbl->setTitle($this->lng->txt(
"clipboard"),
"icon_typ_b.gif",$this->lng->txt(
"clipboard"));
2360 $tbl->setHeaderNames(array($this->lng->txt(
'obj_type'),
2361 $this->lng->txt(
'title'),
2362 $this->lng->txt(
'action')));
2363 $tbl->setHeaderVars(array(
'type',
2366 array(
'ref_id' => $this->object->getRefId(),
2367 'cmd' =>
'clipboard',
2368 'cmdClass' =>
$_GET[
'cmdClass'],
2369 'cmdNode' =>
$_GET[
'cmdNode']));
2371 $tbl->setColumnWidth(array(
"",
"80%",
"19%"));
2377 $this->tpl->setVariable(
"RESULT_TABLE",$tbl->tpl->get());
2384 include_once
'./classes/class.ilPermissionGUI.php';
2388 $this->ctrl->current_node = 1;
2389 $this->ctrl->setCmd(
'info');
2390 $ret =& $this->ctrl->forwardCommand($perm_gui);
2397 $action[1] = $this->lng->txt(
'all_roles');
2398 $action[2] = $this->lng->txt(
'all_global_roles');
2399 $action[3] = $this->lng->txt(
'all_local_roles');
2400 $action[4] = $this->lng->txt(
'linked_local_roles');
2401 $action[5] = $this->lng->txt(
'local_roles_this_object_only');
2417 $arr_global_roles = $rbacreview->getGlobalRoles();
2418 $arr_remove_roles = array_diff(array_keys($a_roles),$arr_global_roles);
2420 foreach ($arr_remove_roles as $role_id)
2422 unset($a_roles[$role_id]);
2429 $arr_global_roles = $rbacreview->getGlobalRoles();
2431 foreach ($arr_global_roles as $role_id)
2433 unset($a_roles[$role_id]);
2445 $role_folder = $rbacreview->getRoleFolderOfObject($this->object->getRefId());
2452 $arr_local_roles = $rbacreview->getRolesOfRoleFolder($role_folder[
"ref_id"]);
2453 $arr_remove_roles = array_diff(array_keys($a_roles),$arr_local_roles);
2455 foreach ($arr_remove_roles as $role_id)
2457 unset($a_roles[$role_id]);
2469 include_once
'./classes/class.ilPermissionGUI.php';
2473 $this->ctrl->current_node = 1;
2474 $this->ctrl->setCmd(
'owner');
2475 $ret =& $this->ctrl->forwardCommand($perm_gui);
2482 include_once
'./classes/class.ilPermissionGUI.php';
2486 $this->ctrl->current_node = 1;
2487 $this->ctrl->setCmd(
'changeOwner');
2488 $ret =& $this->ctrl->forwardCommand($perm_gui);
2505 $class_name = $this->objDefinition->getClassName($obj_type);
2506 $class = strtolower(
"ilObj".$class_name.
"GUI");
2507 $this->ctrl->redirectByClass(array(
"ilrepositorygui", $class), $a_cmd);
2524 $max_entries = $ilSetting->get(
'search_max_hits',100);
2532 if(count($existing_objs) >= $max_entries)
2536 unset(
$_SESSION[
'wizard_search_title']);
2537 $this->tpl->addBlockFile(strtoupper($a_tpl_varname),strtolower($a_tpl_varname),
'tpl.obj_duplicate.html');
2538 $this->ctrl->setParameter($this,
'new_type',$a_type);
2540 $this->tpl->setVariable(
'ALT_IMG3',$this->lng->txt(
'obj_'.$a_type));
2541 $this->tpl->setVariable(
'TXT_DUPLICATE',$this->lng->txt(
'obj_'.$a_type.
'_duplicate'));
2543 $this->tpl->setVariable(
'WIZARD_TXT_SELECT',$this->lng->txt(
'obj_'.$a_type));
2544 $this->tpl->setVariable(
'WIZARD_OBJS',$this->
buildCloneSelect($existing_objs));
2548 $this->tpl->setVariable(
'FORMACTION_CLONE',$this->ctrl->getFormAction($this,
'cloneWizardPage'));
2549 $this->tpl->setVariable(
'BTN_WIZARD',$this->lng->txt(
'btn_next'));
2550 $this->tpl->setVariable(
'CMD_WIZARD',
'cloneWizardPage');
2554 $this->tpl->setVariable(
'FORMACTION_CLONE',$this->ctrl->getFormAction($this,
'cloneAll'));
2555 $this->tpl->setVariable(
'BTN_WIZARD',$this->lng->txt(
'obj_'.$a_type.
'_duplicate'));
2556 $this->tpl->setVariable(
'CMD_WIZARD',
'cloneAll');
2559 $this->tpl->setVariable(
'WIZARD_TXT_CANCEL',$this->lng->txt(
'cancel'));
2572 unset(
$_SESSION[
'wizard_search_title']);
2574 $this->tpl->addBlockFile(strtoupper($a_tpl_varname),strtolower($a_tpl_varname),
'tpl.obj_duplicate_search.html');
2575 $this->ctrl->setParameter($this,
'new_type',$a_type);
2576 $this->tpl->setVariable(
'FORMACTION_CLONE',$this->ctrl->getFormAction($this,
'searchCloneSource'));
2578 $this->tpl->setVariable(
'ALT_IMG3',$this->lng->txt(
'obj_'.$a_type));
2579 $this->tpl->setVariable(
'TXT_DUPLICATE',$this->lng->txt(
'obj_'.$a_type.
'_duplicate'));
2581 $this->tpl->setVariable(
'WIZARD_TXT_TITLE',$this->lng->txt(
'title'));
2583 $this->tpl->setVariable(
'WIZARD_TITLE_INFO',$this->lng->txt(
'wizard_title_info'));
2585 $this->tpl->setVariable(
'BTN_WIZARD',$this->lng->txt(
'btn_next'));
2586 $this->tpl->setVariable(
'CMD_WIZARD',
'searchCloneSource');
2587 $this->tpl->setVariable(
'WIZARD_TXT_CANCEL',$this->lng->txt(
'cancel'));
2597 global
$tree,$ilObjDataCache;
2599 $this->ctrl->setParameter($this,
'new_type',$_REQUEST[
'new_type']);
2605 $this->lng->loadLanguageModule(
'search');
2606 include_once
'./Services/Search/classes/class.ilQueryParser.php';
2608 $query_parser->setMinWordLength(1,
true);
2610 $query_parser->parse();
2611 if(!$query_parser->validate())
2619 include_once
'Services/Search/classes/Like/class.ilLikeObjectSearch.php';
2622 $object_search->setFilter(array($_REQUEST[
'new_type']));
2623 $res = $object_search->performSearch();
2624 $res->setRequiredPermission(
'copy');
2627 $res->filter(ROOT_FOLDER_ID,
true);
2636 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.obj_duplicate_search_results.html');
2641 foreach($references as
$ref_id)
2643 $this->tpl->setCurrentBlock(
'ref_row');
2645 $this->tpl->setVariable(
'TXT_PATH',$this->lng->txt(
'path'));
2647 $path_arr = $tree->getPathFull($ref_id,ROOT_FOLDER_ID);
2650 foreach($path_arr as
$data)
2656 $path .= $data[
'title'];
2658 $this->tpl->setVariable(
'PATH',$path);
2659 $this->tpl->parseCurrentBlock();
2662 if(strlen($desc = $ilObjDataCache->lookupDescription(
$obj_id)))
2664 $this->tpl->setCurrentBlock(
'desc');
2665 $this->tpl->setVariable(
'DESCRIPTION',$desc);
2666 $this->tpl->parseCurrentBlock();
2668 $this->tpl->setCurrentBlock(
'res_row');
2670 $this->tpl->setVariable(
'TITLE',$ilObjDataCache->lookupTitle(
$obj_id));
2671 $this->tpl->setVariable(
'REFERENCES',$this->lng->txt(
'pathes'));
2672 $this->tpl->parseCurrentBlock();
2675 $this->tpl->setVariable(
'FORMACTION',$this->ctrl->getFormAction($this,
'cancel'));
2676 $this->tpl->setVariable(
'TYPE_IMG',
ilUtil::getImagePath(
'icon_'.$_REQUEST[
'new_type'].
'.gif'));
2677 $this->tpl->setVariable(
'ALT_IMG',$this->lng->txt(
'obj_'.$_REQUEST[
'new_type']));
2678 $this->tpl->setVariable(
'TXT_DUPLICATE',$this->lng->txt(
'obj_'.$_REQUEST[
'new_type'].
'_duplicate'));
2679 $this->tpl->setVariable(
'INFO_DUPLICATE',$this->lng->txt(
'wizard_search_list'));
2682 $this->tpl->setVariable(
'BTN_COPY',$this->lng->txt(
'btn_next'));
2683 $this->tpl->setVariable(
'CMD_COPY',
'cloneWizardPage');
2687 $this->tpl->setVariable(
'BTN_COPY',$this->lng->txt(
'obj_'.$_REQUEST[
'new_type'].
'_duplicate'));
2688 $this->tpl->setVariable(
'CMD_COPY',
'cloneAll');
2690 $this->tpl->setVariable(
'BTN_BACK',$this->lng->txt(
'btn_back'));
2702 include_once(
'classes/class.ilLink.php');
2703 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
2705 global $ilAccess,
$ilErr,$rbacsystem,$ilUser;
2707 $new_type = $_REQUEST[
'new_type'];
2708 if(!$rbacsystem->checkAccess(
'create',(
int)
$_GET[
'ref_id'],$new_type))
2710 $ilErr->raiseError($this->lng->txt(
'permission_denied'));
2712 if(!(
int) $_REQUEST[
'clone_source'])
2718 if(!$ilAccess->checkAccess(
'write',
'',(
int) $_REQUEST[
'clone_source'],$new_type))
2720 $ilErr->raiseError($this->lng->txt(
'permission_denied'));
2726 $wizard_options->saveOwner($ilUser->getId());
2727 $wizard_options->saveRoot((
int) $_REQUEST[
'clone_source']);
2729 $options = $_POST[
'cp_options'] ? $_POST[
'cp_options'] : array();
2730 foreach($options as $source_id => $option)
2732 $wizard_options->addEntry($source_id,$option);
2734 $wizard_options->read();
2737 $new_obj = $orig->cloneObject((
int) $_GET[
'ref_id'],$copy_id);
2740 $wizard_options->deleteAll();
2767 return ilUtil::formSelect((
int) $_REQUEST[
'clone_source'],
'clone_source',$options,
false,
true);
2777 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
2782 if ($ilCtrl->getNextClass() !=
"ilcolumngui")
2785 return $this->getContent();
2789 if (!$ilCtrl->isAsynch())
2799 $this->html = $ilCtrl->forwardCommand($column_gui);
2806 $this->html = $ilCtrl->forwardCommand($column_gui);
2812 return $this->getContent();
2828 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
2838 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
2842 $html = $ilCtrl->forwardCommand($column_gui);
2846 if (!$ilCtrl->isAsynch())
2848 $html = $ilCtrl->getHTML($column_gui);
2862 $column_gui->setRepositoryMode(
true);
2863 $column_gui->setEnableEdit(
false);
2864 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
2866 $column_gui->setEnableEdit(
true);
2872 global $ilAccess,
$lng, $PHP_SELF;
2874 if (!is_object($this->
object))
2878 if (!$ilAccess->checkAccess($a_perm, $a_cmd, $this->object->getRefId()))
2883 if (!is_int(strpos($PHP_SELF,
"goto.php")))
2886 $this->
object->getRefId());
2890 die(
"Permission Denied.");