ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilStructureObjectGUI Class Reference

Class ilStructureObjectGUI. More...

+ Inheritance diagram for ilStructureObjectGUI:
+ Collaboration diagram for ilStructureObjectGUI:

Public Member Functions

 ilStructureObjectGUI (&$a_content_obj, &$a_tree)
 Constructor public. More...
 
 setStructureObject (&$a_st_object)
 set structure object More...
 
 getType ()
 this function is called by condition handler gui interface More...
 
executeCommand ()
 execute command More...
 
 create ()
 create new page or chapter in chapter More...
 
 edit ()
 
 view ()
 
 showHierarchy ()
 Show subhiearchy of pages and subchapters. More...
 
 cutItems ($a_return="view")
 Copy items to clipboard, then cut them from the current tree. More...
 
 copyItems ($a_return="view")
 Copy items to clipboard. More...
 
 saveAllTitles ()
 Save all titles of chapters/pages. More...
 
 subchap ()
 
 add_cell ($val, $link="")
 output a cell in object list More...
 
 save ()
 save new chapter More...
 
 putInTree ()
 put chapter into tree More...
 
 cutPage ()
 cut page More...
 
 copyPage ()
 copy page More...
 
 pastePage ()
 paste page More...
 
 cutChapter ()
 Cut chapter(s) More...
 
 copyChapter ()
 copy a single chapter (selection) More...
 
 pasteChapter ()
 paste chapter More...
 
 activatePages ()
 activates or deactivates pages More...
 
 initConditionHandlerInterface ()
 
 cancel ()
 cancel creation of new page or chapter More...
 
 setTabs ()
 output tabs More...
 
 _goto ($a_target, $a_target_ref_id="")
 redirect script More...
 
 insertChapter ($a_as_sub=false)
 Insert (multiple) chapters at node. More...
 
 insertSubchapter ()
 Insert (multiple) subchapters at node. More...
 
 insertChapterClip ($a_as_sub=false, $a_return="view")
 Insert Chapter from clipboard. More...
 
 insertSubchapterClip ()
 Insert Chapter from clipboard. More...
 
 insertPage ()
 Insert (multiple) pages at node. More...
 
 insertPageClip ()
 Insert pages from clipboard. More...
 
 proceedDragDrop ()
 Perform drag and drop action. More...
 
 setPageLayout ()
 Set layout for multipl pages. More...
 
 initSetPageLayoutForm ()
 Init set page layout form. More...
 
 savePageLayout ()
 Save page layout. More...
 
 editMasterLanguage ()
 Edit master language. More...
 
 switchToLanguage ()
 Switch to language. More...
 
- Public Member Functions inherited from ilLMObjectGUI
 ilLMObjectGUI (&$a_content_obj)
 constructor More...
 
 setActions ($a_actions="")
 build action array More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 create ()
 structure / page object creation form More...
 
 putInTree ()
 put this object into content object tree More...
 
 delete ()
 Confirm deletion screen (delete page or structure objects) More...
 
 cancelDelete ()
 cancel deletion of page/structure objects More...
 
 confirmedDelete ()
 page and structure object deletion More...
 
 add_cell ($val, $link="")
 output a cell in object list More...
 
 showActions ($a_actions)
 show possible action (form buttons) More...
 
 checkTree ()
 check the content object tree More...
 

Data Fields

 $obj
 
 $tree
 
- Data Fields inherited from ilLMObjectGUI
 $ilias
 
 $tpl
 
 $lng
 
 $obj
 
 $ctrl
 
 $content_object
 
 $actions
 

Detailed Description

Class ilStructureObjectGUI.

User Interface for Structure Objects Editing

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

ilStructureObjectGUI: ilConditionHandlerInterface, ilMDEditorGUI

Definition at line 21 of file class.ilStructureObjectGUI.php.

Member Function Documentation

◆ _goto()

ilStructureObjectGUI::_goto (   $a_target,
  $a_target_ref_id = "" 
)

redirect script

Parameters
string$a_target

Definition at line 642 of file class.ilStructureObjectGUI.php.

References $_GET, $ilErr, ilLMObjectGUI\$lng, $ref_id, ilObject\_getAllReferences(), ilObjectGUI\_gotoRepositoryRoot(), ilLMObject\_lookupContObjID(), ilObject\_lookupTitle(), exit, and ilUtil\sendFailure().

643  {
644  global $rbacsystem, $ilErr, $lng, $ilAccess;
645 
646  // determine learning object
647  $lm_id = ilLMObject::_lookupContObjID($a_target);
648 
649  // get all references
650  $ref_ids = ilObject::_getAllReferences($lm_id);
651 
652  // always try passed ref id first
653  if (in_array($a_target_ref_id, $ref_ids))
654  {
655  $ref_ids = array_merge(array($a_target_ref_id), $ref_ids);
656  }
657 
658  // check read permissions
659  foreach ($ref_ids as $ref_id)
660  {
661  // Permission check
662  if ($ilAccess->checkAccess("read", "", $ref_id))
663  {
664  // don't redirect anymore, just set parameters
665  // (goto.php includes "ilias.php")
666  $_GET["baseClass"] = "ilLMPresentationGUI";
667  $_GET["obj_id"] = $a_target;
668  $_GET["ref_id"] = $ref_id;
669  include_once("ilias.php");
670  exit;;
671  }
672  }
673 
674  if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
675  {
676  ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
677  ilObject::_lookupTitle($lm_id)), true);
678  include_once("./Services/Object/classes/class.ilObjectGUI.php");
680  }
681 
682  $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
683  }
exit
Definition: login.php:54
$_GET["client_id"]
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
static _getAllReferences($a_id)
get all reference ids of object
_lookupContObjID($a_id)
get learning module / digibook id for lm object
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$ref_id
Definition: sahs_server.php:39
+ Here is the call graph for this function:

◆ activatePages()

ilStructureObjectGUI::activatePages ( )

activates or deactivates pages

Definition at line 512 of file class.ilStructureObjectGUI.php.

References $_POST, ilLMObjectGUI\$lng, $path, ilPageObject\_lookupActive(), ilLMObject\_lookupType(), ilPageObject\_writeActive(), and ilUtil\sendFailure().

