ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilSCORM2004ChapterGUI Class Reference

Class ilSCORM2004ChapterGUI. More...

+ Inheritance diagram for ilSCORM2004ChapterGUI:
+ Collaboration diagram for ilSCORM2004ChapterGUI:

Public Member Functions

 __construct ($a_slm_obj, $a_node_id=0)
 Constructor public. More...
 
 getType ()
 Get Node Type. More...
 
 executeCommand ()
 execute command More...
 
 setTabs ()
 output tabs More...
 
 showProperties ()
 Show Sequencing. More...
 
 proceedDragDrop ()
 Perform drag and drop action. More...
 
- Public Member Functions inherited from ilSCORM2004NodeGUI
 __construct ($a_slm_obj, $a_node_id=0)
 constructor More...
 
 setParentGUI ($a_parentgui)
 Set Parent GUI class (ilObjSCORM2004LearningModuleGUI). More...
 
 getParentGUI ()
 Get Parent GUI class (ilObjSCORM2004LearningModuleGUI). More...
 
 getNodeObject ($a_node_id)
 Get node object (chapter/sco/page) More...
 
 putInTree ($a_parent_id, $a_target)
 put this object into content object tree More...
 
 showOrganization ()
 Confirm deletion screen (delete page or structure objects) More...
 
 insertChapter ()
 Insert Chapter. More...
 
 insertSco ()
 Insert Sco. More...
 
 insertAsset ()
 Insert Asset. More...
 
 insertPage ()
 Insert Page. More...
 
 insertTemplateGUI ()
 Insert Page with Layout. More...
 
 insertSpecialPage ()
 Insert special page. More...
 
 collapseAll ()
 Collapse all. More...
 
 ExpandAll ()
 Expand all. More...
 
 saveAllTitles ()
 Save Titles. More...
 
 deleteNodes ()
 Delete nodes in the hierarchy. More...
 
 cancelDelete ()
 cancel delete More...
 
 confirmedDelete ()
 confirmed delete More...
 
 setLocator ()
 Set Locator Items. More...
 
 setContentStyle ()
 Set content style sheet. More...
 
 copyItems ($a_return="showOrganization")
 Copy items to clipboard. More...
 
 cutItems ($a_return="showOrganization")
 Copy items to clipboard, then cut them from the current tree. More...
 
 insertPageClip ()
 Insert pages from clipboard. More...
 
 insertScoClip ()
 Insert scos from clipboard. More...
 
 insertAssetClip ()
 Insert assets from clipboard. More...
 
 insertLMChapterClip ()
 Insert scos from clipboard. More...
 

Additional Inherited Members

- Data Fields inherited from ilSCORM2004NodeGUI
 $node_object
 
 $slm_object
 

Detailed Description

Class ilSCORM2004ChapterGUI.

User Interface for Scorm 2004 Chapter Nodes

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

ilSCORM2004ChapterGUI: ilObjectMetaDataGUI, ilNoteGUI

Definition at line 19 of file class.ilSCORM2004ChapterGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilSCORM2004ChapterGUI::__construct (   $a_slm_obj,
  $a_node_id = 0 
)

Constructor public.

Definition at line 26 of file class.ilSCORM2004ChapterGUI.php.

References $ilCtrl.

27  {
28  global $ilCtrl;
29 
30  $ilCtrl->saveParameter($this, "obj_id");
31 
32  parent::__construct($a_slm_obj, $a_node_id);
33  }
global $ilCtrl
Definition: ilias.php:18

Member Function Documentation

◆ executeCommand()

ilSCORM2004ChapterGUI::executeCommand ( )

execute command

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

References $_GET, $cmd, $ilCtrl, $ret, $tpl, ilObjectMetaDataGUI\addMDObserver(), ilSCORM2004NodeGUI\setLocator(), setTabs(), and ilSCORM2004NodeGUI\showOrganization().

47  {
48  global $ilCtrl, $tpl, $ilTabs;
49 
50  $tpl->getStandardTemplate();
51 
52  $next_class = $ilCtrl->getNextClass($this);
53  $cmd = $ilCtrl->getCmd();
54 
55  switch($next_class)
56  {
57  // notes
58  case "ilnotegui":
59  switch($_GET["notes_mode"])
60  {
61  default:
62  return $this->showOrganization();
63  }
64  break;
65 
66  case 'ilobjectmetadatagui':
67  $this->setTabs();
68  $this->setLocator();
69  include_once 'Services/Object/classes/class.ilObjectMetaDataGUI.php';
70  $md_gui = new ilObjectMetaDataGUI($this->slm_object,
71  $this->node_object->getType(), $this->node_object->getId());
72  $md_gui->addMDObserver($this->node_object,'MDUpdateListener','General');
73  $ilCtrl->forwardCommand($md_gui);
74  break;
75 
76  default:
77  $ret = $this->$cmd();
78  break;
79  }
80  }
Class ilObjectMetaDataGUI.
$_GET["client_id"]
$cmd
Definition: sahs_server.php:35
addMDObserver($a_class, $a_method, $a_section)
setLocator()
Set Locator Items.
global $tpl
Definition: ilias.php:8
global $ilCtrl
Definition: ilias.php:18
showOrganization()
Confirm deletion screen (delete page or structure objects)
$ret
Definition: parser.php:6
+ Here is the call graph for this function:

