ILIAS
release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
◀ ilDoc Overview
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
5
include_once
"Services/Object/classes/class.ilObjectListGUI.php"
;
6
15
class
ilObjLearningModuleListGUI
extends
ilObjectListGUI
16
{
21
function
ilObjLearningModuleListGUI
()
22
{
23
$this->
ilObjectListGUI
();
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->payment_enabled =
true
;
40
$this->info_screen_enabled =
true
;
41
$this->type =
"lm"
;
42
$this->gui_class_name =
"ilobjlearningmodulegui"
;
43
44
// general commands array
45
include_once(
'./Modules/LearningModule/classes/class.ilObjLearningModuleAccess.php'
);
46
$this->commands =
ilObjLearningModuleAccess::_getCommands
();
47
}
48
49
function
setChildId
($a_child_id)
50
{
51
$this->child_id = $a_child_id;
52
}
53
function
getChildId
()
54
{
55
return
$this->child_id;
56
}
57
67
function
getCommandLink
($a_cmd)
68
{
69
global
$ilCtrl
;
70
71
switch
($a_cmd)
72
{
73
case
"continue"
:
74
$cmd_link =
"ilias.php?baseClass=ilLMPresentationGUI&ref_id="
.$this->ref_id.
75
"&cmd=resume"
;
76
break
;
77
78
case
"page"
:
79
// Used for presentation of single pages chapters in search results
80
$cmd_link =
"ilias.php?baseClass=ilLMPresentationGUI&ref_id="
.$this->ref_id.
81
"&obj_id="
.$this->getChildId();
82
break
;
83
84
case
"view"
:
85
$cmd_link =
"ilias.php?baseClass=ilLMPresentationGUI&ref_id="
.$this->ref_id;
86
break
;
87
88
case
"edit"
:
89
$cmd_link =
"ilias.php?baseClass=ilLMEditorGUI&ref_id="
.$this->ref_id;
90
break
;
91
92
case
"properties"
:
93
$cmd_link =
"ilias.php?baseClass=ilLMEditorGUI&ref_id="
.$this->ref_id.
"&to_props=1"
;
94
break
;
95
96
case
"infoScreen"
:
97
$cmd_link =
"ilias.php?baseClass=ilLMPresentationGUI&ref_id="
.$this->ref_id.
98
"&cmd=infoScreen&file_id"
.$this->getChildId();
99
break
;
100
101
case
'downloadFile'
:
102
$cmd_link =
'ilias.php?baseClass=ilLMPresentationGUI&ref_id='
.$this->ref_id.
103
'&cmd=downloadFile&file_id='
.$this->getChildId();
104
break
;
105
106
default
:
107
$ilCtrl
->setParameterByClass(
"ilrepositorygui"
,
"ref_id"
, $this->ref_id);
108
$cmd_link =
$ilCtrl
->getLinkTargetByClass(
"ilrepositorygui"
, $a_cmd);
109
$ilCtrl
->setParameterByClass(
"ilrepositorygui"
,
"ref_id"
,
$_GET
[
"ref_id"
]);
110
break
;
111
}
112
113
return
$cmd_link;
114
}
115
116
124
function
getCommandFrame
($a_cmd)
125
{
126
global $ilias;
127
128
switch
($a_cmd)
129
{
130
case
"view"
:
131
case
"continue"
:
132
case
'list'
:
133
134
include_once
'Services/Payment/classes/class.ilPaymentObject.php'
;
135
if
(
ilPaymentObject::_isBuyable
($this->ref_id) &&
136
!
ilPaymentObject::_hasAccess
($this->ref_id))
137
{
138
$frame =
''
;
139
}
140
else
141
{
142
$frame =
ilFrameTargetInfo::_getFrame
(
"MainContent"
);
143
//$frame = "ilContObj".$this->obj_id;
144
}
145
break
;
146
147
case
"edit"
:
148
case
"properties"
:
149
$frame =
ilFrameTargetInfo::_getFrame
(
"MainContent"
);
150
break
;
151
152
case
"infoScreen"
:
153
$frame =
ilFrameTargetInfo::_getFrame
(
"MainContent"
);
154
break
;
155
156
default
:
157
$frame =
""
;
158
break
;
159
}
160
161
return
$frame;
162
}
163
164
173
function
getProperties
()
174
{
175
global
$lng
, $rbacsystem;
176
177
$props = array();
178
179
include_once(
"./Modules/LearningModule/classes/class.ilObjLearningModuleAccess.php"
);
180
181
if
(
ilObjLearningModuleAccess::_isOffline
($this->obj_id))
182
{
183
$props[] = array(
"alert"
=>
true
,
"property"
=>
$lng
->txt(
"status"
),
184
"value"
=>
$lng
->txt(
"offline"
));
185
}
186
187
if
($rbacsystem->checkAccess(
'write'
,$this->ref_id))
188
{
189
$props[] = array(
"alert"
=>
false
,
"property"
=>
$lng
->txt(
"type"
),
190
"value"
=>
$lng
->txt(
"lm"
));
191
}
192
193
if
(IS_PAYMENT_ENABLED)
194
{
195
include_once(
"Services/Payment/classes/class.ilPaymentObject.php"
);
196
197
if
(
ilPaymentObject::_isBuyable
($this->ref_id))
198
{
199
if
(
ilPaymentObject::_hasAccess
($this->ref_id))
200
{
201
$props[] = array(
"alert"
=>
false
,
"property"
=>
$lng
->txt(
"payment_system"
),
202
"value"
=>
$lng
->txt(
"payment_payed_access"
));
203
}
204
else
if
(
ilPaymentObject::_isInCart
($this->ref_id))
205
{
206
$props[] = array(
"alert"
=>
true
,
"property"
=>
$lng
->txt(
"payment_system"
),
207
"value"
=>
$lng
->txt(
"payment_in_sc"
));
208
}
209
else
210
{
211
$props[] = array(
"alert"
=>
true
,
"property"
=>
$lng
->txt(
"payment_system"
),
212
"value"
=>
$lng
->txt(
"payment_buyable"
));
213
}
214
}
215
}
216
return
$props;
217
}
218
222
function
getCommandImage
($a_cmd)
223
{
224
switch
($a_cmd)
225
{
226
default
:
227
return
""
;
228
}
229
}
230
231
232
}
// END class.ilObjCategoryGUI
233
?>
$_GET
$_GET["client_id"]
Definition:
cfg.phpunit.template.php:12
ilFrameTargetInfo\_getFrame
static _getFrame($a_class, $a_type='')
Get content frame name.
Definition:
class.ilFrameTargetInfo.php:18
ilObjContentObjectAccess\_isOffline
static _isOffline($a_obj_id)
Type-specific implementation of general status.
Definition:
class.ilObjContentObjectAccess.php:241
ilObjLearningModuleAccess\_getCommands
_getCommands()
get commands
Definition:
class.ilObjLearningModuleAccess.php:58
ilObjLearningModuleListGUI
Class ilObjLearningModuleListGUI.
Definition:
class.ilObjLearningModuleListGUI.php:16
ilObjLearningModuleListGUI\getCommandImage
getCommandImage($a_cmd)
Get command icon image.
Definition:
class.ilObjLearningModuleListGUI.php:222
ilObjLearningModuleListGUI\getProperties
getProperties()
Get item properties.
Definition:
class.ilObjLearningModuleListGUI.php:173
ilObjLearningModuleListGUI\getCommandFrame
getCommandFrame($a_cmd)
Get command target frame.
Definition:
class.ilObjLearningModuleListGUI.php:124
ilObjLearningModuleListGUI\ilObjLearningModuleListGUI
ilObjLearningModuleListGUI()
constructor
Definition:
class.ilObjLearningModuleListGUI.php:21
ilObjLearningModuleListGUI\setChildId
setChildId($a_child_id)
Definition:
class.ilObjLearningModuleListGUI.php:49
ilObjLearningModuleListGUI\getChildId
getChildId()
Definition:
class.ilObjLearningModuleListGUI.php:53
ilObjLearningModuleListGUI\getCommandLink
getCommandLink($a_cmd)
Overwrite this method, if link target is not build by ctrl class (e.g.
Definition:
class.ilObjLearningModuleListGUI.php:67
ilObjLearningModuleListGUI\init
init()
initialisation
Definition:
class.ilObjLearningModuleListGUI.php:31
ilObjectListGUI
Class ilObjectListGUI.
Definition:
class.ilObjectListGUI.php:24
ilObjectListGUI\ilObjectListGUI
ilObjectListGUI()
constructor
Definition:
class.ilObjectListGUI.php:131
ilPaymentObject\_isInCart
static _isInCart($a_ref_id)
Definition:
class.ilPaymentObject.php:616
ilPaymentObject\_isBuyable
static _isBuyable($a_ref_id, $a_subtype='')
Definition:
class.ilPaymentObject.php:543
ilPaymentObject\_hasAccess
static _hasAccess($a_ref_id, $a_transaction=0, $a_subtype='')
Definition:
class.ilPaymentObject.php:484
$ilCtrl
global $ilCtrl
Definition:
ilias.php:18
$lng
global $lng
Definition:
privfeed.php:40
Modules
LearningModule
classes
class.ilObjLearningModuleListGUI.php
Generated on Wed Sep 24 2025 19:00:46 for ILIAS by
1.9.4 (using
Doxyfile
)