ILIAS  release_7 Revision v7.30-3-g800a261c036
ilStructureObjectGUI Class Reference

Class ilStructureObjectGUI. More...

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

Public Member Functions

 __construct (&$a_content_obj, &$a_tree)
 Constructor @access 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...
 
 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...
 
 insertTemplate ()
 Displays GUI to select template for page. More...
 
 initInsertTemplateForm ()
 Init insert template form. More...
 
 insertPageFromTemplate ()
 Insert (multiple) pages templates at node. More...
 
- Public Member Functions inherited from ilLMObjectGUI
 __construct (&$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...
 

Static Public Member Functions

static _goto ($a_target, $a_target_ref_id="")
 redirect script More...
 

Data Fields

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

Protected Attributes

 $user
 
 $error
 
 $tabs
 
 $log
 
- Protected Attributes inherited from ilLMObjectGUI
 $ui
 

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$

@ilCtrl_Calls ilStructureObjectGUI: ilConditionHandlerGUI, ilObjectMetaDataGUI

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

Constructor & Destructor Documentation

◆ __construct()

ilStructureObjectGUI::__construct ( $a_content_obj,
$a_tree 
)

Constructor @access public.

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

47 {
48 global $DIC;
49
50 $this->tree = $DIC->repositoryTree();
51 $this->user = $DIC->user();
52 $this->ctrl = $DIC->ctrl();
53 $this->lng = $DIC->language();
54 $this->error = $DIC["ilErr"];
55 $this->tabs = $DIC->tabs();
56 $this->log = $DIC["ilLog"];
57 $this->tpl = $DIC["tpl"];
58 parent::__construct($a_content_obj);
59 $this->tree = $a_tree;
60 }
user()
Definition: user.php:4
error($a_errmsg)
set error message @access public
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), error(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

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

redirect script

Parameters
string$a_target

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

656 {
657 global $DIC;
658
659 $rbacsystem = $DIC->rbac()->system();
660 $ilErr = $DIC["ilErr"];
661 $lng = $DIC->language();
662 $ilAccess = $DIC->access();
663
664 // determine learning object
665 $lm_id = ilLMObject::_lookupContObjID($a_target);
666
667 // get all references
668 $ref_ids = ilObject::_getAllReferences($lm_id);
669
670 // always try passed ref id first
671 if (in_array($a_target_ref_id, $ref_ids)) {
672 $ref_ids = array_merge(array($a_target_ref_id), $ref_ids);
673 }
674
675 // check read permissions
676 foreach ($ref_ids as $ref_id) {
677 // Permission check
678 if ($ilAccess->checkAccess("read", "", $ref_id)) {
679 // don't redirect anymore, just set parameters
680 // (goto.php includes "ilias.php")
681 $_GET["baseClass"] = "ilLMPresentationGUI";
682 $_GET["obj_id"] = $a_target;
683 $_GET["ref_id"] = $ref_id;
684 include_once("ilias.php");
685 exit;
686 ;
687 }
688 }
689
690 if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
691 ilUtil::sendFailure(sprintf(
692 $lng->txt("msg_no_perm_read_item"),
694 ), true);
696 }
697
698 $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
699 }
$_GET["client_id"]
static _lookupContObjID($a_id)
get learning module / digibook id for lm object
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
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
const ROOT_FOLDER_ID
Definition: constants.php:30
exit
Definition: login.php:29
$ilErr
Definition: raiseError.php:18

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

+ Here is the call graph for this function:

◆ activatePages()

ilStructureObjectGUI::activatePages ( )

activates or deactivates pages

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

514 {
516
517 if (is_array($_POST["id"])) {
518 $act_items = array();
519 // get all "top" ids, i.e. remove ids, that have a selected parent
520 foreach ($_POST["id"] as $id) {
521 $path = $this->tree->getPathId($id);
522 $take = true;
523 foreach ($path as $path_id) {
524 if ($path_id != $id && in_array($path_id, $_POST["id"])) {
525 $take = false;
526 }
527 }
528 if ($take) {
529 $act_items[] = $id;
530 }
531 }
532
533
534 foreach ($act_items as $id) {
535 $childs = $this->tree->getChilds($id);
536 foreach ($childs as $child) {
537 if (ilLMObject::_lookupType($child["child"]) == "pg") {
539 $child["child"],
540 $this->content_object->getType()
541 );
543 $child["child"],
544 $this->content_object->getType(),
545 !$act
546 );
547 }
548 }
549 if (ilLMObject::_lookupType($id) == "pg") {
551 $id,
552 $this->content_object->getType()
553 );
555 $id,
556 $this->content_object->getType(),
557 !$act
558 );
559 }
560 }
561 } else {
562 ilUtil::sendFailure($lng->txt("no_checkbox"), true);
563 }
564
565 $this->ctrl->redirect($this, "view");
566 }
$_POST["username"]
static _lookupType($a_obj_id, $a_lm_id=0)
Lookup type.
static _writeActive( $a_id, $a_parent_type, $a_active, $a_reset_scheduled_activation=true, $a_lang="-")
write activation status
static _lookupActive($a_id, $a_parent_type, $a_check_scheduled_activation=false, $a_lang="-")
lookup activation status

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