513  {
514  global $lng;
515 
516  include_once("./Modules/LearningModule/classes/class.ilLMPage.php");
517  if (is_array($_POST["id"]))
518  {
519  $act_items = array();
520  // get all "top" ids, i.e. remove ids, that have a selected parent
521  foreach($_POST["id"] as $id)
522  {
523  $path = $this->tree->getPathId($id);
524  $take = true;
525  foreach($path as $path_id)
526  {
527  if ($path_id != $id && in_array($path_id, $_POST["id"]))
528  {
529  $take = false;
530  }
531  }
532  if ($take)
533  {
534  $act_items[] = $id;
535  }
536  }
537 
538 
539  foreach($act_items as $id)
540  {
541  $childs = $this->tree->getChilds($id);
542  foreach($childs as $child)
543  {
544  if (ilLMObject::_lookupType($child["child"]) == "pg")
545  {
546  $act = ilLMPage::_lookupActive($child["child"],
547  $this->content_object->getType());
548  ilLMPage::_writeActive($child["child"],
549  $this->content_object->getType(), !$act);
550  }
551  }
552  if (ilLMObject::_lookupType($id) == "pg")
553  {
554  $act = ilLMPage::_lookupActive($id,
555  $this->content_object->getType());
557  $this->content_object->getType(), !$act);
558  }
559  }
560  }
561  else
562  {
563  ilUtil::sendFailure($lng->txt("no_checkbox"), true);
564  }
565 
566  $this->ctrl->redirect($this, "view");
567  }
static _lookupType($a_obj_id, $a_lm_id=0)
Lookup type.
$_POST['username']
Definition: cron.php:12
static _lookupActive($a_id, $a_parent_type, $a_check_scheduled_activation=false, $a_lang="-")
lookup activation status
_writeActive($a_id, $a_parent_type, $a_active, $a_reset_scheduled_activation=true, $a_lang="-")
write activation status
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$path
Definition: index.php:22
+ Here is the call graph for this function:

◆ add_cell()

ilStructureObjectGUI::add_cell (   $val,
  $link = "" 
)

output a cell in object list

Definition at line 373 of file class.ilStructureObjectGUI.php.

374  {
375  if(!empty($link))
376  {
377  $this->tpl->setCurrentBlock("begin_link");
378  $this->tpl->setVariable("LINK_TARGET", $link);
379  $this->tpl->parseCurrentBlock();
380  $this->tpl->touchBlock("end_link");
381  }
382 
383  $this->tpl->setCurrentBlock("text");
384  $this->tpl->setVariable("TEXT_CONTENT", $val);
385  $this->tpl->parseCurrentBlock();
386  $this->tpl->setCurrentBlock("table_cell");
387  $this->tpl->parseCurrentBlock();
388  }

◆ cancel()

ilStructureObjectGUI::cancel ( )

cancel creation of new page or chapter

Definition at line 590 of file class.ilStructureObjectGUI.php.

References $_GET.

591  {
592  if ($_GET["obj_id"] != 0)
593  {
594  if ($_GET["new_type"] == "pg")
595  {
596  $this->ctrl->redirect($this, "view");
597  }
598  else
599  {
600  $this->ctrl->redirect($this, "subchap");
601  }
602  }
603  }
$_GET["client_id"]

◆ copyChapter()

ilStructureObjectGUI::copyChapter ( )

copy a single chapter (selection)

Definition at line 494 of file class.ilStructureObjectGUI.php.

References copyItems().

495  {
496  $this->copyItems("subchap");
497  }
copyItems($a_return="view")
Copy items to clipboard.
+ Here is the call graph for this function:

◆ copyItems()

ilStructureObjectGUI::copyItems (   $a_return = "view")

Copy items to clipboard.

Definition at line 231 of file class.ilStructureObjectGUI.php.

References $_POST, $ilCtrl, ilLMObjectGUI\$lng, ilLMObject\clipboardCopy(), ilUtil\sendFailure(), ilUtil\sendInfo(), ilEditClipboard\setAction(), ilUtil\stripSlashesArray(), and ilLMObject\uniqueTypesCheck().

Referenced by copyChapter(), and copyPage().

232  {
233  global $ilCtrl, $lng;
234 
235  $items = ilUtil::stripSlashesArray($_POST["id"]);
236  if (!is_array($items))
237  {
238  ilUtil::sendFailure($lng->txt("no_checkbox"), true);
239  $ilCtrl->redirect($this, "showHierarchy");
240  }
241 
242  $todel = array(); // delete IDs < 0 (needed for non-js editing)
243  foreach($items as $k => $item)
244  {
245  if ($item < 0)
246  {
247  $todel[] = $k;
248  }
249  }
250  foreach($todel as $k)
251  {
252  unset($items[$k]);
253  }
254 
255  if (!ilLMObject::uniqueTypesCheck($items))
256  {
257  ilUtil::sendFailure($lng->txt("cont_choose_pages_or_chapters_only"), true);
258  $ilCtrl->redirect($this, "showHierarchy");
259  }
260 
261  ilLMObject::clipboardCopy($this->content_object->getId(), $items);
263 
264  ilUtil::sendInfo($lng->txt("cont_selected_items_have_been_copied"), true);
265  $ilCtrl->redirect($this, $a_return);
266  }
$_POST['username']
Definition: cron.php:12
static uniqueTypesCheck($a_items)
Check for unique types (all pages or all chapters)
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static clipboardCopy($a_cont_obj_id, $a_ids)
Copy a set of chapters/pages into the clipboard.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ copyPage()

ilStructureObjectGUI::copyPage ( )

copy page

Definition at line 462 of file class.ilStructureObjectGUI.php.

References copyItems().

463  {
464  $this->copyItems();
465  }
copyItems($a_return="view")
Copy items to clipboard.
+ Here is the call graph for this function:

◆ create()

ilStructureObjectGUI::create ( )

create new page or chapter in chapter

Definition at line 115 of file class.ilStructureObjectGUI.php.

References $_GET, and setTabs().

116  {
117  if ($_GET["obj_id"] != "")
118  {
119  $this->setTabs();
120  }
121  parent::create();
122  }
$_GET["client_id"]
+ Here is the call graph for this function:

