ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilSCORM2004OrganizationHFormGUI Class Reference

This class allows quick editing of a chapter/sco/page hierarchy. More...

+ Inheritance diagram for ilSCORM2004OrganizationHFormGUI:
+ Collaboration diagram for ilSCORM2004OrganizationHFormGUI:

Public Member Functions

 __construct ()
 Constructor. More...
 
 getMenuItems ($a_node, $a_depth, $a_first_child=false, $a_next_sibling=null, $a_childs=null)
 Get menu items. More...
 
 nodeAllowsChilds ($a_node)
 Which nodes allow child nodes? More...
 
 manageDragAndDrop ($a_node, $a_depth, $a_first_child_drop_area=false, $a_next_sibling=null, $a_childs=null)
 Makes nodes drag and drop content and targets. More...
 
 getChildCommands ($a_item)
 Get item commands. More...
 
- Public Member Functions inherited from ilHierarchyFormGUI
 __construct ()
 Constructor. More...
 
 setParentCommand ($a_parent_obj, $a_parent_cmd)
 Set parent gui object/cmd. More...
 
 getParentObject ()
 Get Parent object. More...
 
 getParentCommand ()
 Get parent command. More...
 
 setId ($a_id)
 Set Id. More...
 
 getId ()
 Get Id. More...
 
 setTree ($a_tree)
 Set Tree Object. More...
 
 getTree ()
 Get Tree Object. More...
 
 setCurrentTopNodeId ($a_currenttopnodeid)
 Set Current Top Node ID. More...
 
 getCurrentTopNodeId ()
 Get Current Top Node ID. More...
 
 setTitle ($a_title)
 Set Title. More...
 
 getTitle ()
 Get Title. More...
 
 setIcon ($a_icon)
 Set Icon. More...
 
 getIcon ()
 Get Icon. More...
 
 setCheckboxName ($a_checkboxname)
 Set Checkbox Name. More...
 
 getCheckboxName ()
 Get Checkbox Name. More...
 
 setDragIcon ($a_dragicon)
 Set Drag Icon Path. More...
 
 getDragIcon ()
 Get Drag Icon Path. More...
 
 setMaxDepth ($a_maxdepth)
 Set Maximum Depth. More...
 
 getMaxDepth ()
 Get Maximum Depth. More...
 
 setExplorerUpdater ($a_exp_frame, $a_exp_id, $a_exp_target_script)
 Set Explorer Updater. More...
 
 setTriggeredUpdateCommand ($a_triggered_update_command)
 Set Explorer Updater. More...
 
 addHelpItem ($a_text, $a_image="")
 Get all help items. More...
 
 getHelpItems ()
 Get all help items. More...
 
 makeDragTarget ($a_id, $a_group, $a_first_child_drop_area=false, $a_as_subitem=false, $a_diss_text="")
 Makes a nodes (following droparea) a drag target. More...
 
 makeDragContent ($a_id, $a_group)
 Makes a node a drag content. More...
 
 addMultiCommand ($a_txt, $a_cmd)
 Add a multi command (for selection of items) More...
 
 addCommand ($a_txt, $a_cmd)
 Add a command. More...
 
 setHighlightedNodes ($a_val)
 Set highlighted nodes. More...
 
 getHighlightedNodes ()
 Get highlighted nodes. More...
 
 setFocusId ($a_val)
 Set focus if. More...
 
 getFocusId ()
 Get focus id. More...
 
 setExpandVariable ($a_val)
 Set expand variable. More...
 
 getExpandVariable ()
 Get expand variable. More...
 
 setExpanded ($a_val)
 Set expanded Array. More...
 
 getExpanded ()
 Get expanded array. More...
 
 updateExpanded ()
 Update expand information in session. More...
 
 setTypeWhiteList ($a_val)
 Set type whitelist. More...
 
 getTypeWhiteList ()
 Get type whitelist. More...
 
 getChilds ($a_node_id=false)
 Get all childs of current node. More...
 
 getContent ()
 Get Form Content. More...
 
 getLegend ()
 Get Legend. More...
 
 getLevelHTML ($a_par_node, $a_depth, &$a_childs)
 Get Form HTML. More...
 
 renderChild ($a_tpl, $a_child, $a_depth, $next_sibling=null)
 Render a single child (including grandchilds) More...
 
 getChildIcon ($a_item)
 Get icon path for an item. More...
 
 getChildIconAlt ($a_item)
 Get icon alt text for an item. More...
 
 getChildCommands ($a_item)
 Get item commands. More...
 
 getChildTitle ($a_child)
 Get child title. More...
 
 getChildInfo ($a_child)
 Get child info. More...
 
 getMenuItems ($a_node, $a_depth, $a_first_child=false, $a_next_sibling=null, $a_childs=null)
 Get menu items for drop area of node. More...
 
 nodeAllowsChilds ($a_node)
 Checks, whether current nodes allows childs at all. More...
 
 manageDragAndDrop ($a_node, $a_depth, $a_first_child=false, $a_next_sibling=null, $a_childs=null)
 Makes nodes drag and drop content and targets. More...
 
 getHTML ()
 Get HTML. More...
 