+ Here is the call graph for this function:

◆ add_cell()

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

output a cell in object list

Reimplemented from ilLMObjectGUI.

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

382 {
383 if (!empty($link)) {
384 $this->tpl->setCurrentBlock("begin_link");
385 $this->tpl->setVariable("LINK_TARGET", $link);
386 $this->tpl->parseCurrentBlock();
387 $this->tpl->touchBlock("end_link");
388 }
389
390 $this->tpl->setCurrentBlock("text");
391 $this->tpl->setVariable("TEXT_CONTENT", $val);
392 $this->tpl->parseCurrentBlock();
393 $this->tpl->setCurrentBlock("table_cell");
394 $this->tpl->parseCurrentBlock();
395 }

◆ cancel()

ilStructureObjectGUI::cancel ( )

cancel creation of new page or chapter

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

588 {
589 if ($_GET["obj_id"] != 0) {
590 if ($_GET["new_type"] == "pg") {
591 $this->ctrl->redirect($this, "view");
592 } else {
593 $this->ctrl->redirect($this, "subchap");
594 }
595 }
596 }

References $_GET.

◆ copyChapter()

ilStructureObjectGUI::copyChapter ( )

copy a single chapter (selection)

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

496 {
497 $this->copyItems("subchap");
498 }
copyItems($a_return="view")
Copy items to clipboard.

References copyItems().

+ Here is the call graph for this function:

◆ copyItems()

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

Copy items to clipboard.

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

240 {
241 $ilCtrl = $this->ctrl;
243
244 $items = ilUtil::stripSlashesArray($_POST["id"]);
245 if (!is_array($items)) {
246 ilUtil::sendFailure($lng->txt("no_checkbox"), true);
247 $ilCtrl->redirect($this, "showHierarchy");
248 }
249
250 $todel = array(); // delete IDs < 0 (needed for non-js editing)
251 foreach ($items as $k => $item) {
252 if ($item < 0) {
253 $todel[] = $k;
254 }
255 }
256 foreach ($todel as $k) {
257 unset($items[$k]);
258 }
259
260 if (!ilLMObject::uniqueTypesCheck($items)) {
261 ilUtil::sendFailure($lng->txt("cont_choose_pages_or_chapters_only"), true);
262 $ilCtrl->redirect($this, "showHierarchy");
263 }
264
265 ilLMObject::clipboardCopy($this->content_object->getId(), $items);
267
268 ilUtil::sendInfo($lng->txt("cont_selected_items_have_been_copied"), true);
269 $ilCtrl->redirect($this, $a_return);
270 }
static setAction($a_action)
static clipboardCopy($a_cont_obj_id, $a_ids)
Copy a set of chapters/pages into the clipboard.
static uniqueTypesCheck($a_items)
Check for unique types (all pages or all chapters)
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.

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

Referenced by copyChapter(), and copyPage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ copyPage()

ilStructureObjectGUI::copyPage ( )

copy page

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

464 {
465 $this->copyItems();
466 }

References copyItems().

+ Here is the call graph for this function:

◆ create()

ilStructureObjectGUI::create ( )

create new page or chapter in chapter

Reimplemented from ilLMObjectGUI.

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

131 {
132 if ($_GET["obj_id"] != "") {
133 $this->setTabs();
134 }
135 parent::create();
136 }

References $_GET, and setTabs().

+ Here is the call graph for this function:

◆ cutChapter()

ilStructureObjectGUI::cutChapter ( )

Cut chapter(s)

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

488 {
489 $this->cutItems("subchap");
490 }
cutItems($a_return="view")
Copy items to clipboard, then cut them from the current tree.

References cutItems().

+ 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 202 of file class.ilStructureObjectGUI.php.

203 {
204 $ilCtrl = $this->ctrl;
206
207 $items = ilUtil::stripSlashesArray($_POST["id"]);
208 if (!is_array($items)) {
209 ilUtil::sendFailure($lng->txt("no_checkbox"), true);
210 $ilCtrl->redirect($this, "showHierarchy");
211 }
212
213 $todel = array(); // delete IDs < 0 (needed for non-js editing)
214 foreach ($items as $k => $item) {
215 if ($item < 0) {
216 $todel[] = $k;
217 }
218 }
219 foreach ($todel as $k) {
220 unset($items[$k]);
221 }
222
223 if (!ilLMObject::uniqueTypesCheck($items)) {
224 ilUtil::sendFailure($lng->txt("cont_choose_pages_or_chapters_only"), true);
225 $ilCtrl->redirect($this, "showHierarchy");
226 }
227
228 ilLMObject::clipboardCut($this->content_object->getId(), $items);
230 //ilUtil::sendInfo($this->lng->txt("msg_cut_clipboard"), true);
231 ilUtil::sendInfo($lng->txt("cont_selected_items_have_been_cut"), true);
232
233 $ilCtrl->redirect($this, $a_return);
234 }
static clipboardCut($a_cont_obj_id, $a_ids)
Copy a set of chapters/pages into the clipboard.

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