◆ cutChapter()

ilStructureObjectGUI::cutChapter ( )

Cut chapter(s)

Definition at line 486 of file class.ilStructureObjectGUI.php.

References cutItems().

487  {
488  $this->cutItems("subchap");
489  }
cutItems($a_return="view")
Copy items to clipboard, then cut them from the current tree.
+ Here is the call graph for this function:

◆ cutItems()

ilStructureObjectGUI::cutItems (   $a_return = "view")

Copy items to clipboard, then cut them from the current tree.

Definition at line 190 of file class.ilStructureObjectGUI.php.

References $_POST, $ilCtrl, ilLMObjectGUI\$lng, ilLMObject\clipboardCut(), ilUtil\sendFailure(), ilUtil\sendInfo(), ilEditClipboard\setAction(), ilUtil\stripSlashesArray(), and ilLMObject\uniqueTypesCheck().

Referenced by cutChapter(), and cutPage().

191  {
192  global $ilCtrl, $lng;
193 
194  $items = ilUtil::stripSlashesArray($_POST["id"]);
195  if (!is_array($items))
196  {
197  ilUtil::sendFailure($lng->txt("no_checkbox"), true);
198  $ilCtrl->redirect($this, "showHierarchy");
199  }
200 
201  $todel = array(); // delete IDs < 0 (needed for non-js editing)
202  foreach($items as $k => $item)
203  {
204  if ($item < 0)
205  {
206  $todel[] = $k;
207  }
208  }
209  foreach($todel as $k)
210  {
211  unset($items[$k]);
212  }
213 
214  if (!ilLMObject::uniqueTypesCheck($items))
215  {
216  ilUtil::sendFailure($lng->txt("cont_choose_pages_or_chapters_only"), true);
217  $ilCtrl->redirect($this, "showHierarchy");
218  }
219 
220  ilLMObject::clipboardCut($this->content_object->getId(), $items);
222  //ilUtil::sendInfo($this->lng->txt("msg_cut_clipboard"), true);
223  ilUtil::sendInfo($lng->txt("cont_selected_items_have_been_cut"), true);
224 
225  $ilCtrl->redirect($this, $a_return);
226  }
$_POST['username']
Definition: cron.php:12
static uniqueTypesCheck($a_items)
Check for unique types (all pages or all chapters)
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
clipboardCut($a_cont_obj_id, $a_ids)
Copy a set of chapters/pages into the clipboard.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cutPage()

ilStructureObjectGUI::cutPage ( )

cut page

Definition at line 454 of file class.ilStructureObjectGUI.php.

References cutItems().

455  {
456  $this->cutItems();
457  }
cutItems($a_return="view")
Copy items to clipboard, then cut them from the current tree.
+ Here is the call graph for this function:

◆ edit()

ilStructureObjectGUI::edit ( )

Definition at line 124 of file class.ilStructureObjectGUI.php.

References view().

125  {
126  $this->view();
127  }
+ Here is the call graph for this function:

◆ editMasterLanguage()

ilStructureObjectGUI::editMasterLanguage ( )

Edit master language.

Parameters

Definition at line 1001 of file class.ilStructureObjectGUI.php.

References $ilCtrl.

1002  {
1003  global $ilCtrl;
1004 
1005  $ilCtrl->setParameter($this, "transl", "");
1006  $ilCtrl->redirect($this, "showHierarchy");
1007  }
global $ilCtrl
Definition: ilias.php:18

◆ executeCommand()

& ilStructureObjectGUI::executeCommand ( )

execute command

Definition at line 60 of file class.ilStructureObjectGUI.php.

References $_POST, $cmd, $ret, ilMDEditorGUI\addObserver(), initConditionHandlerInterface(), and setTabs().

61  {
62 //echo "<br>:cmd:".$this->ctrl->getCmd().":cmdClass:".$this->ctrl->getCmdClass().":";
63  $next_class = $this->ctrl->getNextClass($this);
64  $cmd = $this->ctrl->getCmd();
65 
66  switch($next_class)
67  {
68  case 'ilmdeditorgui':
69 
70  $this->setTabs();
71  include_once 'Services/MetaData/classes/class.ilMDEditorGUI.php';
72 
73  $md_gui =& new ilMDEditorGUI($this->content_object->getID(),
74  $this->obj->getId(), $this->obj->getType());
75  $md_gui->addObserver($this->obj,'MDUpdateListener','General');
76 
77  $this->ctrl->forwardCommand($md_gui);
78  break;
79 
80  case "ilconditionhandlerinterface":
81  global $ilTabs;
82  include_once './Services/AccessControl/classes/class.ilConditionHandlerInterface.php';
83 
84  $this->setTabs();
86  $this->ctrl->forwardCommand($this->condHI);
87  $ilTabs->setTabActive('preconditions');
88  break;
89 
90  default:
91  if($cmd == 'listConditions')
92  {
93  $this->setTabs();
95  $ret =& $this->condHI->executeCommand();
96  }
97  elseif(($cmd == "create") && ($_POST["new_type"] == "pg"))
98  {
99  $this->setTabs();
100  $pg_gui =& new ilLMPageObjectGUI($this->content_object);
101  $ret =& $pg_gui->executeCommand();
102  }
103  else
104  {
105  $ret =& $this->$cmd();
106  }
107  break;
108  }
109  }
$_POST['username']
Definition: cron.php:12
$cmd
Definition: sahs_server.php:35
addObserver(&$a_class, $a_method, $a_element)
Class ilLMPageObjectGUI.
+ Here is the call graph for this function:

◆ getType()

ilStructureObjectGUI::getType ( )

this function is called by condition handler gui interface

Definition at line 52 of file class.ilStructureObjectGUI.php.

53  {
54  return "st";
55  }

◆ ilStructureObjectGUI()

ilStructureObjectGUI::ilStructureObjectGUI ( $a_content_obj,
$a_tree 
)

Constructor public.

Definition at line 30 of file class.ilStructureObjectGUI.php.

References ilLMObjectGUI\$ilias, ilLMObjectGUI\$lng, and ilLMObjectGUI\$tpl.