◆ getType()

ilSCORM2004ChapterGUI::getType ( )

Get Node Type.

Definition at line 38 of file class.ilSCORM2004ChapterGUI.php.

39  {
40  return "chap";
41  }

◆ proceedDragDrop()

ilSCORM2004ChapterGUI::proceedDragDrop ( )

Perform drag and drop action.

Definition at line 145 of file class.ilSCORM2004ChapterGUI.php.

References $_POST, and $ilCtrl.

146  {
147  global $ilCtrl;
148 
149  $this->slm_object->executeDragDrop($_POST["il_hform_source_id"], $_POST["il_hform_target_id"],
150  $_POST["il_hform_fc"], $_POST["il_hform_as_subitem"]);
151  $ilCtrl->redirect($this, "showOrganization");
152  }
global $ilCtrl
Definition: ilias.php:18
$_POST["username"]

◆ setTabs()

ilSCORM2004ChapterGUI::setTabs ( )

output tabs

Definition at line 85 of file class.ilSCORM2004ChapterGUI.php.

References $ilCtrl, $lng, $tpl, ilUtil\getImagePath(), and ilObjectMetaDataGUI\getTab().

Referenced by executeCommand(), and showProperties().

86  {
87  global $ilTabs, $ilCtrl, $tpl, $lng, $ilHelp;
88 
89  $ilHelp->setScreenIdComponent("sahsed");
90 
91  // subelements
92  $ilTabs->addTarget("sahs_organization",
93  $ilCtrl->getLinkTarget($this,'showOrganization'),
94  "showOrganization", get_class($this));
95 /*
96  // properties
97  $ilTabs->addTarget("sahs_properties",
98  $ilCtrl->getLinkTarget($this,'showProperties'),
99  "showProperties", get_class($this));
100 */
101  // metadata
102  include_once "Services/Object/classes/class.ilObjectMetaDataGUI.php";
103  $mdgui = new ilObjectMetaDataGUI($this->slm_object,
104  $this->node_object->getType(), $this->node_object->getId());
105  $mdtab = $mdgui->getTab();
106  if($mdtab)
107  {
108  $ilTabs->addTarget("meta_data",
109  $mdtab,
110  "", "ilmdeditorgui");
111  }
112 
113  $tpl->setTitleIcon(ilUtil::getImagePath("icon_chap.svg"));
114  $tpl->setTitle(
115  $lng->txt("sahs_chapter").": ".$this->node_object->getTitle());
116  }
Class ilObjectMetaDataGUI.
global $tpl
Definition: ilias.php:8
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)
global $lng
Definition: privfeed.php:17
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showProperties()

ilSCORM2004ChapterGUI::showProperties ( )

Show Sequencing.

Definition at line 121 of file class.ilSCORM2004ChapterGUI.php.

References $tpl, ilSCORM2004SeqTemplate\SEQ_TEMPLATE_DIR, ilSCORM2004NodeGUI\setLocator(), setTabs(), and ilSCORM2004SeqTemplate\templateForChapter().

122  {
123  include_once("./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Objective.php");
124  include_once("./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004SeqTemplate.php");
125 
126  global $tpl;
127 
128  $this->setTabs();
129  $this->setLocator();
130  $tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.scormeditor_chapter_properties.html", "Modules/Scorm2004");
131  $template = ilSCORM2004SeqTemplate::templateForChapter($this->node_object->getId());
132  if ($template) {
133  $item_data = $template->getMetadataProperties();
134  $tpl->setVariable("VAL_DESCRIPTION",$item_data['description']);
135  $tpl->setVariable("VAL_TITLE",$item_data['title'] );
136  $tpl->setVariable("VAL_IMAGE",ilSCORM2004SeqTemplate::SEQ_TEMPLATE_DIR."/images/".$item_data['thumbnail']);
137  } else {
138  $tpl->setContent("No didactical scenario assigned.");
139  }
140  }
setLocator()
Set Locator Items.
global $tpl
Definition: ilias.php:8
static templateForChapter($a_chapter_id)
+ Here is the call graph for this function:

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