Referenced by cutChapter(), and cutPage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cutPage()

ilStructureObjectGUI::cutPage ( )

cut page

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

456 {
457 $this->cutItems();
458 }

References cutItems().

+ Here is the call graph for this function:

◆ edit()

ilStructureObjectGUI::edit ( )

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

139 {
140 $this->view();
141 }

References view().

+ Here is the call graph for this function:

◆ editMasterLanguage()

ilStructureObjectGUI::editMasterLanguage ( )

Edit master language.

Parameters

return

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

1006 {
1007 $ilCtrl = $this->ctrl;
1008
1009 $ilCtrl->setParameter($this, "transl", "");
1010 $ilCtrl->redirect($this, "showHierarchy");
1011 }

References ilLMObjectGUI\$ctrl.

◆ executeCommand()

ilStructureObjectGUI::executeCommand ( )

execute command

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

85 {
86 //echo "<br>:cmd:".$this->ctrl->getCmd().":cmdClass:".$this->ctrl->getCmdClass().":";
87 $next_class = $this->ctrl->getNextClass($this);
88 $cmd = $this->ctrl->getCmd();
89
90 switch ($next_class) {
91 case 'ilobjectmetadatagui':
92
93 $this->setTabs();
94
95 $md_gui = new ilObjectMetaDataGUI($this->content_object, $this->obj->getType(), $this->obj->getId());
96 $md_gui->addMDObserver($this->obj, 'MDUpdateListener', 'General');
97 $md_gui->addMDObserver($this->obj, 'MDUpdateListener', 'Educational'); // #9510
98 $this->ctrl->forwardCommand($md_gui);
99 break;
100
101 case "ilconditionhandlergui":
102 $ilTabs = $this->tabs;
103
104 $this->setTabs();
106 $this->ctrl->forwardCommand($this->condHI);
107 $ilTabs->setTabActive('preconditions');
108 break;
109
110 default:
111 if ($cmd == 'listConditions') {
112 $this->setTabs();
114 $this->condHI->executeCommand();
115 } elseif (($cmd == "create") && ($_POST["new_type"] == "pg")) {
116 $this->setTabs();
117 $pg_gui = new ilLMPageObjectGUI($this->content_object);
118 $pg_gui->executeCommand();
119 } else {
120 $this->$cmd();
121 }
122 break;
123 }
124 }
Class ilLMPageObjectGUI.
Class ilObjectMetaDataGUI.

References $_POST, $tabs, initConditionHandlerInterface(), and setTabs().

+ Here is the call graph for this function:

◆ getType()

ilStructureObjectGUI::getType ( )

this function is called by condition handler gui interface

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

77 {
78 return "st";
79 }

◆ initConditionHandlerInterface()

ilStructureObjectGUI::initConditionHandlerInterface ( )

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

573 {
574 $this->condHI = new ilConditionHandlerGUI($this);
575 $this->condHI->setBackButtons(array());
576 $this->condHI->setAutomaticValidation(false);
577 $this->condHI->setTargetType("st");
578 $this->condHI->setTargetRefId($this->content_object->getRefId());
579 $this->condHI->setTargetId($this->obj->getId());
580 $this->condHI->setTargetTitle($this->obj->getTitle());
581 }
class ilConditionHandlerGUI

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ initInsertTemplateForm()

ilStructureObjectGUI::initInsertTemplateForm ( )

Init insert template form.

Returns
\ILIAS\UI\Component\Input\Container\Form\Standard

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

1055 {
1056 $ui = $this->ui;
1057 $f = $ui->factory();
1059 $lng = $this->lng;
1060
1061 $fields["title"] = $f->input()->field()->text($lng->txt("title"), "");
1062 $ts = ilPageLayoutGUI::getTemplateSelection(ilPageLayout::MODULE_LM);
1063 if (!is_null($ts)) {
1064 $fields["layout_id"] = $ts;
1065 }
1066
1067 // section
1068 $section1 = $f->input()->field()->section($fields, $lng->txt("cont_insert_pagelayout"));
1069
1070 $form_action = $ctrl->getLinkTarget($this, "insertPageFromTemplate");
1071 return $f->input()->container()->form()->standard($form_action, ["sec" => $section1]);
1072 }

References ilLMObjectGUI\$ctrl, Vendor\Package\$f, ilLMObjectGUI\$lng, ilLMObjectGUI\$ui, and ilPageLayout\MODULE_LM.

Referenced by insertPageFromTemplate(), and insertTemplate().

+ Here is the caller graph for this function:

◆ initSetPageLayoutForm()

ilStructureObjectGUI::initSetPageLayoutForm ( )

Init set page layout form.

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

