ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilObjLearningModuleListGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once "Services/Object/classes/class.ilObjectListGUI.php";
6
16{
21 function __construct()
22 {
23 parent::__construct();
24 }
25
31 function init()
32 {
33 $this->static_link_enabled = true;
34 $this->delete_enabled = true;
35 $this->cut_enabled = true;
36 $this->copy_enabled = true;
37 $this->subscribe_enabled = true;
38 $this->link_enabled = true;
39 $this->info_screen_enabled = true;
40 $this->type = "lm";
41 $this->gui_class_name = "ilobjlearningmodulegui";
42
43 // general commands array
44 include_once('./Modules/LearningModule/classes/class.ilObjLearningModuleAccess.php');
46 }
47
48 function setChildId($a_child_id)
49 {
50 $this->child_id = $a_child_id;
51 }
52 function getChildId()
53 {
54 return $this->child_id;
55 }
56
66 function getCommandLink($a_cmd)
67 {
68 global $ilCtrl;
69
70 switch($a_cmd)
71 {
72 case "continue":
73 $cmd_link = "ilias.php?baseClass=ilLMPresentationGUI&amp;ref_id=".$this->ref_id.
74 "&amp;cmd=resume";
75 break;
76
77 case "page":
78 // Used for presentation of single pages chapters in search results
79 $cmd_link = "ilias.php?baseClass=ilLMPresentationGUI&amp;ref_id=".$this->ref_id.
80 "&amp;obj_id=".$this->getChildId();
81 break;
82
83 case "view":
84 $cmd_link = "ilias.php?baseClass=ilLMPresentationGUI&amp;ref_id=".$this->ref_id;
85 break;
86
87 case "edit":
88 $cmd_link = "ilias.php?baseClass=ilLMEditorGUI&amp;ref_id=".$this->ref_id;
89 break;
90
91 case "properties":
92 $cmd_link = "ilias.php?baseClass=ilLMEditorGUI&amp;ref_id=".$this->ref_id."&amp;to_props=1";
93 break;
94
95 case "infoScreen":
96 $cmd_link = "ilias.php?baseClass=ilLMPresentationGUI&amp;ref_id=".$this->ref_id.
97 "&amp;cmd=infoScreen&amp;file_id".$this->getChildId();
98 break;
99
100 case 'downloadFile':
101 $cmd_link = 'ilias.php?baseClass=ilLMPresentationGUI&amp;ref_id='.$this->ref_id.
102 '&amp;cmd=downloadFile&amp;file_id='.$this->getChildId();
103 break;
104
105 default:
106 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $this->ref_id);
107 $cmd_link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", $a_cmd);
108 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
109 break;
110 }
111
112 return $cmd_link;
113 }
114
115
123 function getCommandFrame($a_cmd)
124 {
125 global $ilias;
126
127 switch($a_cmd)
128 {
129 case "view":
130 case "continue":
131 case 'list':
132 $frame = ilFrameTargetInfo::_getFrame("MainContent");
133 break;
134
135 case "edit":
136 case "properties":
137 $frame = ilFrameTargetInfo::_getFrame("MainContent");
138 break;
139
140 case "infoScreen":
141 $frame = ilFrameTargetInfo::_getFrame("MainContent");
142 break;
143
144 default:
145 $frame = "";
146 break;
147 }
148
149 return $frame;
150 }
151
152
161 function getProperties()
162 {
163 global $lng, $rbacsystem;
164
165 $props = array();
166
167 include_once("./Modules/LearningModule/classes/class.ilObjLearningModuleAccess.php");
168
169 if (ilObjLearningModuleAccess::_isOffline($this->obj_id))
170 {
171 $props[] = array("alert" => true, "property" => $lng->txt("status"),
172 "value" => $lng->txt("offline"));
173 }
174
175 if ($rbacsystem->checkAccess('write',$this->ref_id))
176 {
177 $props[] = array("alert" => false, "property" => $lng->txt("type"),
178 "value" => $lng->txt("lm"));
179 }
180
181 return $props;
182 }
183
187 function getCommandImage($a_cmd)
188 {
189 switch ($a_cmd)
190 {
191 default:
192 return "";
193 }
194 }
195
196
197} // END class.ilObjCategoryGUI
198?>
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
static _getFrame($a_class, $a_type='')
Get content frame name.
static _isOffline($a_obj_id)
Type-specific implementation of general status.
Class ilObjLearningModuleListGUI.
getCommandImage($a_cmd)
Get command icon image.
getCommandFrame($a_cmd)
Get command target frame.
getCommandLink($a_cmd)
Overwrite this method, if link target is not build by ctrl class (e.g.
Class ilObjectListGUI.
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:17