ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ 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
{
22
public
function
init
()
23
{
24
$this->static_link_enabled =
true
;
25
$this->delete_enabled =
true
;
26
$this->cut_enabled =
true
;
27
$this->copy_enabled =
true
;
28
$this->subscribe_enabled =
true
;
29
$this->link_enabled =
true
;
30
$this->info_screen_enabled =
true
;
31
$this->type =
"lm"
;
32
$this->gui_class_name =
"ilobjlearningmodulegui"
;
33
34
// general commands array
35
include_once(
'./Modules/LearningModule/classes/class.ilObjLearningModuleAccess.php'
);
36
$this->commands =
ilObjLearningModuleAccess::_getCommands
();
37
}
38
39
public
function
setChildId
($a_child_id)
40
{
41
$this->child_id = $a_child_id;
42
}
43
public
function
getChildId
()
44
{
45
return
$this->child_id;
46
}
47
57
public
function
getCommandLink
($a_cmd)
58
{
59
$ilCtrl
=
$this->ctrl
;
60
61
switch
($a_cmd) {
62
case
"continue"
:
63
$cmd_link =
"ilias.php?baseClass=ilLMPresentationGUI&ref_id="
. $this->ref_id .
64
"&cmd=resume"
;
65
break
;
66
67
case
"page"
:
68
// Used for presentation of single pages chapters in search results
69
$cmd_link =
"ilias.php?baseClass=ilLMPresentationGUI&ref_id="
. $this->ref_id .
70
"&obj_id="
. $this->
getChildId
();
71
break
;
72
73
case
"view"
:
74
$cmd_link =
"ilias.php?baseClass=ilLMPresentationGUI&ref_id="
.
$this->ref_id
;
75
break
;
76
77
case
"edit"
:
78
$cmd_link =
"ilias.php?baseClass=ilLMEditorGUI&ref_id="
.
$this->ref_id
;
79
break
;
80
81
case
"properties"
:
82
$cmd_link =
"ilias.php?baseClass=ilLMEditorGUI&ref_id="
. $this->ref_id .
"&to_props=1"
;
83
break
;
84
85
case
"infoScreen"
:
86
$cmd_link =
"ilias.php?baseClass=ilLMPresentationGUI&ref_id="
. $this->ref_id .
87
"&cmd=infoScreen&file_id"
. $this->
getChildId
();
88
break
;
89
90
case
'downloadFile'
:
91
$cmd_link =
'ilias.php?baseClass=ilLMPresentationGUI&ref_id='
. $this->ref_id .
92
'&cmd=downloadFile&file_id='
. $this->
getChildId
();
93
break
;
94
95
default
:
96
$ilCtrl
->setParameterByClass(
"ilrepositorygui"
,
"ref_id"
, $this->ref_id);
97
$cmd_link =
$ilCtrl
->getLinkTargetByClass(
"ilrepositorygui"
, $a_cmd);
98
$ilCtrl
->setParameterByClass(
"ilrepositorygui"
,
"ref_id"
,
$_GET
[
"ref_id"
]);
99
break
;
100
}
101
102
return
$cmd_link;
103
}
104
105
113
public
function
getCommandFrame
($a_cmd)
114
{
115
switch
($a_cmd) {
116
case
"view"
:
117
case
"continue"
:
118
case
'list'
:
119
$frame =
ilFrameTargetInfo::_getFrame
(
"MainContent"
);
120
break
;
121
122
case
"edit"
:
123
case
"properties"
:
124
$frame =
ilFrameTargetInfo::_getFrame
(
"MainContent"
);
125
break
;
126
127
case
"infoScreen"
:
128
$frame =
ilFrameTargetInfo::_getFrame
(
"MainContent"
);
129
break
;
130
131
default
:
132
$frame =
""
;
133
break
;
134
}
135
136
return
$frame;
137
}
138
139
148
public
function
getProperties
()
149
{
150
$lng
=
$this->lng
;
151
$rbacsystem = $this->rbacsystem;
152
153
$props =
array
();
154
155
include_once(
"./Modules/LearningModule/classes/class.ilObjLearningModuleAccess.php"
);
156
157
if
(
ilObjLearningModuleAccess::_isOffline
($this->obj_id)) {
158
$props[] =
array
(
"alert"
=>
true
,
"property"
=>
$lng
->txt(
"status"
),
159
"value"
=>
$lng
->txt(
"offline"
));
160
}
161
162
if
($rbacsystem->checkAccess(
'write'
, $this->ref_id)) {
163
$props[] =
array
(
"alert"
=>
false
,
"property"
=>
$lng
->txt(
"type"
),
164
"value"
=>
$lng
->txt(
"lm"
));
165
}
166
167
return
$props;
168
}
169
173
public
function
getCommandImage
($a_cmd)
174
{
175
switch
($a_cmd) {
176
default
:
177
return
""
;
178
}
179
}
180
}
// END class.ilObjCategoryGUI
ilObjLearningModuleListGUI\getCommandFrame
getCommandFrame($a_cmd)
Get command target frame.
Definition:
class.ilObjLearningModuleListGUI.php:113
$_GET
$_GET["client_id"]
Definition:
cfg.phpunit.template.php:12
ilObjectListGUI\$lng
$lng
Definition:
class.ilObjectListGUI.php:33
ilObjectListGUI\$ctrl
$ctrl
Definition:
class.ilObjectListGUI.php:74
ilObjLearningModuleListGUI
Class ilObjLearningModuleListGUI.
Definition:
class.ilObjLearningModuleListGUI.php:15
$ilCtrl
global $ilCtrl
Definition:
ilias.php:18
ilObjLearningModuleListGUI\getChildId
getChildId()
Definition:
class.ilObjLearningModuleListGUI.php:43
ilObjLearningModuleListGUI\getProperties
getProperties()
Get item properties.
Definition:
class.ilObjLearningModuleListGUI.php:148
ilObjectListGUI\$ref_id
$ref_id
Definition:
class.ilObjectListGUI.php:90
ilObjectListGUI
Class ilObjectListGUI.
Definition:
class.ilObjectListGUI.php:23
ilObjLearningModuleListGUI\setChildId
setChildId($a_child_id)
Definition:
class.ilObjLearningModuleListGUI.php:39
ilObjLearningModuleListGUI\getCommandImage
getCommandImage($a_cmd)
Get command icon image.
Definition:
class.ilObjLearningModuleListGUI.php:173
ilObjLearningModuleAccess\_getCommands
static _getCommands()
get commands
Definition:
class.ilObjLearningModuleAccess.php:89
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
ilObjLearningModuleListGUI\init
init()
initialisation
Definition:
class.ilObjLearningModuleListGUI.php:22
ilObjContentObjectAccess\_isOffline
static _isOffline($a_obj_id)
Type-specific implementation of general status.
Definition:
class.ilObjContentObjectAccess.php:257
ilObjLearningModuleListGUI\getCommandLink
getCommandLink($a_cmd)
Overwrite this method, if link target is not build by ctrl class (e.g.
Definition:
class.ilObjLearningModuleListGUI.php:57
Modules
LearningModule
classes
class.ilObjLearningModuleListGUI.php
Generated on Sat Mar 1 2025 19:01:18 for ILIAS by
1.8.13 (using
Doxyfile
)