951 {
953 $ilCtrl = $this->ctrl;
954
955 $this->form = new ilPropertyFormGUI();
956
957 if (is_array($_POST["id"])) {
958 foreach ($_POST["id"] as $id) {
959 $hi = new ilHiddenInputGUI("id[]");
960 $hi->setValue($id);
961 $this->form->addItem($hi);
962 }
963 }
965 $lng->txt("cont_layout"),
966 "layout",
967 $this->content_object->getLayout()
968 );
969
970 $this->form->addItem($layout);
971
972 $this->form->addCommandButton("savePageLayout", $lng->txt("save"));
973 $this->form->addCommandButton("showHierarchy", $lng->txt("cancel"));
974
975 $this->form->setTitle($lng->txt("cont_set_layout"));
976 $this->form->setFormAction($ilCtrl->getFormAction($this));
977 }
This class represents a hidden form property in a property form.
static getLayoutOption($a_txt, $a_var, $a_def_option="")
Get layout option.
This class represents a property form user interface.

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

Referenced by setPageLayout().

+ 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 704 of file class.ilStructureObjectGUI.php.

705 {
706 $ilCtrl = $this->ctrl;
708
709
712
713 if ($a_as_sub) { // as subchapter
714 if (!ilChapterHierarchyFormGUI::getPostFirstChild()) { // insert under parent
715 $parent_id = $node_id;
716 $target = "";
717 } else { // we shouldnt end up here
718 $ilCtrl->redirect($this, "showHierarchy");
719 return;
720 }
721 } else { // as chapter
722 if (!ilChapterHierarchyFormGUI::getPostFirstChild()) { // insert after node id
723 $parent_id = $this->tree->getParentId($node_id);
724 $target = $node_id;
725 } else { // insert as first child
726 $parent_id = $node_id;
727 $target = IL_FIRST_NODE;
728 }
729 }
730 for ($i = 1; $i <= $num; $i++) {
731 $chap = new ilStructureObject($this->content_object);
732 $chap->setType("st");
733 $chap->setTitle($lng->txt("cont_new_chap"));
734 $chap->setLMId($this->content_object->getId());
735 $chap->create();
736 ilLMObject::putInTree($chap, $parent_id, $target);
737 }
738
739 $ilCtrl->redirect($this, "view");
740 }
const IL_FIRST_NODE
Definition: class.ilTree.php:5
static getPostNodeId()
Get node ID of _POST input.
static getPostFirstChild()
Should node be inserted as first child of target node (true) or as successor (false)
static getPostMulti()
Get multi number of _POST input.
static putInTree($a_obj, $a_parent_id="", $a_target_node_id="")
put this object into content object tree
Class ilStructreObject.
$i
Definition: metadata.php:24

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

Referenced by insertSubchapter().

+ 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 755 of file class.ilStructureObjectGUI.php.

756 {
758 $ilCtrl = $this->ctrl;
759 $ilLog = $this->log;
760
761 $ilLog->write("Insert Chapter From Clipboard");
762
763
766
767 if ($a_as_sub) { // as subchapter
768 if (!$first_child) { // insert under parent
769 $parent_id = $node_id;
770 $target = "";
771 } else { // we shouldnt end up here
772 $ilCtrl->redirect($this, "showHierarchy");
773 return;
774 }
775 } else { // as chapter
776 if (!$first_child) { // insert after node id
777 $parent_id = $this->tree->getParentId($node_id);
778 $target = $node_id;
779 } else { // insert as first child
780 $parent_id = $node_id;
781 $target = IL_FIRST_NODE;
782
783 // do not move a chapter in front of a page
784 $childs = $this->tree->getChildsByType($parent_id, "pg");
785 if (count($childs) != 0) {
786 $target = $childs[count($childs) - 1]["obj_id"];
787 }
788 }
789 }
790
791 // copy and paste
792 $chapters = $ilUser->getClipboardObjects("st", true);
793 $copied_nodes = array();
794
795 foreach ($chapters as $chap) {
796 $ilLog->write("Call pasteTree, Target LM: " . $this->content_object->getId() . ", Chapter ID: " . $chap["id"]
797 . ", Parent ID: " . $parent_id . ", Target: " . $target);
799 $this->content_object,
800 $chap["id"],
801 $parent_id,
802 $target,
803 $chap["insert_time"],
804 $copied_nodes,
805 (ilEditClipboard::getAction() == "copy")
806 );
807 $target = $cid;
808 }
809 ilLMObject::updateInternalLinks($copied_nodes);
810
811 if (ilEditClipboard::getAction() == "cut") {
812 $ilUser->clipboardDeleteObjectsOfType("pg");
813 $ilUser->clipboardDeleteObjectsOfType("st");
815 }
816
817 $this->content_object->checkTree();
818 $ilCtrl->redirect($this, $a_return);
819 }
static updateInternalLinks($a_copied_nodes, $a_parent_type="lm")
Update internal links, after multiple pages have been copied.
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.
$ilUser
Definition: imgupload.php:18