- Public Member Functions inherited from ilFormGUI
 ilFormGUI ()
 Constructor. More...
 
 setFormAction ($a_formaction)
 Set FormAction. More...
 
 getFormAction ()
 Get FormAction. More...
 
 setTarget ($a_target)
 Set Target. More...
 
 getTarget ()
 Get Target. More...
 
 setMultipart ($a_multipart)
 Set Enctype Multipart/Formdata true/false. More...
 
 getMultipart ()
 Get Enctype Multipart/Formdata true/false. More...
 
 setId ($a_id)
 Set Id. More...
 
 getId ()
 Get Id. More...
 
 setName ($a_name)
 Set Name. More...
 
 getName ()
 Get Name. More...
 
 setKeepOpen ($a_keepopen)
 Set Keep Form Tag Open. More...
 
 getKeepOpen ()
 Get Keep Form Tag Open. More...
 
 setOpenTag ($a_open)
 Enable/Disable Open Form Tag. More...
 
 getOpenTag ()
 Get Open Form Tag Enabled. More...
 
 setCloseTag ($a_val)
 Set close tag. More...
 
 getCloseTag ()
 Get close tag. More...
 
 setPreventDoubleSubmission ($a_val)
 Set prevent double submission. More...
 
 getPreventDoubleSubmission ()
 Get prevent double submission. More...
 
 getHTML ()
 Get HTML. More...
 
 getContent ()
 Get Content. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ilHierarchyFormGUI
static getPostMulti ()
 Get multi number of _POST input. More...
 
static getPostNodeId ()
 Get node ID of _POST input. More...
 
static getPostFirstChild ()
 Should node be inserted as first child of target node (true) or as successor (false) More...
 
static getPostFields ()
 Get all post fields. More...
 
- Protected Attributes inherited from ilFormGUI
 $formaction
 
 $multipart = false
 
 $keepopen = false
 
 $opentag = true
 
 $id
 
 $name
 
 $prevent_double_submission = false
 

Detailed Description

This class allows quick editing of a chapter/sco/page hierarchy.

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

Definition at line 13 of file class.ilSCORM2004OrganizationHFormGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilSCORM2004OrganizationHFormGUI::__construct ( )

Constructor.

Parameters

Reimplemented from ilHierarchyFormGUI.

Definition at line 20 of file class.ilSCORM2004OrganizationHFormGUI.php.

21 {
22 global $lng;
23
24 parent::__construct();
25 $this->setCheckboxName("id");
26 $lng->loadLanguageModule("sahs");
27 $this->setExpandVariable("scexpand");
28 }
setCheckboxName($a_checkboxname)
Set Checkbox Name.
setExpandVariable($a_val)
Set expand variable.
global $lng
Definition: privfeed.php:40

References $lng, ilHierarchyFormGUI\setCheckboxName(), and ilHierarchyFormGUI\setExpandVariable().

+ Here is the call graph for this function:

Member Function Documentation

◆ getChildCommands()

ilSCORM2004OrganizationHFormGUI::getChildCommands (   $a_item)

Get item commands.

