84 function ilObjectGUI($a_data, $a_id = 0, $a_call_by_reference =
true, $a_prepare_output =
true)
88 $this->tabs_gui =& $ilTabs;
108 if (!$a_call_by_reference)
110 $params = array(
"ref_id",
"obj_id");
113 $this->ctrl->saveParameter($this,
$params);
116 $this->tree =&
$tree;
117 $this->formaction = array();
118 $this->return_location = array();
119 $this->target_frame = array();
121 $this->sub_objects =
"";
123 $this->data = $a_data;
125 $this->call_by_reference = $a_call_by_reference;
126 $this->prepare_output = $a_prepare_output;
127 $this->creation_mode =
false;
129 $this->ref_id = ($this->call_by_reference) ? $this->
id :
$_GET[
"ref_id"];
130 $this->obj_id = ($this->call_by_reference) ?
$_GET[
"obj_id"] : $this->
id;
134 $this->link_params =
"ref_id=".$this->ref_id;
141 if (is_object($this->
object))
143 if ($this->call_by_reference && $this->ref_id =
$_GET[
"ref_id"])
145 $this->ctrl->setContext($this->object->getId(),
146 $this->
object->getType());
154 if ($a_prepare_output)
168 $next_class = $this->ctrl->getNextClass($this);
169 $cmd = $this->ctrl->getCmd();
194 return $this->call_by_reference;
205 $this->creation_mode = $a_mode;
213 return $this->creation_mode;
222 if ($this->call_by_reference)
238 global $ilLocator,
$tpl, $ilUser;
240 $this->tpl->getStandardTemplate();
242 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
272 $class_name = $this->objDefinition->getClassName($obj_type);
273 $class = strtolower(
"ilObj".$class_name.
"GUI");
274 $class_path = $this->ctrl->lookupClassPath($class);
275 include_once($class_path);
276 $class_name = $this->ctrl->getClassForClasspath($class_path);
278 $this->parent_gui_obj =
new $class_name(
"",
$_GET[
"ref_id"],
true,
false);
279 $this->parent_gui_obj->setTitleAndDescription();
291 require_once
'Services/WebDAV/classes/class.ilDAVServer.php';
293 $ilUser->getId() != ANONYMOUS_USER_ID)
309 $this->tpl->setTitle($this->object->getPresentationTitle());
310 $this->tpl->setDescription($this->object->getLongDescription());
311 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
320 $this->lng->txt(
"obj_" . $this->object->getType()));
328 if ($this->object->getRefId() ==
"")
333 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
335 if ($this->object->getRefId() != ROOT_FOLDER_ID &&
336 $this->
object->getRefId() != SYSTEM_FOLDER_ID)
338 $par_id = $tree->getParentId($this->object->getRefId());
340 $class_name = $objDefinition->getClassName($obj_type);
341 $class = strtolower(
"ilObj".$class_name.
"GUI");
342 $this->ctrl->setParameterByClass($class,
"ref_id", $par_id);
343 $tpl->setUpperIcon($this->ctrl->getLinkTargetByClass($class,
"view"));
344 $this->ctrl->clearParametersByClass($class);
347 else if ($this->object->getRefId() == ROOT_FOLDER_ID)
349 $this->ctrl->setParameterByClass(
"iladministrationgui",
"ref_id",
"");
350 $this->ctrl->setParameterByClass(
"iladministrationgui",
"admin_mode",
"settings");
351 $tpl->setUpperIcon($this->ctrl->getLinkTargetByClass(
"iladministrationgui",
"frameset"),
353 $this->ctrl->clearParametersByClass(
"iladministrationgui");
358 if ($this->object->getRefId() != ROOT_FOLDER_ID &&
359 $this->
object->getRefId() != SYSTEM_FOLDER_ID &&
360 $_GET[
"obj_id"] ==
"")
362 if (defined(
"ILIAS_MODULE"))
366 $par_id = $tree->getParentId($this->object->getRefId());
367 $tpl->setUpperIcon($prefix.
"repository.php?cmd=frameset&ref_id=".$par_id,
377 if ($this->object->getRefId() ==
"")
382 $tpl->setMountWebfolderIcon($this->object->getRefId());
393 $this->
getTabs($this->tabs_gui);
410 global $rbacsystem,
$tree;
412 if (
$_GET[
"admin_mode"] ==
"repository")
414 $this->ctrl->setParameterByClass(
"iladministrationgui",
"admin_mode",
"settings");
415 $tabs_gui->setBackTarget($this->lng->txt(
"administration"),
416 $this->ctrl->getLinkTargetByClass(
"iladministrationgui",
"frameset"),
418 $this->ctrl->setParameterByClass(
"iladministrationgui",
"admin_mode",
"repository");
421 if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
423 $tabs_gui->addTarget(
"view",
424 $this->ctrl->getLinkTarget($this,
"view"), array(
"",
"view"), get_class($this));
427 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
429 $tabs_gui->addTarget(
"perm_settings",
430 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
"",
"ilpermissiongui");
433 if ($tree->getSavedNodeData($this->object->getRefId()))
435 $tabs_gui->addTarget(
"trash",
436 $this->ctrl->getLinkTarget($this,
"trash"),
"trash", get_class($this));
455 if (is_array($a_actions))
476 if (is_array($a_sub_objects))
478 foreach ($a_sub_objects as
$name => $options)
480 $this->sub_objects[
$name] = array(
"name" =>
$name,
"max" => $options[
"max"]);
485 $this->sub_objects =
"";
499 global $ilLocator,
$tpl;
501 if ($this->omit_locator)
511 : $this->object->getRefId();
512 $ilLocator->addRepositoryItems(
$ref_id);
514 if(!$this->creation_mode)
520 if (
$_GET[
"admin_mode"] ==
"" &&
521 strtolower($this->ctrl->getCmdClass()) ==
"ilobjrolegui")
523 $this->ctrl->setParameterByClass(
"ilobjrolegui",
524 "rolf_ref_id",
$_GET[
"rolf_ref_id"]);
525 $this->ctrl->setParameterByClass(
"ilobjrolegui",
526 "obj_id",
$_GET[
"obj_id"]);
527 $ilLocator->addItem($this->lng->txt(
"role"),
528 $this->ctrl->getLinkTargetByClass(array(
"ilpermissiongui",
529 "ilobjrolegui"),
"perm"));
545 $this->omit_locator = $a_omit;
556 if (
$_GET[
"admin_mode"] ==
"settings")
558 $ilLocator->addItem($this->lng->txt(
"administration"),
559 $this->ctrl->getLinkTargetByClass(
"iladministrationgui",
"frameset"),
561 if ($this->object->getRefId() != SYSTEM_FOLDER_ID)
563 $ilLocator->addItem($this->object->getTitle(),
564 $this->ctrl->getLinkTarget($this,
"view"));
569 $this->ctrl->setParameterByClass(
"iladministrationgui",
571 $this->ctrl->setParameterByClass(
"iladministrationgui",
572 "admin_mode",
"settings");
576 $this->ctrl->clearParametersByClass(
"iladministrationgui");
577 $ilLocator->addAdministrationItems();
587 include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
589 $ru->restoreObjects(
$_GET[
"ref_id"],
$_POST[
"trash_id"]);
590 $this->ctrl->redirect($this,
"trash");
601 include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
604 session_unregister(
"saved_post");
605 $this->ctrl->returnToParent($this);
615 session_unregister(
"saved_post");
616 $this->ctrl->returnToParent($this);
626 global $rbacsystem,
$log, $ilAppEventHandler,
$lng;
628 include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
630 $ru->removeObjectsFromSystem(
$_POST[
"trash_id"]);
631 $this->ctrl->redirect($this,
"trash");
645 if (!$rbacsystem->checkAccess(
"create",
$_GET[
"ref_id"], $new_type))
647 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
653 $data[
"fields"] = array();
660 $this->tpl->setCurrentBlock(
"img");
661 $this->tpl->setVariable(
"TYPE_IMG",
663 $this->tpl->setVariable(
"ALT_IMG",
664 $this->lng->txt(
"obj_".$new_type));
665 $this->tpl->parseCurrentBlock();
667 foreach (
$data[
"fields"] as
$key => $val)
669 $this->tpl->setVariable(
"TXT_".strtoupper(
$key), $this->lng->txt(
$key));
670 $this->tpl->setVariable(strtoupper(
$key), $val);
672 if ($this->prepare_output)
674 $this->tpl->parseCurrentBlock();
677 $this->ctrl->setParameter($this,
"new_type", $new_type);
678 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this,
"save"));
679 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt($new_type.
"_new"));
680 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
681 $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt($new_type.
"_add"));
682 $this->tpl->setVariable(
"CMD_SUBMIT",
"save");
684 $this->tpl->setVariable(
"TXT_REQUIRED_FLD", $this->lng->txt(
"required_field"));
696 session_unregister(
"saved_post");
698 $this->ctrl->returnToParent($this);
713 if (!$rbacsystem->checkAccess(
"create",
$_GET[
"ref_id"], $new_type))
715 $this->ilias->raiseError($this->lng->txt(
"no_create_permission"), $this->ilias->error_obj->MESSAGE);
718 $location = $objDefinition->getLocation($new_type);
721 $class_name =
"ilObj".$objDefinition->getClassName($new_type);
722 include_once(
$location.
"/class.".$class_name.
".php");
723 $newObj =
new $class_name();
724 $newObj->setType($new_type);
728 $newObj->createReference();
729 $newObj->putInTree(
$_GET[
"ref_id"]);
730 $newObj->setPermissions(
$_GET[
"ref_id"]);
745 if (!$rbacsystem->checkAccess(
"write", $this->ref_id))
747 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
777 foreach ($fields as
$key => $val)
779 $this->tpl->setVariable(
"TXT_".strtoupper(
$key), $this->lng->txt(
$key));
780 $this->tpl->setVariable(strtoupper(
$key), $val);
785 if (!$this->call_by_reference)
787 $this->ctrl->setParameter($this,
"obj_id", $this->obj_id);
790 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this,
"update"));
791 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt($this->object->getType().
"_edit"));
792 $this->tpl->setVariable(
"TARGET", $this->
getTargetFrame(
"update"));
793 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
794 $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
795 $this->tpl->setVariable(
"CMD_SUBMIT",
"update");
796 $this->tpl->setVariable(
"TXT_REQUIRED_FLD", $this->lng->txt(
"required_field"));
810 $this->update = $this->
object->update();
819 $this->ctrl->redirect($this);
833 if ($this->formaction[$a_cmd] !=
"")
835 return $this->formaction[$a_cmd];
839 return $a_formaction;
853 $this->formaction[$a_cmd] = $a_formaction;
865 if ($this->return_location[$a_cmd] !=
"")
867 return $this->return_location[$a_cmd];
885 $this->return_location[$a_cmd] = $a_location;
897 if ($this->target_frame[$a_cmd] !=
"")
899 return $this->target_frame[$a_cmd];
901 elseif (!empty($a_target_frame))
903 return "target=\"".$a_target_frame.
"\"";
920 $this->target_frame[$a_cmd] =
"target=\"".$a_target_frame.
"\"";
928 $ilBench->start(
"Explorer",
"setOutput_isVisible");
929 $visible = $rbacsystem->checkAccess(
'visible,read',$a_ref_id);
931 if ($visible && $a_type ==
'crs') {
933 if($crs_id = $tree->checkForParentType($a_ref_id,
'crs'))
935 if(!$rbacsystem->checkAccess(
'write',$crs_id))
940 if(!$tmp_obj->isActivated())
945 if(($crs_id != $a_ref_id) and $tmp_obj->isArchived())
950 include_once
"./course/classes/class.ilCourseItems.php";
960 $ilBench->stop(
"Explorer",
"setOutput_isVisible");
973 global $rbacsystem,
$tpl;
975 if (!$rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
977 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
980 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
988 include_once(
"./Services/Repository/classes/class.ilAdminSubItemsTableGUI.php");
989 if (!$this->call_by_reference)
991 $this->ctrl->setParameter($this,
"obj_id", $this->obj_id);
995 $tpl->setContent($itab->getHTML());
1009 if (
$_GET[
"item_ref_id"] !=
"")
1017 include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
1019 if (!$ru->showDeleteConfirmation(
$_POST[
"id"], $a_error))
1021 $ilCtrl->returnToParent($this);
1034 include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
1036 $ru->showTrashTable(
$_GET[
"ref_id"]);
1046 if ($this->sub_objects ==
"")
1048 $d = $this->objDefinition->getCreatableSubObjects($this->object->getType());
1063 if ($row[
"max"] > 0)
1066 for ($i=0; $i<count($this->data[
"ctrl"]); $i++)
1068 if ($this->data[
"ctrl"][$i][
"type"] == $row[
"name"])
1075 if ($row[
"max"] ==
"" || $count < $row[
"max"])
1077 $subobj[] = $row[
"name"];
1088 if (is_array($subobj))
1104 $this->tpl->setCurrentBlock(
"add_object");
1105 $this->tpl->setVariable(
"SELECT_OBJTYPE", $opts);
1106 $this->tpl->setVariable(
"BTN_NAME",
"create");
1107 $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"add"));
1108 $this->tpl->parseCurrentBlock();
1127 $template =
"tpl.".$a_type.
"_".$a_cmd.
".html";
1129 if (!$this->tpl->fileExists($template) &&
1130 !file_exists(
"./templates/default/".$template))
1132 $template =
"tpl.obj_".$a_cmd.
".html";
1135 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content", $template,$a_in_module);
1149 foreach ($a_ref_ids as $id)
1152 $tmp_obj =& $this->ilias->obj_factory->getInstanceByRefId($id);
1153 $title[] = $tmp_obj->getTitle();
1178 $ilToolbar->addButton($a_text, $this->ctrl->getLinkTarget($this, $a_cmd), $a_target);
1190 include_once
"./Services/Table/classes/class.ilTableGUI.php";
1204 case "clipboardObject":
1205 $offset =
$_GET[
"offset"];
1206 $order =
$_GET[
"sort_by"];
1207 $direction =
$_GET[
"sort_order"];
1208 $tbl->disable(
"footer");
1212 $offset =
$_GET[
"offset"];
1213 $order =
$_GET[
"sort_by"];
1214 $direction =
$_GET[
"sort_order"];
1218 $tbl->setOrderColumn($order);
1219 $tbl->setOrderDirection($direction);
1220 $tbl->setOffset($offset);
1221 $tbl->setLimit(
$_GET[
"limit"]);
1222 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
1223 $tbl->setData($result_set);
1231 $tpl =& $tbl->getTemplateObject();
1233 $tpl->setCurrentBlock(
"tbl_form_header");
1234 $tpl->setVariable(
"FORMACTION", $ilCtrl->getFormAction($this));
1235 $tpl->parseCurrentBlock();
1237 $tpl->setCurrentBlock(
"tbl_action_btn");
1238 $tpl->setVariable(
"BTN_NAME",
"paste");
1239 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"insert_object_here"));
1240 $tpl->parseCurrentBlock();
1242 $tpl->setCurrentBlock(
"tbl_action_btn");
1243 $tpl->setVariable(
"BTN_NAME",
"clear");
1244 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"clear_clipboard"));
1245 $tpl->parseCurrentBlock();
1247 $tpl->setCurrentBlock(
"tbl_action_row");
1248 $tpl->setVariable(
"COLUMN_COUNTS",3);
1250 $tpl->parseCurrentBlock();
1252 $tbl->setTitle($this->lng->txt(
"clipboard"),
"icon_typ_b.gif",$this->lng->txt(
"clipboard"));
1253 $tbl->setHeaderNames(array($this->lng->txt(
'obj_type'),
1254 $this->lng->txt(
'title'),
1255 $this->lng->txt(
'action')));
1256 $tbl->setHeaderVars(array(
'type',
1259 array(
'ref_id' => $this->object->getRefId(),
1260 'cmd' =>
'clipboard',
1261 'cmdClass' =>
$_GET[
'cmdClass'],
1262 'cmdNode' =>
$_GET[
'cmdNode']));
1264 $tbl->setColumnWidth(array(
"",
"80%",
"19%"));
1270 $this->tpl->setVariable(
"RESULT_TABLE",$tbl->tpl->get());
1287 $class_name = $this->objDefinition->getClassName($obj_type);
1288 $class = strtolower(
"ilObj".$class_name.
"GUI");
1289 $this->ctrl->redirectByClass(array(
"ilrepositorygui", $class), $a_cmd);
1305 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
1307 $cp->setType($a_type);
1308 $cp->setTarget(
$_GET[
'ref_id']);
1309 $cp->showSourceSearch($a_tpl_varname);
1316 $max_entries = $ilSetting->get(
'search_max_hits',100);
1324 if(count($existing_objs) >= $max_entries)
1328 unset(
$_SESSION[
'wizard_search_title']);
1329 $ctpl =
new ilTemplate(
'tpl.obj_duplicate.html',
true,
true);
1330 $this->ctrl->setParameter($this,
'new_type',$a_type);
1333 if (!$objDefinition->isPlugin($a_type))
1335 $ctpl->setVariable(
'TXT_DUPLICATE',$this->lng->txt(
'obj_'.$a_type.
'_duplicate'));
1336 $ctpl->setVariable(
'WIZARD_TXT_SELECT',$this->lng->txt(
'obj_'.$a_type));
1340 include_once(
"./Services/Component/classes/class.ilPlugin.php");
1341 $ctpl->setVariable(
'TXT_DUPLICATE',
ilPlugin::lookupTxt(
"rep_robj", $a_type,
"objs_".$a_type.
"_duplicate"));
1342 $ctpl->setVariable(
'WIZARD_TXT_SELECT',
ilPlugin::lookupTxt(
"rep_robj", $a_type,
"objs_".$a_type));
1344 $ctpl->setVariable(
'WIZARD_OBJS', $this->
buildCloneSelect($existing_objs));
1348 $ctpl->setVariable(
'FORMACTION_CLONE',$this->ctrl->getFormAction($this,
'cloneWizardPage'));
1349 $ctpl->setVariable(
'BTN_WIZARD',$this->lng->txt(
'btn_next'));
1350 $ctpl->setVariable(
'CMD_WIZARD',
'cloneWizardPage');
1354 $ctpl->setVariable(
'FORMACTION_CLONE',$this->ctrl->getFormAction($this,
'cloneAll'));
1355 if (!$objDefinition->isPlugin($a_type))
1357 $ctpl->setVariable(
'BTN_WIZARD',$this->lng->txt(
'obj_'.$a_type.
'_duplicate'));
1361 include_once(
"./Services/Component/classes/class.ilPlugin.php");
1362 $ctpl->setVariable(
'BTN_WIZARD',
ilPlugin::lookupTxt(
"rep_robj", $a_type,
"obj_".$a_type.
"_duplicate"));
1364 $ctpl->setVariable(
'CMD_WIZARD',
'cloneAll');
1367 $ctpl->setVariable(
'WIZARD_TXT_CANCEL',$this->lng->txt(
'cancel'));
1369 if ($a_tpl_varname !=
"")
1371 $this->tpl->setVariable(strtoupper($a_tpl_varname), $ctpl->get());
1375 return $ctpl->get();
1389 unset(
$_SESSION[
'wizard_search_title']);
1391 $this->tpl->addBlockFile(strtoupper($a_tpl_varname),strtolower($a_tpl_varname),
'tpl.obj_duplicate_search.html');
1392 $this->ctrl->setParameter($this,
'new_type',$a_type);
1393 $this->tpl->setVariable(
'FORMACTION_CLONE',$this->ctrl->getFormAction($this,
'searchCloneSource'));
1395 $this->tpl->setVariable(
'ALT_IMG3',$this->lng->txt(
'obj_'.$a_type));
1396 $this->tpl->setVariable(
'TXT_DUPLICATE',$this->lng->txt(
'obj_'.$a_type.
'_duplicate'));
1398 $this->tpl->setVariable(
'WIZARD_TXT_TITLE',$this->lng->txt(
'title'));
1400 $this->tpl->setVariable(
'WIZARD_TITLE_INFO',$this->lng->txt(
'wizard_title_info'));
1402 $this->tpl->setVariable(
'BTN_WIZARD',$this->lng->txt(
'btn_next'));
1403 $this->tpl->setVariable(
'CMD_WIZARD',
'searchCloneSource');
1404 $this->tpl->setVariable(
'WIZARD_TXT_CANCEL',$this->lng->txt(
'cancel'));
1414 global
$tree,$ilObjDataCache;
1416 $this->ctrl->setParameter($this,
'new_type',$_REQUEST[
'new_type']);
1422 $this->lng->loadLanguageModule(
'search');
1423 include_once
'./Services/Search/classes/class.ilQueryParser.php';
1425 $query_parser->setMinWordLength(1,
true);
1427 $query_parser->parse();
1428 if(!$query_parser->validate())
1436 include_once
'Services/Search/classes/Like/class.ilLikeObjectSearch.php';
1439 $object_search->setFilter(array($_REQUEST[
'new_type']));
1440 $res = $object_search->performSearch();
1441 $res->setRequiredPermission(
'copy');
1444 $res->filter(ROOT_FOLDER_ID,
true);
1453 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.obj_duplicate_search_results.html');
1458 foreach($references as
$ref_id)
1460 $this->tpl->setCurrentBlock(
'ref_row');
1462 $this->tpl->setVariable(
'TXT_PATH',$this->lng->txt(
'path'));
1464 $path_arr = $tree->getPathFull($ref_id,ROOT_FOLDER_ID);
1467 foreach($path_arr as
$data)
1473 $path .= $data[
'title'];
1475 $this->tpl->setVariable(
'PATH',$path);
1476 $this->tpl->parseCurrentBlock();
1479 if(strlen(
$desc = $ilObjDataCache->lookupDescription(
$obj_id)))
1481 $this->tpl->setCurrentBlock(
'desc');
1482 $this->tpl->setVariable(
'DESCRIPTION',
$desc);
1483 $this->tpl->parseCurrentBlock();
1485 $this->tpl->setCurrentBlock(
'res_row');
1487 $this->tpl->setVariable(
'TITLE',$ilObjDataCache->lookupTitle(
$obj_id));
1488 $this->tpl->setVariable(
'REFERENCES',$this->lng->txt(
'pathes'));
1489 $this->tpl->parseCurrentBlock();
1492 $this->tpl->setVariable(
'FORMACTION',$this->ctrl->getFormAction($this,
'cancel'));
1493 $this->tpl->setVariable(
'TYPE_IMG',
ilUtil::getImagePath(
'icon_'.$_REQUEST[
'new_type'].
'.gif'));
1494 $this->tpl->setVariable(
'ALT_IMG',$this->lng->txt(
'obj_'.$_REQUEST[
'new_type']));
1495 $this->tpl->setVariable(
'TXT_DUPLICATE',$this->lng->txt(
'obj_'.$_REQUEST[
'new_type'].
'_duplicate'));
1496 $this->tpl->setVariable(
'INFO_DUPLICATE',$this->lng->txt(
'wizard_search_list'));
1499 $this->tpl->setVariable(
'BTN_COPY',$this->lng->txt(
'btn_next'));
1500 $this->tpl->setVariable(
'CMD_COPY',
'cloneWizardPage');
1504 $this->tpl->setVariable(
'BTN_COPY',$this->lng->txt(
'obj_'.$_REQUEST[
'new_type'].
'_duplicate'));
1505 $this->tpl->setVariable(
'CMD_COPY',
'cloneAll');
1507 $this->tpl->setVariable(
'BTN_BACK',$this->lng->txt(
'btn_back'));
1519 include_once(
'classes/class.ilLink.php');
1520 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
1522 global $ilAccess,
$ilErr,$rbacsystem,$ilUser;
1524 $new_type = $_REQUEST[
'new_type'];
1525 if(!$rbacsystem->checkAccess(
'create',(
int)
$_GET[
'ref_id'],$new_type))
1527 $ilErr->raiseError($this->lng->txt(
'permission_denied'));
1529 if(!(
int) $_REQUEST[
'clone_source'])
1535 if(!$ilAccess->checkAccess(
'write',
'',(
int) $_REQUEST[
'clone_source'],$new_type))
1537 $ilErr->raiseError($this->lng->txt(
'permission_denied'));
1543 $wizard_options->saveOwner($ilUser->getId());
1544 $wizard_options->saveRoot((
int) $_REQUEST[
'clone_source']);
1546 $options =
$_POST[
'cp_options'] ?
$_POST[
'cp_options'] : array();
1547 foreach($options as $source_id => $option)
1549 $wizard_options->addEntry($source_id,$option);
1551 $wizard_options->read();
1554 $new_obj = $orig->cloneObject((
int) $_GET[
'ref_id'],$copy_id);
1557 $wizard_options->deleteAll();
1584 return ilUtil::formSelect((
int) $_REQUEST[
'clone_source'],
'clone_source',$options,
false,
true);
1594 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
1599 if ($ilCtrl->getNextClass() !=
"ilcolumngui")
1602 return $this->getContent();
1606 if (!$ilCtrl->isAsynch())
1616 $this->html = $ilCtrl->forwardCommand($column_gui);
1623 $this->html = $ilCtrl->forwardCommand($column_gui);
1629 return $this->getContent();
1645 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
1655 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
1659 $html = $ilCtrl->forwardCommand($column_gui);
1663 if (!$ilCtrl->isAsynch())
1665 $html = $ilCtrl->getHTML($column_gui);
1679 $column_gui->setRepositoryMode(
true);
1680 $column_gui->setEnableEdit(
false);
1681 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
1683 $column_gui->setEnableEdit(
true);
1689 global $ilAccess,
$lng, $PHP_SELF;
1691 if (!is_object($this->
object))
1696 if (!$ilAccess->checkAccess($a_perm, $a_cmd, $this->object->getRefId()))
1701 if (!is_int(strpos($PHP_SELF,
"goto.php")))
1704 $this->
object->getRefId());
1708 die(
"Permission Denied.");