References ilLMObjectGUI\$ctrl, $ilUser, $log, $user, ilEditClipboard\clear(), ilEditClipboard\getAction(), ilHierarchyFormGUI\getPostFirstChild(), ilHierarchyFormGUI\getPostNodeId(), IL_FIRST_NODE, ilLMObject\pasteTree(), and ilLMObject\updateInternalLinks().

Referenced by insertSubchapterClip(), and pasteChapter().

+ 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 832 of file class.ilStructureObjectGUI.php.

833 {
834 $ilCtrl = $this->ctrl;
836
837
840
841 if (!ilChapterHierarchyFormGUI::getPostFirstChild()) { // insert after node id
842 $parent_id = $this->tree->getParentId($node_id);
843 $target = $node_id;
844 } else { // insert as first child
845 $parent_id = $node_id;
846 $target = IL_FIRST_NODE;
847 }
848
849 for ($i = 1; $i <= $num; $i++) {
850 $page = new ilLMPageObject($this->content_object);
851 $page->setType("pg");
852 $page->setTitle($lng->txt("cont_new_page"));
853 $page->setLMId($this->content_object->getId());
854 $page->create();
855 ilLMObject::putInTree($page, $parent_id, $target);
856 }
857
858 $ilCtrl->redirect($this, "showHierarchy");
859 }
Class ilLMPageObject.

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

+ Here is the call graph for this function:

◆ insertPageClip()

ilStructureObjectGUI::insertPageClip ( )

Insert pages from clipboard.

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

865 {
866 $ilCtrl = $this->ctrl;
868
871
872 if (!$first_child) { // insert after node id
873 $parent_id = $this->tree->getParentId($node_id);
874 $target = $node_id;
875 } else { // insert as first child
876 $parent_id = $node_id;
877 $target = IL_FIRST_NODE;
878 }
879
880 // cut and paste
881 $pages = $ilUser->getClipboardObjects("pg");
882 $copied_nodes = array();
883 foreach ($pages as $pg) {
885 $this->content_object,
886 $pg["id"],
887 $parent_id,
888 $target,
889 $pg["insert_time"],
890 $copied_nodes,
891 (ilEditClipboard::getAction() == "copy")
892 );
893 $target = $cid;
894 }
895 ilLMObject::updateInternalLinks($copied_nodes);
896
897 if (ilEditClipboard::getAction() == "cut") {
898 $ilUser->clipboardDeleteObjectsOfType("pg");
899 $ilUser->clipboardDeleteObjectsOfType("st");
901 }
902
903 $ilCtrl->redirect($this, "view");
904 }

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

Referenced by pastePage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertPageFromTemplate()

ilStructureObjectGUI::insertPageFromTemplate ( )

Insert (multiple) pages templates at node.

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

1078 {
1079 global $DIC;
1080
1081 $ilCtrl = $this->ctrl;
1082
1083 $form = $this->initInsertTemplateForm();
1084 $form = $form->withRequest($DIC->http()->request());
1085 $data = $form->getData();
1086 $layout_id = $data["sec"]["layout_id"];
1087 $node_id = $_REQUEST["node_id"];
1089 $this->content_object->getId(),
1090 (int) $_REQUEST["multi"],
1091 $node_id,
1092 $_REQUEST["first_child"],
1093 $layout_id,
1094 $data["sec"]["title"]
1095 );
1096
1097 $ilCtrl->setParameter($this, "highlight", $page_ids);
1098 $ilCtrl->redirect($this, "showHierarchy", "node_" . $node_id);
1099 }
static insertPagesFromTemplate($lm_id, $num, $node_id, $first_child, $layout_id, $title="")
Insert (multiple) pages templates at node.
initInsertTemplateForm()
Init insert template form.
$data
Definition: storeScorm.php:23

References ilLMObjectGUI\$ctrl, $data, $DIC, initInsertTemplateForm(), and ilLMPageObject\insertPagesFromTemplate().

+ Here is the call graph for this function:

◆ insertSubchapter()

ilStructureObjectGUI::insertSubchapter ( )

Insert (multiple) subchapters at node.

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

746 {
747 $ilCtrl = $this->ctrl;
748
749 $this->insertChapter(true);
750 }
insertChapter($a_as_sub=false)
Insert (multiple) chapters at node.

References ilLMObjectGUI\$ctrl, and insertChapter().

+ Here is the call graph for this function:

◆ insertSubchapterClip()

ilStructureObjectGUI::insertSubchapterClip ( )

Insert Chapter from clipboard.

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

825 {
826 $this->insertChapterClip(true);
827 }
insertChapterClip($a_as_sub=false, $a_return="view")
Insert Chapter from clipboard.

References insertChapterClip().

+ Here is the call graph for this function:

◆ insertTemplate()

ilStructureObjectGUI::insertTemplate ( )

Displays GUI to select template for page.

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