Parameters
arrayitem array
Returns
array array of arrays("text", "link")

Reimplemented from ilHierarchyFormGUI.

Definition at line 411 of file class.ilSCORM2004OrganizationHFormGUI.php.

412 {
413 global $lng, $ilCtrl;
414
415 $commands = array();
416//echo "-".$a_item["type"]."-";
417 switch ($a_item["type"])
418 {
419 case "sco":
420 $ilCtrl->setParameterByClass("ilscorm2004scogui", "obj_id",
421 $a_item["node_id"]);
422 $commands[] = array("text" => $lng->txt("edit"),
423 "link" => $ilCtrl->getLinkTargetByClass(array("ilobjscorm2004learningmodulegui",
424 "ilscorm2004scogui"), "showOrganization"));
425 break;
426
427 case "ass":
428 $ilCtrl->setParameterByClass("ilscorm2004assetgui", "obj_id",
429 $a_item["node_id"]);
430 $commands[] = array("text" => $lng->txt("edit"),
431 "link" => $ilCtrl->getLinkTargetByClass(array("ilobjscorm2004learningmodulegui",
432 "ilscorm2004assetgui"), "showOrganization"));
433 break;
434
435 case "chap":
436 $ilCtrl->setParameterByClass("ilscorm2004chaptergui", "obj_id",
437 $a_item["node_id"]);
438 $commands[] = array("text" => $lng->txt("edit"),
439 "link" => $ilCtrl->getLinkTargetByClass(array("ilobjscorm2004learningmodulegui",
440 "ilscorm2004chaptergui"), "showOrganization"));
441 break;
442
443 case "seqc":
444 $ilCtrl->setParameterByClass("ilscorm2004seqchaptergui", "obj_id",
445 $a_item["node_id"]);
446 $commands[] = array("text" => $lng->txt("edit"),
447 "link" => $ilCtrl->getLinkTargetByClass(array("ilobjscorm2004learningmodulegui",
448 "ilscorm2004seqchaptergui"), "showOrganization"));
449 break;
450
451 case "page":
452 $ilCtrl->setParameterByClass("ilscorm2004pagenodegui", "obj_id",
453 $a_item["node_id"]);
454 $commands[] = array("text" => $lng->txt("edit"),
455 "link" => $ilCtrl->getLinkTargetByClass(array("ilobjscorm2004learningmodulegui",
456 "ilscorm2004pagenodegui"), "edit"));
457 break;
458 }
459
460 return $commands;
461 }
global $ilCtrl
Definition: ilias.php:18

References $ilCtrl, and $lng.

◆ getMenuItems()

ilSCORM2004OrganizationHFormGUI::getMenuItems (   $a_node,
  $a_depth,
  $a_first_child = false,
  $a_next_sibling = null,
  $a_childs = null 
)

Get menu items.

Reimplemented from ilHierarchyFormGUI.

Definition at line 33 of file class.ilSCORM2004OrganizationHFormGUI.php.

