ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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{
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');
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 {
60
61 switch ($a_cmd) {
62 case "continue":
63 $cmd_link = "ilias.php?baseClass=ilLMPresentationGUI&amp;ref_id=" . $this->ref_id .
64 "&amp;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&amp;ref_id=" . $this->ref_id .
70 "&amp;obj_id=" . $this->getChildId();
71 break;
72
73 case "view":
74 $cmd_link = "ilias.php?baseClass=ilLMPresentationGUI&amp;ref_id=" . $this->ref_id;
75 break;
76
77 case "edit":
78 $cmd_link = "ilias.php?baseClass=ilLMEditorGUI&amp;ref_id=" . $this->ref_id;
79 break;
80
81 case "properties":
82 $cmd_link = "ilias.php?baseClass=ilLMEditorGUI&amp;ref_id=" . $this->ref_id . "&amp;to_props=1";
83 break;
84
85 case "infoScreen":
86 $cmd_link = "ilias.php?baseClass=ilLMPresentationGUI&amp;ref_id=" . $this->ref_id .
87 "&amp;cmd=infoScreen&amp;file_id" . $this->getChildId();
88 break;
89
90 case 'downloadFile':
91 $cmd_link = 'ilias.php?baseClass=ilLMPresentationGUI&amp;ref_id=' . $this->ref_id .
92 '&amp;cmd=downloadFile&amp;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 {
151 $rbacsystem = $this->rbacsystem;
152
153 $props = parent::getProperties();
154
155 if ($rbacsystem->checkAccess('write', $this->ref_id)) {
156 $props[] = array("alert" => false, "property" => $lng->txt("type"),
157 "value" => $lng->txt("lm"));
158 }
159
160 return $props;
161 }
162
166 public function getCommandImage($a_cmd)
167 {
168 switch ($a_cmd) {
169 default:
170 return "";
171 }
172 }
173} // END class.ilObjCategoryGUI
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
static _getFrame($a_class, $a_type='')
Get content frame name.
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