1031 {
1033 $ui = $this->ui;
1034 $lng = $this->lng;
1035
1036 $this->setTabs();
1038 $tabs->clearTargets();
1039 $tabs->setBackTarget($lng->txt("back"), $ctrl->getLinkTarget($this, "showHierarchy"));
1040
1041 $ctrl->setParameter($this, "multi", ilChapterHierarchyFormGUI::getPostMulti());
1042 $ctrl->setParameter($this, "node_id", ilChapterHierarchyFormGUI::getPostNodeId());
1043 $ctrl->setParameter($this, "first_child", ilChapterHierarchyFormGUI::getPostFirstChild());
1044 $ctrl->saveParameter($this, "obj_id");
1045 $form = $this->initInsertTemplateForm();
1046 $this->tpl->setContent($ui->renderer()->render($form) . ilLMPageObjectGUI::getLayoutCssFix());
1047 }
static getLayoutCssFix()
Get layout css fix (workaround for broken radio options)

References ilLMObjectGUI\$ctrl, ilLMObjectGUI\$lng, $tabs, ilLMObjectGUI\$ui, ilLMPageObjectGUI\getLayoutCssFix(), ilHierarchyFormGUI\getPostFirstChild(), ilHierarchyFormGUI\getPostMulti(), ilHierarchyFormGUI\getPostNodeId(), initInsertTemplateForm(), and setTabs().

+ Here is the call graph for this function:

◆ pasteChapter()

ilStructureObjectGUI::pasteChapter ( )

paste chapter

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

504 {
506
507 return $this->insertChapterClip(false, "subchap");
508 }

References $ilUser, $user, and insertChapterClip().

+ Here is the call graph for this function:

◆ pastePage()

ilStructureObjectGUI::pastePage ( )

paste page

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

472 {
475
476 if (!$ilUser->clipboardHasObjectsOfType("pg")) {
477 $ilErr->raiseError($this->lng->txt("no_page_in_clipboard"), $ilErr->MESSAGE);
478 }
479
480 return $this->insertPageClip();
481 }
insertPageClip()
Insert pages from clipboard.

References $error, $ilErr, $ilUser, $user, and insertPageClip().

+ Here is the call graph for this function:

◆ proceedDragDrop()

ilStructureObjectGUI::proceedDragDrop ( )

Perform drag and drop action.

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

911 {
912 $ilCtrl = $this->ctrl;
913
914 //echo "-".$_POST["il_hform_source_id"]."-".$_POST["il_hform_target_id"]."-".$_POST["il_hform_fc"]."-";
915 $this->content_object->executeDragDrop(
916 $_POST["il_hform_source_id"],
917 $_POST["il_hform_target_id"],
918 $_POST["il_hform_fc"],
919 $_POST["il_hform_as_subitem"]
920 );
921 $ilCtrl->redirect($this, "showHierarchy");
922 }

References $_POST, and ilLMObjectGUI\$ctrl.

◆ putInTree()

ilStructureObjectGUI::putInTree ( )

put chapter into tree

Reimplemented from ilLMObjectGUI.

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

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

References $_GET, $tree, IL_FIRST_NODE, and IL_LAST_NODE.

Referenced by save().

+ Here is the caller graph for this function:

◆ save()

ilStructureObjectGUI::save ( )

save new chapter

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

402 {
403 $this->obj = new ilStructureObject($this->content_object);
404
405 $this->obj->setType("st");
406 $this->obj->setTitle(ilUtil::stripSlashes($_POST["Fobject"]["title"]));
407 $this->obj->setDescription(ilUtil::stripSlashes($_POST["Fobject"]["desc"]));
408 $this->obj->setLMId($this->content_object->getId());
409 $this->obj->create();
410
411 $this->putInTree();
412
413 // check the tree
414 $this->checkTree();
415
416 if (!empty($_GET["obj_id"])) {
417 $this->ctrl->redirect($this, "subchap");
418 }
419 }
checkTree()
check the content object tree
putInTree()
put chapter into tree
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

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

+ Here is the call graph for this function:

◆ saveAllTitles()

ilStructureObjectGUI::saveAllTitles ( )

Save all titles of chapters/pages.

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

276 {
277 $ilCtrl = $this->ctrl;
278
279 ilLMObject::saveTitles($this->content_object, ilUtil::stripSlashesArray($_POST["title"]), $_GET["transl"]);
280
281 ilUtil::sendSuccess($this->lng->txt("lm_save_titles"), true);
282 $ilCtrl->redirect($this, "showHierarchy");
283 }
static saveTitles($a_lm, $a_titles, $a_lang="-")
Save titles for lm objects.

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

+ Here is the call graph for this function:

◆ savePageLayout()

ilStructureObjectGUI::savePageLayout ( )

Save page layout.

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

983 {
985 $ilCtrl = $this->ctrl;
986
987 foreach ($_POST["id"] as $id) {
988 $id = ilUtil::stripSlashes($id);
991 ilUtil::stripSlashes($_POST["layout"]),
992 $this->content_object
993 );
994 }
995 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
996 $ilCtrl->redirect($this, "showHierarchy");
997 }
static writeLayout($a_obj_id, $a_layout, $a_lm=null)
Write layout setting.

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

+ Here is the call graph for this function:

◆ setPageLayout()

ilStructureObjectGUI::setPageLayout ( )