34 {
35 global $lng, $ilUser;
36
37 // @todo: move this to a service since it can be used here, too
38 include_once("./Modules/LearningModule/classes/class.ilEditClipboard.php");
39
40 include_once("./Services/Style/classes/class.ilPageLayout.php");
41 $page_layouts = (count(ilPageLayout::activeLayouts()) > 0);
42 $special_pages = (count(ilPageLayout::activeLayouts(true)) > 0);
43
44 $cmds = array();
45//echo "+".$a_depth."-";
46 if (!$a_first_child) // drop area of node
47 {
48 // page inserts
49 if ($a_node["type"] == "page" || ($a_node["type"] == "sco" && count($a_childs) == 0) ||
50 ($a_node["type"] == "ass" && count($a_childs) == 0))
51 {
52 if ($a_node["type"] == "sco" || $a_node["type"] == "ass")
53 {
54 $cmds[] = array("text" => $lng->txt("sahs_insert_page"), "cmd" => "insertPage", "multi" => 10,
55 "as_subitem" => true);
56 if ($page_layouts > 0)
57 {
58 $cmds[] = array("text" => $lng->txt("sahs_insert_pagelayout"), "cmd" => "insertTemplateGUI", "multi" => 10,
59 "as_subitem" => true);
60 }
61 if ($special_pages > 0)
62 {
63 $cmds[] = array("text" => $lng->txt("sahs_insert_special_page"), "cmd" => "insertSpecialPage", "multi" => 10,
64 "as_subitem" => true);
65 }
66 if ($ilUser->clipboardHasObjectsOfType("page"))
67 {
68 $cmds[] = array("text" => $lng->txt("sahs_insert_page_from_clip"),
69 "cmd" => "insertPageClip", "as_subitem" => true);
70 }
71 if (($ilUser->clipboardHasObjectsOfType("pg") && ilEditClipboard::getAction() == "copy"))
72 {
73 $cmds[] = array("text" => $lng->txt("sahs_insert_pg_from_clip"),
74 "cmd" => "insertPageClip", "as_subitem" => true);
75 }
76 }
77 else
78 {
79 $cmds[] = array("text" => $lng->txt("sahs_insert_page"), "cmd" => "insertPage", "multi" => 10);
80 if ($page_layouts > 0)
81 {
82 $cmds[] = array("text" => $lng->txt("sahs_insert_pagelayout"), "cmd" => "insertTemplateGUI", "multi" => 10);
83 }
84 if ($special_pages > 0)
85 {
86 $cmds[] = array("text" => $lng->txt("sahs_insert_special_page"), "cmd" => "insertSpecialPage", "multi" => 10);
87 }
88
89 if ($ilUser->clipboardHasObjectsOfType("page"))
90 {
91 $cmds[] = array("text" => $lng->txt("sahs_insert_page_from_clip"),
92 "cmd" => "insertPageClip");
93 }
94 if (($ilUser->clipboardHasObjectsOfType("pg") && ilEditClipboard::getAction() == "copy"))
95 {
96 $cmds[] = array("text" => $lng->txt("sahs_insert_pg_from_clip"),
97 "cmd" => "insertPageClip");
98 }
99 }
100 }
101
102 // sco/asset inserts... in/after chapters
103 if ($a_node["type"] == "chap" || $a_node["type"] == "seqc")
104 {
105 $cmds[] = array("text" => $lng->txt("sahs_insert_ass"), "cmd" => "insertAsset", "multi" => 10);
106 if (count($a_childs) == 0)
107 {
108 $cmds[] = array("text" => $lng->txt("sahs_insert_ass_inside_chap"), "cmd" => "insertAsset", "multi" => 10,
109 "as_subitem" => true);
110 }
111 $cmds[] = array("text" => $lng->txt("sahs_insert_sco"), "cmd" => "insertSco", "multi" => 10);
112 if (count($a_childs) == 0)
113 {
114 $cmds[] = array("text" => $lng->txt("sahs_insert_sco_inside_chap"), "cmd" => "insertSco", "multi" => 10,
115 "as_subitem" => true);
116 }
117 if ($ilUser->clipboardHasObjectsOfType("sco"))
118 {
119 $cmds[] = array("text" => $lng->txt("sahs_insert_sco_from_clip"),
120 "cmd" => "insertScoClip", "as_subitem" => false);
121 if (count($a_childs) == 0)
122 {
123 $cmds[] = array("text" => $lng->txt("sahs_insert_sco_from_clip_inside_chap"),
124 "cmd" => "insertScoClip", "as_subitem" => true);
125 }
126 }
127 if ($ilUser->clipboardHasObjectsOfType("ass"))
128 {
129 $cmds[] = array("text" => $lng->txt("sahs_insert_ass_from_clip"),
130 "cmd" => "insertAssetClip", "as_subitem" => false);
131 if (count($a_childs) == 0)
132 {
133 $cmds[] = array("text" => $lng->txt("sahs_insert_ass_from_clip_inside_chap"),
134 "cmd" => "insertAssetClip", "as_subitem" => true);
135 }
136 }
137
138 // insert chapter from learning module
139 if ($ilUser->clipboardHasObjectsOfType("st") && ilEditClipboard::getAction() == "copy")
140 {
141 $cmds[] = array("text" => $lng->txt("sahs_insert_st_from_clip"),
142 "cmd" => "insertLMChapterClip", "as_subitem" => false);
143 if (count($a_childs) == 0)
144 {
145 $cmds[] = array("text" => $lng->txt("sahs_insert_st_from_clip_inside_chap"),
146 "cmd" => "insertLMChapterClip", "as_subitem" => true);
147 }
148 }
149 }
150
151 // sco/asset inserts... after sco/assets
152 if ($a_node["type"] == "sco" || $a_node["type"] == "ass")
153 {
154 // scos
155 $cmds[] = array("text" => $lng->txt("sahs_insert_sco"), "cmd" => "insertSco", "multi" => 10);
156 if ($ilUser->clipboardHasObjectsOfType("sco"))
157 {
158 $cmds[] = array("text" => $lng->txt("sahs_insert_sco_from_clip"),
159 "cmd" => "insertScoClip");
160 }
161
162 // assets
163 $cmds[] = array("text" => $lng->txt("sahs_insert_ass"), "cmd" => "insertAsset", "multi" => 10);
164 if ($ilUser->clipboardHasObjectsOfType("ass"))
165 {
166 $cmds[] = array("text" => $lng->txt("sahs_insert_ass_from_clip"),
167 "cmd" => "insertAssetClip");
168 }
169
170 // chapters
171 if ($a_node["depth"] == 2)
172 {
173 $cmds[] = array("text" => $lng->txt("sahs_insert_chapter"), "cmd" => "insertChapter", "multi" => 10);
174 if ($ilUser->clipboardHasObjectsOfType("chap"))
175 {
176 $cmds[] = array("text" => $lng->txt("sahs_insert_chap_from_clip"),
177 "cmd" => "insertChapterClip");
178 }
179 }
180
181 // insert chapter from learning module
182 if ($ilUser->clipboardHasObjectsOfType("st") && ilEditClipboard::getAction() == "copy")
183 {
184 $cmds[] = array("text" => $lng->txt("sahs_insert_st_from_clip"),
185 "cmd" => "insertLMChapterClip");
186 }
187 }
188 //if ($a_node["type"] == "chap")
189 //{
190 // $cmds[] = array("text" => $lng->txt("sahs_insert_sub_chapter"), "cmd" => "insertSubchapter", "multi" => 10);
191 //}
192
193 // chapter inserts
194 if ($a_node["type"] == "chap" || $a_node["type"] == "seqc")
195 {
196 $cmds[] = array("text" => $lng->txt("sahs_insert_chapter"), "cmd" => "insertChapter", "multi" => 10);
197 if ($ilUser->clipboardHasObjectsOfType("chap"))
198 {
199 $cmds[] = array("text" => $lng->txt("sahs_insert_chap_from_clip"),
200 "cmd" => "insertChapterClip");
201 }
202
203 // insert chapter from learning module
204 /*
205 if ($ilUser->clipboardHasObjectsOfType("st") && ilEditClipboard::getAction() == "copy")
206 {
207 $cmds[] = array("text" => $lng->txt("sahs_insert_st_from_clip"),
208 "cmd" => "insertLMChapterClip");
209 }*/
210
211 //check if parent chaper has sequencing scenario
212 // $cmds[] = array("text" => $lng->txt("sahs_insert_scenario"), "cmd" => "insertScenarioGUI", "multi" => 0);
213
214 }
215 }
216 else // drop area before first child of node
217 {
218 if ($a_node["type"] == "" && $a_node["node_id"] == 1) // top node
219 {
220 // scos
221 $cmds[] = array("text" => $lng->txt("sahs_insert_sco"), "cmd" => "insertSco", "multi" => 10);
222 if ($ilUser->clipboardHasObjectsOfType("sco"))
223 {
224 $cmds[] = array("text" => $lng->txt("sahs_insert_sco_from_clip"),
225 "cmd" => "insertScoClip");
226 }
227
228 // assets
229 $cmds[] = array("text" => $lng->txt("sahs_insert_ass"), "cmd" => "insertAsset", "multi" => 10);
230 if ($ilUser->clipboardHasObjectsOfType("ass"))
231 {
232 $cmds[] = array("text" => $lng->txt("sahs_insert_ass_from_clip"),
233 "cmd" => "insertAssetClip");
234 }
235
236 // chapters
237 $cmds[] = array("text" => $lng->txt("sahs_insert_chapter"), "cmd" => "insertChapter", "multi" => 10);
238 if ($ilUser->clipboardHasObjectsOfType("chap"))
239 {
240 $cmds[] = array("text" => $lng->txt("sahs_insert_chap_from_clip"),
241 "cmd" => "insertChapterClip");
242 }
243
244 // insert chapter from learning module
245 if ($ilUser->clipboardHasObjectsOfType("st") && ilEditClipboard::getAction() == "copy")
246 {
247 $cmds[] = array("text" => $lng->txt("sahs_insert_st_from_clip"),
248 "cmd" => "insertLMChapterClip");
249 }
250
251 // $cmds[] = array("text" => $lng->txt("sahs_insert_scenario"), "cmd" => "insertScenarioGUI", "multi" => 0);
252 }
253 if ($a_node["type"] == "chap" || $a_node["type"] == "seqc")
254 {
255 $cmds[] = array("text" => $lng->txt("sahs_insert_sco"), "cmd" => "insertSco", "multi" => 10);
256 $cmds[] = array("text" => $lng->txt("sahs_insert_ass"), "cmd" => "insertAsset", "multi" => 10);
257 if ($ilUser->clipboardHasObjectsOfType("sco"))
258 {
259 $cmds[] = array("text" => $lng->txt("sahs_insert_sco_from_clip"),
260 "cmd" => "insertScoClip");
261 }
262 if ($ilUser->clipboardHasObjectsOfType("ass"))
263 {
264 $cmds[] = array("text" => $lng->txt("sahs_insert_ass_from_clip"),
265 "cmd" => "insertAssetClip");
266 }
267 // insert chapter from learning module
268 if ($ilUser->clipboardHasObjectsOfType("st") && ilEditClipboard::getAction() == "copy")
269 {
270 $cmds[] = array("text" => $lng->txt("sahs_insert_st_from_clip"),
271 "cmd" => "insertLMChapterClip");
272 }
273 }
274 if ($a_node["type"] == "sco" || $a_node["type"] == "ass")
275 {
276 $cmds[] = array("text" => $lng->txt("sahs_insert_page"), "cmd" => "insertPage", "multi" => 10);
277 if ($page_layouts > 0)
278 {
279 $cmds[] = array("text" => $lng->txt("sahs_insert_pagelayout"), "cmd" => "insertTemplateGUI", "multi" => 10);
280 }
281 if ($special_pages > 0)
282 {
283 $cmds[] = array("text" => $lng->txt("sahs_insert_special_page"), "cmd" => "insertSpecialPage", "multi" => 10);
284 }
285
286 if ($ilUser->clipboardHasObjectsOfType("page"))
287 {
288 $cmds[] = array("text" => $lng->txt("sahs_insert_page_from_clip"),
289 "cmd" => "insertPageClip");
290 }
291 if (($ilUser->clipboardHasObjectsOfType("pg") && ilEditClipboard::getAction() == "copy"))
292 {
293 $cmds[] = array("text" => $lng->txt("sahs_insert_pg_from_clip"),
294 "cmd" => "insertPageClip");
295 }
296 }
297
298/* if ($a_childs["type"] == "")
299 {
300 $cmds[] = array("text" => "insert Chapter", "cmd" => "insertChapter", "multi" => 10);
301 }*/
302 }
303
304 return $cmds;
305 }
static activeLayouts($a_special_page=false, $a_module=null)
Get active layouts.
global $ilUser
Definition: imgupload.php:15

