ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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
14{
20 public function init()
21 {
22 $this->static_link_enabled = true;
23 $this->delete_enabled = true;
24 $this->cut_enabled = true;
25 $this->copy_enabled = true;
26 $this->subscribe_enabled = true;
27 $this->link_enabled = true;
28 $this->info_screen_enabled = true;
29 $this->type = "lm";
30 $this->gui_class_name = "ilobjlearningmodulegui";
31
32 // general commands array
34 }
35
36 public function setChildId($a_child_id)
37 {
38 $this->child_id = $a_child_id;
39 }
40 public function getChildId()
41 {
42 return $this->child_id;
43 }
44
54 public function getCommandLink($a_cmd)
55 {
57
58 switch ($a_cmd) {
59 case "continue":
60 $cmd_link = "ilias.php?baseClass=ilLMPresentationGUI&amp;ref_id=" . $this->ref_id .
61 "&amp;cmd=resume";
62 break;
63
64 case "page":
65 // Used for presentation of single pages chapters in search results
66 $cmd_link = "ilias.php?baseClass=ilLMPresentationGUI&amp;ref_id=" . $this->ref_id .
67 "&amp;obj_id=" . $this->getChildId();
68 break;
69
70 case "view":
71 $cmd_link = "ilias.php?baseClass=ilLMPresentationGUI&amp;ref_id=" . $this->ref_id;
72 break;
73
74 case "edit":
75 $cmd_link = "ilias.php?baseClass=ilLMEditorGUI&amp;ref_id=" . $this->ref_id;
76 break;
77
78 case "properties":
79 $cmd_link = "ilias.php?baseClass=ilLMEditorGUI&amp;ref_id=" . $this->ref_id . "&amp;to_props=1";
80 break;
81
82 case "infoScreen":
83 $cmd_link = "ilias.php?baseClass=ilLMPresentationGUI&amp;ref_id=" . $this->ref_id .
84 "&amp;cmd=infoScreen&amp;file_id" . $this->getChildId();
85 break;
86
87 case 'downloadFile':
88 $cmd_link = 'ilias.php?baseClass=ilLMPresentationGUI&amp;ref_id=' . $this->ref_id .
89 '&amp;cmd=downloadFile&amp;file_id=' . $this->getChildId();
90 break;
91
92 default:
93 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $this->ref_id);
94 $cmd_link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", $a_cmd);
95 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
96 break;
97 }
98
99 return $cmd_link;
100 }
101
102
110 public function getCommandFrame($a_cmd)
111 {
112 switch ($a_cmd) {
113 case "view":
114 case "continue":
115 case 'list':
116 $frame = ilFrameTargetInfo::_getFrame("MainContent");
117 break;
118
119 case "edit":
120 case "properties":
121 $frame = ilFrameTargetInfo::_getFrame("MainContent");
122 break;
123
124 case "infoScreen":
125 $frame = ilFrameTargetInfo::_getFrame("MainContent");
126 break;
127
128 default:
129 $frame = "";
130 break;
131 }
132
133 return $frame;
134 }
135
136
145 public function getProperties()
146 {
148 $rbacsystem = $this->rbacsystem;
149
150 $props = parent::getProperties();
151
152 if ($rbacsystem->checkAccess('write', $this->ref_id)) {
153 $props[] = array("alert" => false, "property" => $lng->txt("type"),
154 "value" => $lng->txt("lm"));
155 }
156
157 return $props;
158 }
159
163 public function getCommandImage($a_cmd)
164 {
165 switch ($a_cmd) {
166 default:
167 return "";
168 }
169 }
170} // 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