Set layout for multipl pages.

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

932 {
934 $ilCtrl = $this->ctrl;
936
937 if (!is_array($_POST["id"])) {
938 ilUtil::sendFailure($lng->txt("no_checkbox"), true);
939 $ilCtrl->redirect($this, "showHierarchy");
940 }
941
942 $this->initSetPageLayoutForm();
943
944 $tpl->setContent($this->form->getHTML());
945 }
initSetPageLayoutForm()
Init set page layout form.

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

+ 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 67 of file class.ilStructureObjectGUI.php.

68 {
69 $this->obj = $a_st_object;
70 }

◆ setTabs()

ilStructureObjectGUI::setTabs ( )

output tabs

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

603 {
604 $ilTabs = $this->tabs;
607
608 // subelements
609 $ilTabs->addTarget(
610 "cont_pages_and_subchapters",
611 $this->ctrl->getLinkTarget($this, 'showHierarchy'),
612 array("view", "showHierarchy"),
613 get_class($this)
614 );
615
616 // preconditions
617 $ilTabs->addTarget(
618 "preconditions",
619 $this->ctrl->getLinkTarget($this, 'listConditions'),
620 "listConditions",
621 get_class($this)
622 );
623
624 // metadata
625 $mdgui = new ilObjectMetaDataGUI($this->content_object, $this->obj->getType(), $this->obj->getId());
626 $mdtab = $mdgui->getTab();
627 if ($mdtab) {
628 $ilTabs->addTarget(
629 "meta_data",
630 $mdtab,
631 "",
632 "ilmdeditorgui"
633 );
634 }
635
636 $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_st.svg"));
637 $this->tpl->setTitle(
638 $this->lng->txt($this->obj->getType()) . ": " . $this->obj->getTitle()
639 );
640
641 // presentation view
642 $ilTabs->addNonTabbedLink(
643 "pres_mode",
644 $lng->txt("cont_presentation_view"),
645 ILIAS_HTTP_PATH . "/goto.php?target=st_" . $this->obj->getId(),
646 "_top"
647 );
648 }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)

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

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

+ 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 160 of file class.ilStructureObjectGUI.php.

161 {
163 $ilCtrl = $this->ctrl;
164
165 $this->setTabs();
166
167 $ilCtrl->setParameter($this, "backcmd", "showHierarchy");
168
169 $form_gui = new ilChapterHierarchyFormGUI($this->content_object->getType(), $_GET["transl"]);
170 $form_gui->setFormAction($ilCtrl->getFormAction($this));
171 $form_gui->setTitle($this->obj->getTitle());
172 $form_gui->setIcon(ilUtil::getImagePath("icon_st.svg"));
173 $form_gui->setTree($this->tree);
174 $form_gui->setCurrentTopNodeId($this->obj->getId());
175 $form_gui->addMultiCommand($lng->txt("delete"), "delete");
176 $form_gui->addMultiCommand($lng->txt("cut"), "cutItems");
177 $form_gui->addMultiCommand($lng->txt("copy"), "copyItems");
178 $form_gui->addMultiCommand($lng->txt("cont_de_activate"), "activatePages");
179 if ($this->content_object->getLayoutPerPage()) {
180 $form_gui->addMultiCommand($lng->txt("cont_set_layout"), "setPageLayout");
181 }
182 $form_gui->setDragIcon(ilUtil::getImagePath("icon_pg.svg"));
183 $form_gui->addCommand($lng->txt("cont_save_all_titles"), "saveAllTitles");
184 $form_gui->addHelpItem($lng->txt("cont_chapters_after_pages"));
185 $up_gui = "ilobjlearningmodulegui";
186 $ilCtrl->setParameterByClass($up_gui, "active_node", $this->obj->getId());
187 $ilCtrl->setParameterByClass($up_gui, "active_node", "");
188
189 $ctpl = new ilTemplate("tpl.chap_and_pages.html", true, true, "Modules/LearningModule");
190 $ctpl->setVariable("HIERARCHY_FORM", $form_gui->getHTML());
191 $ilCtrl->setParameter($this, "obj_id", $_GET["obj_id"]);
192
193 $ml_head = ilObjContentObjectGUI::getMultiLangHeader($this->content_object->getId(), $this);
194
195 $this->tpl->setContent($ml_head . $ctpl->get());
196 $this->tpl->addOnloadCode("window.setTimeout(() => { $('body').trigger('il-lm-editor-tree'); }, 500);");
197 }
This class represents a hierarchical form.
static getMultiLangHeader($a_lm_id, $a_gui_class, $a_mode="")
Get multi lang header.
special template class to simplify handling of ITX/PEAR

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

Referenced by view().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ subchap()

ilStructureObjectGUI::subchap ( )

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