References $ilUser, $lng, ilPageLayout\activeLayouts(), and ilEditClipboard\getAction().

+ Here is the call graph for this function:

◆ manageDragAndDrop()

ilSCORM2004OrganizationHFormGUI::manageDragAndDrop (   $a_node,
  $a_depth,
  $a_first_child_drop_area = false,
  $a_next_sibling = null,
  $a_childs = null 
)

Makes nodes drag and drop content and targets.

Parameters
object$a_nodenode array

Reimplemented from ilHierarchyFormGUI.

Definition at line 324 of file class.ilSCORM2004OrganizationHFormGUI.php.

325 {
326 global $lng;
327
328 if ($a_node["type"] == "ass")
329 {
330 $this->makeDragContent($a_node["node_id"], "grp_sco");
331 }
332 else
333 {
334 $this->makeDragContent($a_node["node_id"], "grp_".$a_node["type"]);
335 }
336
337 if (!$a_first_child_drop_area)
338 {
339 // page targets
340 if ($a_node["type"] == "page" || ($a_node["type"] == "sco" && count($a_childs) == 0)
341 || ($a_node["type"] == "ass" && count($a_childs) == 0))
342 {
343 if ($a_node["type"] == "sco" || $a_node["type"] == "ass")
344 {
345 $this->makeDragTarget($a_node["node_id"], "grp_page", $a_first_child_drop_area,
346 true, "");
347 }
348 else
349 {
350 $this->makeDragTarget($a_node["node_id"], "grp_page", $a_first_child_drop_area,
351 false, "");
352 }
353 }
354
355 if ($a_node["type"] == "chap" && count($a_childs) == 0)
356 {
357 $this->makeDragTarget($a_node["node_id"], "grp_sco", $a_first_child_drop_area,
358 true, $lng->txt("cont_insert_into_chap"));
359 }
360
361 // sco targets
362 if ($a_node["type"] == "sco" || $a_node["type"] == "ass" || $a_node["type"] == "chap")
363 {
364 $this->makeDragTarget($a_node["node_id"], "grp_sco", $a_first_child_drop_area,
365 false, $lng->txt("cont_insert_after_".$a_node["type"]));
366 }
367
368 //if ($a_node["type"] != "pg")
369 //{
370 // $this->makeDragTarget($a_node["node_id"], "grp_st", $a_first_child_drop_area,
371 // true, $lng->txt("cont_insert_as_subchapter"));
372 //}
373
374 // chapter targets // chapters
375 if ($a_node["depth"] == 2)
376 {
377 $this->makeDragTarget($a_node["node_id"], "grp_chap", $a_first_child_drop_area,
378 false, $lng->txt("sahs_insert_as_chapter"));
379// $this->makeDragTarget($a_node["node_id"], "grp_sco", $a_first_child_drop_area,
380// false, $lng->txt("cont_insert_after_chap"));
381 }
382 }
383 else
384 {
385 if ($a_node["type"] == "" && $a_node["node_id"] == 1) // top node
386 {
387 $this->makeDragTarget($a_node["node_id"], "grp_chap", $a_first_child_drop_area,
388 true);
389 $this->makeDragTarget($a_node["node_id"], "grp_sco", $a_first_child_drop_area,
390 true);
391 }
392 if ($a_node["type"] == "chap")
393 {
394 $this->makeDragTarget($a_node["node_id"], "grp_sco", $a_first_child_drop_area,
395 true);
396 }
397 if ($a_node["type"] == "sco" || $a_node["type"] == "ass")
398 {
399 $this->makeDragTarget($a_node["node_id"], "grp_page", $a_first_child_drop_area,
400 true);
401 }
402 }
403 }
makeDragContent($a_id, $a_group)
Makes a node a drag content.
makeDragTarget($a_id, $a_group, $a_first_child_drop_area=false, $a_as_subitem=false, $a_diss_text="")
Makes a nodes (following droparea) a drag target.

References $lng, ilHierarchyFormGUI\makeDragContent(), and ilHierarchyFormGUI\makeDragTarget().

+ Here is the call graph for this function:

◆ nodeAllowsChilds()

ilSCORM2004OrganizationHFormGUI::nodeAllowsChilds (   $a_node)

Which nodes allow child nodes?

Reimplemented from ilHierarchyFormGUI.

Definition at line 310 of file class.ilSCORM2004OrganizationHFormGUI.php.

311 {
312 if ($a_node["type"] == "pg" || $a_node["type"] == "page")
313 {
314 return false;
315 }
316 return true;
317 }

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