ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
◀ 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
__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'
);
45
$this->commands =
ilObjLearningModuleAccess::_getCommands
();
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&ref_id="
.$this->ref_id.
74
"&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&ref_id="
.$this->ref_id.
80
"&obj_id="
.$this->getChildId();
81
break
;
82
83
case
"view"
:
84
$cmd_link =
"ilias.php?baseClass=ilLMPresentationGUI&ref_id="
.$this->ref_id;
85
break
;
86
87
case
"edit"
:
88
$cmd_link =
"ilias.php?baseClass=ilLMEditorGUI&ref_id="
.$this->ref_id;
89
break
;
90
91
case
"properties"
:
92
$cmd_link =
"ilias.php?baseClass=ilLMEditorGUI&ref_id="
.$this->ref_id.
"&to_props=1"
;
93
break
;
94
95
case
"infoScreen"
:
96
$cmd_link =
"ilias.php?baseClass=ilLMPresentationGUI&ref_id="
.$this->ref_id.
97
"&cmd=infoScreen&file_id"
.$this->getChildId();
98
break
;
99
100
case
'downloadFile'
:
101
$cmd_link =
'ilias.php?baseClass=ilLMPresentationGUI&ref_id='
.$this->ref_id.
102
'&cmd=downloadFile&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
?>
ilObjLearningModuleListGUI\__construct
__construct()
constructor
Definition:
class.ilObjLearningModuleListGUI.php:21
ilObjLearningModuleListGUI\getCommandFrame
getCommandFrame($a_cmd)
Get command target frame.
Definition:
class.ilObjLearningModuleListGUI.php:123
$_GET
$_GET["client_id"]
Definition:
cfg.phpunit.template.php:12
ilObjLearningModuleListGUI
Class ilObjLearningModuleListGUI.
Definition:
class.ilObjLearningModuleListGUI.php:15
$ilCtrl
global $ilCtrl
Definition:
ilias.php:18
ilObjLearningModuleListGUI\getChildId
getChildId()
Definition:
class.ilObjLearningModuleListGUI.php:52
ilObjLearningModuleListGUI\getProperties
getProperties()
Get item properties.
Definition:
class.ilObjLearningModuleListGUI.php:161
ilObjectListGUI
Class ilObjectListGUI.
Definition:
class.ilObjectListGUI.php:23
ilObjLearningModuleListGUI\setChildId
setChildId($a_child_id)
Definition:
class.ilObjLearningModuleListGUI.php:48
ilObjLearningModuleListGUI\getCommandImage
getCommandImage($a_cmd)
Get command icon image.
Definition:
class.ilObjLearningModuleListGUI.php:187
ilObjLearningModuleAccess\_getCommands
static _getCommands()
get commands
Definition:
class.ilObjLearningModuleAccess.php:58
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
ilFrameTargetInfo\_getFrame
static _getFrame($a_class, $a_type='')
Get content frame name.
Definition:
class.ilFrameTargetInfo.php:18
$lng
global $lng
Definition:
privfeed.php:17
ilObjLearningModuleListGUI\init
init()
initialisation
Definition:
class.ilObjLearningModuleListGUI.php:31
php
ilObjContentObjectAccess\_isOffline
static _isOffline($a_obj_id)
Type-specific implementation of general status.
Definition:
class.ilObjContentObjectAccess.php:241
ilObjLearningModuleListGUI\getCommandLink
getCommandLink($a_cmd)
Overwrite this method, if link target is not build by ctrl class (e.g.
Definition:
class.ilObjLearningModuleListGUI.php:66
Modules
LearningModule
classes
class.ilObjLearningModuleListGUI.php
Generated on Fri Jan 17 2025 19:01:00 for ILIAS by
1.8.13 (using
Doxyfile
)