ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilSCORM2004ChapterGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once("./Modules/Scorm2004/classes/class.ilSCORM2004NodeGUI.php");
5require_once("./Modules/Scorm2004/classes/class.ilSCORM2004Chapter.php");
6
20{
21
26 function ilSCORM2004ChapterGUI($a_slm_obj, $a_node_id = 0)
27 {
28 global $ilCtrl;
29
30 $ilCtrl->saveParameter($this, "obj_id");
31
32 parent::ilSCORM2004NodeGUI($a_slm_obj, $a_node_id);
33 }
34
38 function getType()
39 {
40 return "chap";
41 }
42
46 function &executeCommand()
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 }
81
85 function setTabs()
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 }
117
121 function showProperties()
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 }
141
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 }
153}
154?>
global $tpl
Definition: ilias.php:8
$_GET["client_id"]
Class ilObjectMetaDataGUI.
Class ilSCORM2004ChapterGUI.
ilSCORM2004ChapterGUI($a_slm_obj, $a_node_id=0)
Constructor @access public.
proceedDragDrop()
Perform drag and drop action.
Class ilSCORM2004NodeGUI.
showOrganization()
Confirm deletion screen (delete page or structure objects)
setLocator()
Set Locator Items.
static templateForChapter($a_chapter_id)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40
$cmd
Definition: sahs_server.php:35