289 {
291 $ilCtrl = $this->ctrl;
294
295 $this->setTabs();
296
297 $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.structure_edit.html", "Modules/LearningModule");
298 $num = 0;
299
300 $this->tpl->setCurrentBlock("form");
301 $this->ctrl->setParameter($this, "backcmd", "subchap");
302 $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
303 $this->tpl->setVariable("HEADER_TEXT", $this->lng->txt("cont_subchapters"));
304 $this->tpl->setVariable("CHECKBOX_TOP", IL_FIRST_NODE);
305
306 $cnt = 0;
307 $childs = $this->tree->getChilds($this->obj->getId());
308 foreach ($childs as $child) {
309 if ($child["type"] != "st") {
310 continue;
311 }
312 $this->tpl->setCurrentBlock("table_row");
313 // color changing
314 $css_row = ilUtil::switchColor($cnt++, "tblrow1", "tblrow2");
315
316 // checkbox
317 $this->tpl->setVariable("CHECKBOX_ID", $child["obj_id"]);
318 $this->tpl->setVariable("CSS_ROW", $css_row);
319 $this->tpl->setVariable("IMG_OBJ", ilUtil::getImagePath("icon_st.svg"));
320
321 // type
322 $this->ctrl->setParameterByClass("ilStructureObjectGUI", "obj_id", $child["obj_id"]);
323 $link = $this->ctrl->getLinkTargetByClass("ilStructureObjectGUI", "view");
324 $this->tpl->setVariable("LINK_TARGET", $link);
325
326 // title
327 $this->tpl->setVariable(
328 "TEXT_CONTENT",
330 $child["obj_id"],
332 $this->content_object->isActiveNumbering()
333 )
334 );
335
336 $this->tpl->parseCurrentBlock();
337 }
338 if ($cnt == 0) {
339 $this->tpl->setCurrentBlock("notfound");
340 $this->tpl->setVariable("NUM_COLS", 3);
341 $this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
342 $this->tpl->parseCurrentBlock();
343 }
344 //else
345 //{
346 // SHOW VALID ACTIONS
347 $this->tpl->setVariable("NUM_COLS", 3);
348 $acts = array("delete" => "delete", "cutChapter" => "cut",
349 "copyChapter" => "copyChapter");
350 if ($ilUser->clipboardHasObjectsOfType("st")) {
351 $acts["pasteChapter"] = "pasteChapter";
352 }
353 $this->showActions($acts);
354 //}
355
356 // SHOW POSSIBLE SUB OBJECTS
357 $this->tpl->setVariable("NUM_COLS", 3);
358 //$this->showPossibleSubObjects("st");
359 $subobj = array("st");
360 $opts = ilUtil::formSelect(12, "new_type", $subobj);
361 //$this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.svg"));
362 $this->tpl->setCurrentBlock("add_object");
363 $this->tpl->setVariable("SELECT_OBJTYPE", $opts);
364 //$this->tpl->setVariable("FORMACTION_OBJ_ADD", "adm_object.php?cmd=create&ref_id=".$_GET["ref_id"]);
365 $this->tpl->setVariable("BTN_NAME", "create");
366 $this->tpl->setVariable("TXT_ADD", $this->lng->txt("insert"));
367 $this->tpl->parseCurrentBlock();
368
369 //$this->tpl->setVariable("NUM_COLS", 2);
370 //$this->showPossibleSubObjects("st");
371
372 $this->tpl->setCurrentBlock("form");
373 $this->tpl->parseCurrentBlock();
374
375 $ilCtrl->setParameter($this, "obj_id", $_GET["obj_id"]);
376 }
showActions($a_actions)
show possible action (form buttons)
static _getPresentationTitle( $a_st_id, $a_mode=self::CHAPTER_TITLE, $a_include_numbers=false, $a_time_scheduled_activation=false, $a_force_content=false, $a_lm_id=0, $a_lang="-", $a_include_short=false)
get presentation title
static switchColor($a_num, $a_css1, $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows)
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.

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

+ Here is the call graph for this function:

◆ switchToLanguage()

ilStructureObjectGUI::switchToLanguage ( )

Switch to language.

Parameters

return

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

1020 {
1021 $ilCtrl = $this->ctrl;
1022
1023 $ilCtrl->setParameter($this, "transl", $_GET["totransl"]);
1024 $ilCtrl->redirect($this, "showHierarchy");
1025 }

References $_GET, and ilLMObjectGUI\$ctrl.

◆ view()

ilStructureObjectGUI::view ( )

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

147 {
150 $ilCtrl = $this->ctrl;
152
153 $this->showHierarchy();
154 }
showHierarchy()
Show subhiearchy of pages and subchapters.

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

Referenced by edit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $error

ilStructureObjectGUI::$error
protected

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

Referenced by pastePage().

◆ $log

ilStructureObjectGUI::$log
protected

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

Referenced by insertChapterClip().

◆ $obj

ilStructureObjectGUI::$obj

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

◆ $tabs

ilStructureObjectGUI::$tabs
protected

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

Referenced by executeCommand(), insertTemplate(), and setTabs().

◆ $tree

ilStructureObjectGUI::$tree

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

Referenced by putInTree(), subchap(), and view().

◆ $user

ilStructureObjectGUI::$user
protected

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