31  {
32  global $ilias, $tpl, $lng;
33 
34  parent::ilLMObjectGUI($a_content_obj);
35  $this->tree =& $a_tree;
36  }

◆ initConditionHandlerInterface()

ilStructureObjectGUI::initConditionHandlerInterface ( )

Definition at line 573 of file class.ilStructureObjectGUI.php.

Referenced by executeCommand().

574  {
575  include_once("./Services/AccessControl/classes/class.ilConditionHandlerInterface.php");
576 
577  $this->condHI =& new ilConditionHandlerInterface($this);
578  $this->condHI->setBackButtons(array());
579  $this->condHI->setAutomaticValidation(false);
580  $this->condHI->setTargetType("st");
581  $this->condHI->setTargetRefId($this->content_object->getRefId());
582  $this->condHI->setTargetId($this->obj->getId());
583  $this->condHI->setTargetTitle($this->obj->getTitle());
584  }
class ilConditionHandlerInterface
+ Here is the caller graph for this function:

◆ initSetPageLayoutForm()

ilStructureObjectGUI::initSetPageLayoutForm ( )

Init set page layout form.

Definition at line 948 of file class.ilStructureObjectGUI.php.

References $_POST, $ilCtrl, ilLMObjectGUI\$lng, and ilObjContentObjectGUI\getLayoutOption().

Referenced by setPageLayout().

949  {
950  global $lng, $ilCtrl;
951 
952  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
953  $this->form = new ilPropertyFormGUI();
954 
955  if (is_array($_POST["id"]))
956  {
957  foreach ($_POST["id"] as $id)
958  {
959  $hi = new ilHiddenInputGUI("id[]");
960  $hi->setValue($id);
961  $this->form->addItem($hi);
962  }
963  }
964  $layout = ilObjContentObjectGUI::getLayoutOption($lng->txt("cont_layout"), "layout",
965  $this->content_object->getLayout());
966 
967  $this->form->addItem($layout);
968 
969  $this->form->addCommandButton("savePageLayout", $lng->txt("save"));
970  $this->form->addCommandButton("showHierarchy", $lng->txt("cancel"));
971 
972  $this->form->setTitle($lng->txt("cont_set_layout"));
973  $this->form->setFormAction($ilCtrl->getFormAction($this));
974 
975  }
$_POST['username']
Definition: cron.php:12
This class represents a property form user interface.
static getLayoutOption($a_txt, $a_var, $a_def_option="")
Save help mapping.
global $ilCtrl
Definition: ilias.php:18
This class represents a hidden form property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertChapter()

ilStructureObjectGUI::insertChapter (   $a_as_sub = false)

Insert (multiple) chapters at node.

Definition at line 688 of file class.ilStructureObjectGUI.php.

References $ilCtrl, ilLMObjectGUI\$lng, ilHierarchyFormGUI\getPostFirstChild(), ilHierarchyFormGUI\getPostMulti(), ilHierarchyFormGUI\getPostNodeId(), IL_FIRST_NODE, and ilLMObject\putInTree().

Referenced by insertSubchapter().

