ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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...
 

Protected Attributes

 $ctrl
 
 $tpl
 
 $tabs
 
 $lng
 
 $help
 
- Protected Attributes inherited from ilSCORM2004NodeGUI
 $lng
 
 $ctrl
 
 $tpl
 
 $tabs
 
 $locator
 
 $user
 

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 51 of file class.ilSCORM2004ChapterGUI.php.

References $DIC, and $ilCtrl.

52  {
53  global $DIC;
54 
55  $this->ctrl = $DIC->ctrl();
56  $this->tpl = $DIC["tpl"];
57  $this->tabs = $DIC->tabs();
58  $this->lng = $DIC->language();
59  $this->help = $DIC["ilHelp"];
60  $ilCtrl = $DIC->ctrl();
61 
62  $ilCtrl->saveParameter($this, "obj_id");
63 
64  parent::__construct($a_slm_obj, $a_node_id);
65  }
global $DIC
Definition: saml.php:7
global $ilCtrl
Definition: ilias.php:18

Member Function Documentation

◆ executeCommand()

ilSCORM2004ChapterGUI::executeCommand ( )

execute command

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

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

79  {
81  $tpl = $this->tpl;
82  $ilTabs = $this->tabs;
83 
84  $tpl->getStandardTemplate();
85 
86  $next_class = $ilCtrl->getNextClass($this);
87  $cmd = $ilCtrl->getCmd();
88 
89  switch ($next_class) {
90  // notes
91  case "ilnotegui":
92  switch ($_GET["notes_mode"]) {
93  default:
94  return $this->showOrganization();
95  }
96  break;
97 
98  case 'ilobjectmetadatagui':
99  $this->setTabs();
100  $this->setLocator();
101  include_once 'Services/Object/classes/class.ilObjectMetaDataGUI.php';
102  $md_gui = new ilObjectMetaDataGUI(
103  $this->slm_object,
104  $this->node_object->getType(),
105  $this->node_object->getId()
106  );
107  $md_gui->addMDObserver($this->node_object, 'MDUpdateListener', 'General');
108  $ilCtrl->forwardCommand($md_gui);
109  break;
110 
111  default:
112  $ret = $this->$cmd();
113  break;
114  }
115  }
Class ilObjectMetaDataGUI.
$_GET["client_id"]
addMDObserver($a_class, $a_method, $a_section)
setLocator()
Set Locator Items.
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 70 of file class.ilSCORM2004ChapterGUI.php.

71  {
72  return "chap";
73  }

◆ proceedDragDrop()

ilSCORM2004ChapterGUI::proceedDragDrop ( )

Perform drag and drop action.

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

References $_POST, $ctrl, and $ilCtrl.

194  {
196 
197  $this->slm_object->executeDragDrop(
198  $_POST["il_hform_source_id"],
199  $_POST["il_hform_target_id"],
200  $_POST["il_hform_fc"],
201  $_POST["il_hform_as_subitem"]
202  );
203  $ilCtrl->redirect($this, "showOrganization");
204  }
global $ilCtrl
Definition: ilias.php:18
$_POST["username"]

◆ setTabs()

ilSCORM2004ChapterGUI::setTabs ( )

output tabs

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

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

Referenced by executeCommand(), and showProperties().

121  {
122  $ilTabs = $this->tabs;
124  $tpl = $this->tpl;
125  $lng = $this->lng;
126  $ilHelp = $this->help;
127 
128  $ilHelp->setScreenIdComponent("sahsed");
129 
130  // subelements
131  $ilTabs->addTarget(
132  "sahs_organization",
133  $ilCtrl->getLinkTarget($this, 'showOrganization'),
134  "showOrganization",
135  get_class($this)
136  );
137  /*
138  // properties
139  $ilTabs->addTarget("sahs_properties",
140  $ilCtrl->getLinkTarget($this,'showProperties'),
141  "showProperties", get_class($this));
142  */
143  // metadata
144  include_once "Services/Object/classes/class.ilObjectMetaDataGUI.php";
145  $mdgui = new ilObjectMetaDataGUI(
146  $this->slm_object,
147  $this->node_object->getType(),
148  $this->node_object->getId()
149  );
150  $mdtab = $mdgui->getTab();
151  if ($mdtab) {
152  $ilTabs->addTarget(
153  "meta_data",
154  $mdtab,
155  "",
156  "ilmdeditorgui"
157  );
158  }
159 
160  $tpl->setTitleIcon(ilUtil::getImagePath("icon_chap.svg"));
161  $tpl->setTitle(
162  $lng->txt("sahs_chapter") . ": " . $this->node_object->getTitle()
163  );
164  }
Class ilObjectMetaDataGUI.
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)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showProperties()

ilSCORM2004ChapterGUI::showProperties ( )

Show Sequencing.

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

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

170  {
171  include_once("./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Objective.php");
172  include_once("./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004SeqTemplate.php");
173 
174  $tpl = $this->tpl;
175 
176  $this->setTabs();
177  $this->setLocator();
178  $tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.scormeditor_chapter_properties.html", "Modules/Scorm2004");
179  $template = ilSCORM2004SeqTemplate::templateForChapter($this->node_object->getId());
180  if ($template) {
181  $item_data = $template->getMetadataProperties();
182  $tpl->setVariable("VAL_DESCRIPTION", $item_data['description']);
183  $tpl->setVariable("VAL_TITLE", $item_data['title']);
184  $tpl->setVariable("VAL_IMAGE", ilSCORM2004SeqTemplate::SEQ_TEMPLATE_DIR . "/images/" . $item_data['thumbnail']);
185  } else {
186  $tpl->setContent("No didactical scenario assigned.");
187  }
188  }
$template
setLocator()
Set Locator Items.
static templateForChapter($a_chapter_id)
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilSCORM2004ChapterGUI::$ctrl
protected

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

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

◆ $help

ilSCORM2004ChapterGUI::$help
protected

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

Referenced by setTabs().

◆ $lng

ilSCORM2004ChapterGUI::$lng
protected

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

Referenced by ilSCORM2004SeqChapterGUI\setTabs(), and setTabs().

◆ $tabs

ilSCORM2004ChapterGUI::$tabs
protected

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

Referenced by executeCommand(), and setTabs().

◆ $tpl

ilSCORM2004ChapterGUI::$tpl
protected

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