689  {
690  global $ilCtrl, $lng;
691 
692  include_once("./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
693 
696 
697  if ($a_as_sub) // as subchapter
698  {
699  if (!ilChapterHierarchyFormGUI::getPostFirstChild()) // insert under parent
700  {
701  $parent_id = $node_id;
702  $target = "";
703  }
704  else // we shouldnt end up here
705  {
706  $ilCtrl->redirect($this, "showHierarchy");
707  return;
708  }
709  }
710  else // as chapter
711  {
712  if (!ilChapterHierarchyFormGUI::getPostFirstChild()) // insert after node id
713  {
714  $parent_id = $this->tree->getParentId($node_id);
715  $target = $node_id;
716  }
717  else // insert as first child
718  {
719  $parent_id = $node_id;
720  $target = IL_FIRST_NODE;
721  }
722  }
723  for ($i = 1; $i <= $num; $i++)
724  {
725  $chap = new ilStructureObject($this->content_object);
726  $chap->setType("st");
727  $chap->setTitle($lng->txt("cont_new_chap"));
728  $chap->setLMId($this->content_object->getId());
729  $chap->create();
730  ilLMObject::putInTree($chap, $parent_id, $target);
731  }
732 
733  $ilCtrl->redirect($this, "view");
734  }
static getPostMulti()
Get multi number of _POST input.
static getPostNodeId()
Get node ID of _POST input.
global $ilCtrl
Definition: ilias.php:18
static getPostFirstChild()
Should node be inserted as first child of target node (true) or as successor (false) ...
const IL_FIRST_NODE
Definition: class.ilTree.php:5
static putInTree($a_obj, $a_parent_id="", $a_target_node_id="")
put this object into content object tree
Class ilStructreObject.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertChapterClip()

ilStructureObjectGUI::insertChapterClip (   $a_as_sub = false,
  $a_return = "view" 
)

Insert Chapter from clipboard.

Definition at line 749 of file class.ilStructureObjectGUI.php.

References $ilCtrl, $ilLog, $ilUser, ilEditClipboard\clear(), ilEditClipboard\getAction(), ilHierarchyFormGUI\getPostFirstChild(), ilHierarchyFormGUI\getPostNodeId(), IL_FIRST_NODE, ilLMObject\pasteTree(), and ilLMObject\updateInternalLinks().

Referenced by insertSubchapterClip(), and pasteChapter().

750  {
751  global $ilUser, $ilCtrl, $ilLog;
752 
753  $ilLog->write("Insert Chapter From Clipboard");
754 
755  include_once("./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
756 
759 
760  if ($a_as_sub) // as subchapter
761  {
762  if (!$first_child) // insert under parent
763  {
764  $parent_id = $node_id;
765  $target = "";
766  }
767  else // we shouldnt end up here
768  {
769  $ilCtrl->redirect($this, "showHierarchy");
770  return;
771  }
772  }
773  else // as chapter
774  {
775  if (!$first_child) // insert after node id
776  {
777  $parent_id = $this->tree->getParentId($node_id);
778  $target = $node_id;
779  }
780  else // insert as first child
781  {
782  $parent_id = $node_id;
783  $target = IL_FIRST_NODE;
784 
785  // do not move a chapter in front of a page
786  $childs = $this->tree->getChildsByType($parent_id, "pg");
787  if (count($childs) != 0)
788  {
789  $target = $childs[count($childs) - 1]["obj_id"];
790  }
791  }
792  }
793 
794  // copy and paste
795  $chapters = $ilUser->getClipboardObjects("st", true);
796  $copied_nodes = array();
797 
798  foreach ($chapters as $chap)
799  {
800  $ilLog->write("Call pasteTree, Target LM: ".$this->content_object->getId().", Chapter ID: ".$chap["id"]
801  .", Parent ID: ".$parent_id.", Target: ".$target);
802  $cid = ilLMObject::pasteTree($this->content_object, $chap["id"], $parent_id,
803  $target, $chap["insert_time"], $copied_nodes,
804  (ilEditClipboard::getAction() == "copy"));
805  $target = $cid;
806  }
807  ilLMObject::updateInternalLinks($copied_nodes);
808 
809  if (ilEditClipboard::getAction() == "cut")
810  {
811  $ilUser->clipboardDeleteObjectsOfType("pg");
812  $ilUser->clipboardDeleteObjectsOfType("st");
814  }
815 
816  $this->content_object->checkTree();
817  $ilCtrl->redirect($this, $a_return);
818  }
static updateInternalLinks($a_copied_nodes, $a_parent_type="lm")
Update internal links, after multiple pages have been copied.
static getPostNodeId()
Get node ID of _POST input.
static pasteTree($a_target_lm, $a_item_id, $a_parent_id, $a_target, $a_insert_time, &$a_copied_nodes, $a_as_copy=false, $a_source_lm=null)
Paste item (tree) from clipboard to current lm.
global $ilCtrl
Definition: ilias.php:18
static getPostFirstChild()
Should node be inserted as first child of target node (true) or as successor (false) ...
const IL_FIRST_NODE
Definition: class.ilTree.php:5
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertPage()

ilStructureObjectGUI::insertPage ( )

Insert (multiple) pages at node.

Definition at line 831 of file class.ilStructureObjectGUI.php.

References $ilCtrl, ilLMObjectGUI\$lng, ilHierarchyFormGUI\getPostFirstChild(), ilHierarchyFormGUI\getPostMulti(), ilHierarchyFormGUI\getPostNodeId(), IL_FIRST_NODE, and ilLMObject\putInTree().

832  {
833  global $ilCtrl, $lng;
834 
835  include_once("./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
836 
839 
840  if (!ilChapterHierarchyFormGUI::getPostFirstChild()) // insert after node id
841  {
842  $parent_id = $this->tree->getParentId($node_id);
843  $target = $node_id;
844  }
845  else // insert as first child
846  {
847  $parent_id = $node_id;
848  $target = IL_FIRST_NODE;
849  }
850 
851  for ($i = 1; $i <= $num; $i++)
852  {
853  $page = new ilLMPageObject($this->content_object);
854  $page->setType("pg");
855  $page->setTitle($lng->txt("cont_new_page"));
856  $page->setLMId($this->content_object->getId());
857  $page->create();
858  ilLMObject::putInTree($page, $parent_id, $target);
859  }
860 
861  $ilCtrl->redirect($this, "showHierarchy");
862  }
static getPostMulti()
Get multi number of _POST input.
static getPostNodeId()
Get node ID of _POST input.
global $ilCtrl
Definition: ilias.php:18
static getPostFirstChild()
Should node be inserted as first child of target node (true) or as successor (false) ...
Class ilLMPageObject.
const IL_FIRST_NODE
Definition: class.ilTree.php:5
static putInTree($a_obj, $a_parent_id="", $a_target_node_id="")
put this object into content object tree
+ Here is the call graph for this function:

◆ insertPageClip()

ilStructureObjectGUI::insertPageClip ( )

Insert pages from clipboard.

Definition at line 867 of file class.ilStructureObjectGUI.php.

References $ilCtrl, $ilUser, ilEditClipboard\clear(), ilEditClipboard\getAction(), ilHierarchyFormGUI\getPostFirstChild(), ilHierarchyFormGUI\getPostNodeId(), IL_FIRST_NODE, ilLMObject\pasteTree(), and ilLMObject\updateInternalLinks().

Referenced by pastePage().

868  {
869  global $ilCtrl, $ilUser;
870 
871  include_once("./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
872 
875 
876  if (!$first_child) // insert after node id
877  {
878  $parent_id = $this->tree->getParentId($node_id);
879  $target = $node_id;
880  }
881  else // insert as first child
882  {
883  $parent_id = $node_id;
884  $target = IL_FIRST_NODE;
885  }
886 
887  // cut and paste
888  $pages = $ilUser->getClipboardObjects("pg");
889  $copied_nodes = array();
890  foreach ($pages as $pg)
891  {
892  $cid = ilLMObject::pasteTree($this->content_object, $pg["id"], $parent_id, $target,
893  $pg["insert_time"], $copied_nodes,
894  (ilEditClipboard::getAction() == "copy"));
895  $target = $cid;
896  }
897  ilLMObject::updateInternalLinks($copied_nodes);
898 
899  if (ilEditClipboard::getAction() == "cut")
900  {
901  $ilUser->clipboardDeleteObjectsOfType("pg");
902  $ilUser->clipboardDeleteObjectsOfType("st");
904  }
905 
906  $ilCtrl->redirect($this, "view");
907  }
static updateInternalLinks($a_copied_nodes, $a_parent_type="lm")
Update internal links, after multiple pages have been copied.
static getPostNodeId()
Get node ID of _POST input.
static pasteTree($a_target_lm, $a_item_id, $a_parent_id, $a_target, $a_insert_time, &$a_copied_nodes, $a_as_copy=false, $a_source_lm=null)
Paste item (tree) from clipboard to current lm.
global $ilCtrl
Definition: ilias.php:18
static getPostFirstChild()
Should node be inserted as first child of target node (true) or as successor (false) ...
const IL_FIRST_NODE
Definition: class.ilTree.php:5
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertSubchapter()

ilStructureObjectGUI::insertSubchapter ( )

Insert (multiple) subchapters at node.

Definition at line 739 of file class.ilStructureObjectGUI.php.

References $ilCtrl, and insertChapter().

740  {
741  global $ilCtrl;
742 
743  $this->insertChapter(true);
744  }
global $ilCtrl
Definition: ilias.php:18
insertChapter($a_as_sub=false)
Insert (multiple) chapters at node.
+ Here is the call graph for this function:

◆ insertSubchapterClip()

ilStructureObjectGUI::insertSubchapterClip ( )

Insert Chapter from clipboard.

Definition at line 823 of file class.ilStructureObjectGUI.php.

References insertChapterClip().

824  {
825  $this->insertChapterClip(true);
826  }
insertChapterClip($a_as_sub=false, $a_return="view")
Insert Chapter from clipboard.
+ Here is the call graph for this function:

◆ pasteChapter()

ilStructureObjectGUI::pasteChapter ( )

paste chapter

Definition at line 502 of file class.ilStructureObjectGUI.php.

References $ilUser, and insertChapterClip().

503  {
504  global $ilUser;
505 
506  return $this->insertChapterClip(false, "subchap");
507  }
insertChapterClip($a_as_sub=false, $a_return="view")
Insert Chapter from clipboard.
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ pastePage()

ilStructureObjectGUI::pastePage ( )

paste page

Definition at line 470 of file class.ilStructureObjectGUI.php.

References $ilUser, and insertPageClip().

471  {
472  global $ilUser;
473 
474  if (!$ilUser->clipboardHasObjectsOfType("pg"))
475  {
476  $this->ilias->raiseError($this->lng->txt("no_page_in_clipboard"),$this->ilias->error_obj->MESSAGE);
477  }
478 
479  return $this->insertPageClip();
480  }
redirection script todo: (a better solution should control the processing via a xml file) ...
insertPageClip()
Insert pages from clipboard.
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ proceedDragDrop()

ilStructureObjectGUI::proceedDragDrop ( )

Perform drag and drop action.

Definition at line 913 of file class.ilStructureObjectGUI.php.

References $_POST, and $ilCtrl.

914  {
915  global $ilCtrl;
916 
917 //echo "-".$_POST["il_hform_source_id"]."-".$_POST["il_hform_target_id"]."-".$_POST["il_hform_fc"]."-";
918  $this->content_object->executeDragDrop($_POST["il_hform_source_id"], $_POST["il_hform_target_id"],
919  $_POST["il_hform_fc"], $_POST["il_hform_as_subitem"]);
920  $ilCtrl->redirect($this, "showHierarchy");
921  }
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18

◆ putInTree()

ilStructureObjectGUI::putInTree ( )

put chapter into tree

Definition at line 420 of file class.ilStructureObjectGUI.php.

References $_GET, IL_FIRST_NODE, IL_LAST_NODE, and ilTree\setTableNames().

Referenced by save().

421  {
422 //echo "st:putInTree";
423  // chapters should be behind pages in the tree
424  // so if target is first node, the target is substituted with
425  // the last child of type pg
426  if ($_GET["target"] == IL_FIRST_NODE)
427  {
428  $tree = new ilTree($this->content_object->getId());
429  $tree->setTableNames('lm_tree','lm_data');
430  $tree->setTreeTablePK("lm_id");
431 
432  // determine parent node id
433  $parent_id = (!empty($_GET["obj_id"]))
434  ? $_GET["obj_id"]
435  : $tree->getRootId();
436  // determine last child of type pg
437  $childs =& $tree->getChildsByType($parent_id, "pg");
438  if (count($childs) != 0)
439  {
440  $_GET["target"] = $childs[count($childs) - 1]["obj_id"];
441  }
442  }
443  if (empty($_GET["target"]))
444  {
445  $_GET["target"] = IL_LAST_NODE;
446  }
447 
448  parent::putInTree();
449  }
$_GET["client_id"]
const IL_FIRST_NODE
Definition: class.ilTree.php:5
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
const IL_LAST_NODE
Definition: class.ilTree.php:4
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

ilStructureObjectGUI::save ( )

save new chapter

Definition at line 394 of file class.ilStructureObjectGUI.php.

References $_GET, $_POST, ilLMObjectGUI\checkTree(), putInTree(), and ilUtil\stripSlashes().

395  {
396 
397  $this->obj =& new ilStructureObject($this->content_object);
398 
399  $this->obj->setType("st");
400  $this->obj->setTitle(ilUtil::stripSlashes($_POST["Fobject"]["title"]));
401  $this->obj->setDescription(ilUtil::stripSlashes($_POST["Fobject"]["desc"]));
402  $this->obj->setLMId($this->content_object->getId());
403  $this->obj->create();
404 
405  $this->putInTree();
406 
407  // check the tree
408  $this->checkTree();
409 
410  if (!empty($_GET["obj_id"]))
411  {
412  $this->ctrl->redirect($this, "subchap");
413  }
414 
415  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
checkTree()
check the content object tree
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
Class ilStructreObject.
putInTree()
put chapter into tree
+ Here is the call graph for this function:

◆ saveAllTitles()

ilStructureObjectGUI::saveAllTitles ( )

Save all titles of chapters/pages.

Definition at line 271 of file class.ilStructureObjectGUI.php.

References $_GET, $_POST, $ilCtrl, ilLMObject\saveTitles(), and ilUtil\stripSlashesArray().

272  {
273  global $ilCtrl;
274 
275  ilLMObject::saveTitles($this->content_object, ilUtil::stripSlashesArray($_POST["title"]), $_GET["transl"]);
276 
277  $ilCtrl->redirect($this, "showHierarchy");
278  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
static saveTitles($a_lm, $a_titles, $a_lang="-")
Save titles for lm objects.
global $ilCtrl
Definition: ilias.php:18
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
+ Here is the call graph for this function:

◆ savePageLayout()

ilStructureObjectGUI::savePageLayout ( )

Save page layout.

Definition at line 980 of file class.ilStructureObjectGUI.php.

References $_POST, $ilCtrl, ilLMObjectGUI\$lng, ilUtil\sendSuccess(), ilUtil\stripSlashes(), and ilLMObject\writeLayout().

981  {
982  global $lng, $ilCtrl;
983 
984  foreach ($_POST["id"] as $id)
985  {
986  $id = ilUtil::stripSlashes($id);
988  ilUtil::stripSlashes($_POST["layout"]),
989  $this->content_object);
990  }
991  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
992  $ilCtrl->redirect($this, "showHierarchy");
993  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
static writeLayout($a_obj_id, $a_layout, $a_lm=null)
Write layout setting.
global $ilCtrl
Definition: ilias.php:18
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
+ Here is the call graph for this function:

◆ setPageLayout()

ilStructureObjectGUI::setPageLayout ( )

Set layout for multipl pages.

Definition at line 930 of file class.ilStructureObjectGUI.php.

References $_POST, $ilCtrl, ilLMObjectGUI\$lng, ilLMObjectGUI\$tpl, initSetPageLayoutForm(), and ilUtil\sendFailure().

931  {
932  global $tpl, $ilCtrl, $lng;
933 
934  if (!is_array($_POST["id"]))
935  {
936  ilUtil::sendFailure($lng->txt("no_checkbox"), true);
937  $ilCtrl->redirect($this, "showHierarchy");
938  }
939 
940  $this->initSetPageLayoutForm();
941 
942  $tpl->setContent($this->form->getHTML());
943  }
$_POST['username']
Definition: cron.php:12
initSetPageLayoutForm()
Init set page layout form.
global $ilCtrl
Definition: ilias.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ setStructureObject()

ilStructureObjectGUI::setStructureObject ( $a_st_object)

set structure object

Parameters
object$a_st_objectstructure object

Definition at line 43 of file class.ilStructureObjectGUI.php.

44  {
45  $this->obj =& $a_st_object;
46  }

◆ setTabs()

ilStructureObjectGUI::setTabs ( )

output tabs

Definition at line 609 of file class.ilStructureObjectGUI.php.

References $ilUser, ilLMObjectGUI\$lng, and ilUtil\getImagePath().

Referenced by create(), executeCommand(), showHierarchy(), and subchap().

610  {
611  global $ilTabs, $ilUser, $lng;
612 
613  // subelements
614  $ilTabs->addTarget("cont_pages_and_subchapters",
615  $this->ctrl->getLinkTarget($this,'showHierarchy'),
616  array("view", "showHierarchy"), get_class($this));
617 
618  // preconditions
619  $ilTabs->addTarget("preconditions",
620  $this->ctrl->getLinkTarget($this, 'listConditions'),
621  "listConditions", get_class($this));
622 
623  // metadata
624  $ilTabs->addTarget("meta_data",
625  $this->ctrl->getLinkTargetByClass("ilmdeditorgui",''),
626  "", "ilmdeditorgui");
627 
628  $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_st_b.png"));
629  $this->tpl->setTitle(
630  $this->lng->txt($this->obj->getType()).": ".$this->obj->getTitle());
631 
632  // presentation view
633  $ilTabs->addNonTabbedLink("pres_mode", $lng->txt("cont_presentation_view"),
634  ILIAS_HTTP_PATH."/goto.php?target=st_".$this->obj->getId(), "_top");
635  }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showHierarchy()

ilStructureObjectGUI::showHierarchy ( )

Show subhiearchy of pages and subchapters.

Definition at line 143 of file class.ilStructureObjectGUI.php.

References $_GET, $ilCtrl, ilLMObjectGUI\$lng, ilUtil\getImagePath(), ilObjContentObjectGUI\getMultiLangHeader(), ilFormGUI\setFormAction(), and setTabs().

Referenced by view().

144  {
145  global $lng, $ilCtrl;
146 
147  $this->setTabs();
148 
149  $ilCtrl->setParameter($this, "backcmd", "showHierarchy");
150 
151  include_once("./Modules/LearningModule/classes/class.ilChapterHierarchyFormGUI.php");
152  $form_gui = new ilChapterHierarchyFormGUI($this->content_object->getType(), $_GET["transl"]);
153  $form_gui->setFormAction($ilCtrl->getFormAction($this));
154  $form_gui->setTitle($this->obj->getTitle());
155  $form_gui->setIcon(ilUtil::getImagePath("icon_st.png"));
156  $form_gui->setTree($this->tree);
157  $form_gui->setCurrentTopNodeId($this->obj->getId());
158  $form_gui->addMultiCommand($lng->txt("delete"), "delete");
159  $form_gui->addMultiCommand($lng->txt("cut"), "cutItems");
160  $form_gui->addMultiCommand($lng->txt("copy"), "copyItems");
161  $form_gui->addMultiCommand($lng->txt("cont_de_activate"), "activatePages");
162  if ($this->content_object->getLayoutPerPage())
163  {
164  $form_gui->addMultiCommand($lng->txt("cont_set_layout"), "setPageLayout");
165  }
166  $form_gui->setDragIcon(ilUtil::getImagePath("icon_pg_s.png"));
167  $form_gui->addCommand($lng->txt("cont_save_all_titles"), "saveAllTitles");
168  $form_gui->addHelpItem($lng->txt("cont_chapters_after_pages"));
169  $up_gui = ($this->content_object->getType() == "dbk")
170  ? "ilobjdlbookgui"
171  : "ilobjlearningmodulegui";
172  $ilCtrl->setParameterByClass($up_gui, "active_node", $this->obj->getId());
173  $form_gui->setExplorerUpdater("tree", "tree_div",
174  $ilCtrl->getLinkTargetByClass($up_gui, "explorer", "", true));
175  $ilCtrl->setParameterByClass($up_gui, "active_node", "");
176 
177  $ctpl = new ilTemplate("tpl.chap_and_pages.html", true, true, "Modules/LearningModule");
178  $ctpl->setVariable("HIERARCHY_FORM", $form_gui->getHTML());
179  $ilCtrl->setParameter($this, "obj_id", $_GET["obj_id"]);
180 
181  include_once("./Modules/LearningModule/classes/class.ilObjContentObjectGUI.php");
182  $ml_head = ilObjContentObjectGUI::getMultiLangHeader($this->content_object->getId(), $this);
183 
184  $this->tpl->setContent($ml_head.$ctpl->get());
185  }
static getMultiLangHeader($a_lm_id, $a_gui_class)
Get multi lang header.
$_GET["client_id"]
setFormAction($a_formaction)
Set FormAction.
global $ilCtrl
Definition: ilias.php:18
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
This class represents a hierarchical form.
special template class to simplify handling of ITX/PEAR
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ subchap()

ilStructureObjectGUI::subchap ( )

Definition at line 283 of file class.ilStructureObjectGUI.php.

References $_GET, $ilCtrl, $ilUser, ilLMObjectGUI\$lng, $tree, ilStructureObject\_getPresentationTitle(), ilUtil\formSelect(), ilUtil\getImagePath(), IL_FIRST_NODE, setTabs(), ilLMObjectGUI\showActions(), and ilUtil\switchColor().

284  {
285  global $tree, $ilCtrl, $lng, $ilUser;
286 
287  $this->setTabs();
288 
289  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.structure_edit.html", "Modules/LearningModule");
290  $num = 0;
291 
292  $this->tpl->setCurrentBlock("form");
293  $this->ctrl->setParameter($this, "backcmd", "subchap");
294  $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
295  $this->tpl->setVariable("HEADER_TEXT", $this->lng->txt("cont_subchapters"));
296  $this->tpl->setVariable("CHECKBOX_TOP", IL_FIRST_NODE);
297 
298  $cnt = 0;
299  $childs = $this->tree->getChilds($this->obj->getId());
300  foreach ($childs as $child)
301  {
302  if($child["type"] != "st")
303  {
304  continue;
305  }
306  $this->tpl->setCurrentBlock("table_row");
307  // color changing
308  $css_row = ilUtil::switchColor($cnt++,"tblrow1","tblrow2");
309 
310  // checkbox
311  $this->tpl->setVariable("CHECKBOX_ID", $child["obj_id"]);
312  $this->tpl->setVariable("CSS_ROW", $css_row);
313  $this->tpl->setVariable("IMG_OBJ", ilUtil::getImagePath("icon_st.png"));
314 
315  // type
316  $this->ctrl->setParameterByClass("ilStructureObjectGUI", "obj_id", $child["obj_id"]);
317  $link = $this->ctrl->getLinkTargetByClass("ilStructureObjectGUI", "view");
318  $this->tpl->setVariable("LINK_TARGET", $link);
319 
320  // title
321  $this->tpl->setVariable("TEXT_CONTENT",
323  $this->content_object->isActiveNumbering()));
324 
325  $this->tpl->parseCurrentBlock();
326  }
327  if($cnt == 0)
328  {
329  $this->tpl->setCurrentBlock("notfound");
330  $this->tpl->setVariable("NUM_COLS", 3);
331  $this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
332  $this->tpl->parseCurrentBlock();
333  }
334  //else
335  //{
336  // SHOW VALID ACTIONS
337  $this->tpl->setVariable("NUM_COLS", 3);
338  $acts = array("delete" => "delete", "cutChapter" => "cut",
339  "copyChapter" => "copyChapter");
340  if ($ilUser->clipboardHasObjectsOfType("st"))
341  {
342  $acts["pasteChapter"] = "pasteChapter";
343  }
344  $this->showActions($acts);
345  //}
346 
347  // SHOW POSSIBLE SUB OBJECTS
348  $this->tpl->setVariable("NUM_COLS", 3);
349  //$this->showPossibleSubObjects("st");
350  $subobj = array("st");
351  $opts = ilUtil::formSelect(12,"new_type",$subobj);
352  //$this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.png"));
353  $this->tpl->setCurrentBlock("add_object");
354  $this->tpl->setVariable("SELECT_OBJTYPE", $opts);
355  //$this->tpl->setVariable("FORMACTION_OBJ_ADD", "adm_object.php?cmd=create&ref_id=".$_GET["ref_id"]);
356  $this->tpl->setVariable("BTN_NAME", "create");
357  $this->tpl->setVariable("TXT_ADD", $this->lng->txt("insert"));
358  $this->tpl->parseCurrentBlock();
359 
360  //$this->tpl->setVariable("NUM_COLS", 2);
361  //$this->showPossibleSubObjects("st");
362 
363  $this->tpl->setCurrentBlock("form");
364  $this->tpl->parseCurrentBlock();
365 
366  $ilCtrl->setParameter($this, "obj_id", $_GET["obj_id"]);
367 
368  }
static _getPresentationTitle($a_st_id, $a_include_numbers=false, $a_time_scheduled_activation=false, $a_lm_id=0, $a_lang="-")
get presentation title
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
const IL_FIRST_NODE
Definition: class.ilTree.php:5
showActions($a_actions)
show possible action (form buttons)
global $ilUser
Definition: imgupload.php:15
static switchColor($a_num, $a_css1, $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows) ...
+ Here is the call graph for this function:

◆ switchToLanguage()

ilStructureObjectGUI::switchToLanguage ( )

Switch to language.

Parameters

Definition at line 1015 of file class.ilStructureObjectGUI.php.

References $_GET, and $ilCtrl.

1016  {
1017  global $ilCtrl;
1018 
1019  $ilCtrl->setParameter($this, "transl", $_GET["totransl"]);
1020  $ilCtrl->redirect($this, "showHierarchy");
1021  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

◆ view()

ilStructureObjectGUI::view ( )

Definition at line 132 of file class.ilStructureObjectGUI.php.

References $ilCtrl, $ilUser, ilLMObjectGUI\$lng, $tree, and showHierarchy().

Referenced by edit().

133  {
134  global $tree, $ilUser, $ilCtrl, $lng;
135 
136  $this->showHierarchy();
137  }
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15
showHierarchy()
Show subhiearchy of pages and subchapters.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $obj

ilStructureObjectGUI::$obj

Definition at line 23 of file class.ilStructureObjectGUI.php.

◆ $tree

ilStructureObjectGUI::$tree

Definition at line 24 of file class.ilStructureObjectGUI.php.

Referenced by subchap(), and view().


The documentation for this class was generated from the following file: