ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilObjDlBookListGUI.php
Go to the documentation of this file.
1<?php
2/*
3 +-----------------------------------------------------------------------------+
4 | ILIAS open source |
5 +-----------------------------------------------------------------------------+
6 | Copyright (c) 1998-2001 ILIAS open source, University of Cologne |
7 | |
8 | This program is free software; you can redistribute it and/or |
9 | modify it under the terms of the GNU General Public License |
10 | as published by the Free Software Foundation; either version 2 |
11 | of the License, or (at your option) any later version. |
12 | |
13 | This program is distributed in the hope that it will be useful, |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | GNU General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU General Public License |
19 | along with this program; if not, write to the Free Software |
20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21 +-----------------------------------------------------------------------------+
22*/
23
24include_once "Services/Object/classes/class.ilObjectListGUI.php";
25
35{
41 {
42 $this->ilObjectListGUI();
43 }
44
50 function init()
51 {
52 $this->copy_enabled = false;
53 $this->delete_enabled = true;
54 $this->cut_enabled = true;
55 $this->subscribe_enabled = true;
56 $this->link_enabled = true;
57 $this->payment_enabled = true;
58 $this->type = "dbk";
59 $this->gui_class_name = "ilobjdlbookgui";
60 $this->info_screen_enabled = true;
61
62 // general commands array
63 include_once('./Modules/LearningModule/classes/class.ilObjDlBookAccess.php');
64 $this->commands = ilObjDLBookAccess::_getCommands();
65 }
66
67 function initItem($a_ref_id, $a_obj_id, $a_title = "", $a_description = "")
68 {
69 global $ilUser;
70
71 parent::initItem($a_ref_id, $a_obj_id, $a_title, $a_description);
72
73 include_once("./Modules/LearningModule/classes/class.ilObjLearningModuleAccess.php");
74 $this->last_accessed_page =
76
77 }
78
88 function getCommandLink($a_cmd)
89 {
90 global $ilCtrl;
91
92 switch($a_cmd)
93 {
94 case "continue":
95 $cmd_link = "ilias.php?baseClass=ilLMPresentationGUI&amp;ref_id=".$this->ref_id.
96 "&amp;obj_ud=".$this->last_accessed_page;
97 break;
98
99 case "view":
100 $cmd_link = "ilias.php?baseClass=ilLMPresentationGUI&amp;ref_id=".$this->ref_id;
101 break;
102
103 case "edit":
104 $cmd_link = "ilias.php?baseClass=ilLMEditorGUI&amp;ref_id=".$this->ref_id;
105 break;
106
107 case "infoScreen":
108 $cmd_link = "ilias.php?baseClass=ilLMPresentationGUI&amp;ref_id=".$this->ref_id.
109 "&amp;cmd=infoScreen";
110 break;
111
112
113 default:
114 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $this->ref_id);
115 $cmd_link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", $a_cmd);
116 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
117 break;
118 }
119
120 return $cmd_link;
121 }
122
123
131 function getCommandFrame($a_cmd)
132 {
133 global $ilias;
134
135 switch($a_cmd)
136 {
137 case "view":
138 //$showViewInFrameset = $ilias->ini->readVariable("layout","view_target") == "frame";
139 $showViewInFrameset = true;
140
141 include_once 'Services/Payment/classes/class.ilPaymentObject.php';
142 $isBuyable = ilPaymentObject::_isBuyable($this->ref_id);
143 if (($isBuyable && ilPaymentObject::_hasAccess($this->ref_id) == false) ||
144 $showViewInFrameset)
145 {
146 $frame = ilFrameTargetInfo::_getFrame("MainContent");
147 }
148 else
149 {
150 $frame = ilFrameTargetInfo::_getFrame("MainContent");
151 //$frame = "ilContObj".$this->obj_id;
152 }
153 break;
154
155 case "edit":
156 $frame = ilFrameTargetInfo::_getFrame("MainContent");
157 break;
158
159 default:
160 $frame = "";
161 break;
162 }
163
164 return $frame;
165 }
166
167
176 function getProperties()
177 {
178 global $lng, $rbacsystem;
179
180 $props = array();
181
182 include_once("./Modules/LearningModule/classes/class.ilObjDlBookAccess.php");
183
184 if (ilObjDlBookAccess::_isOffline($this->obj_id))
185 {
186 $props[] = array("alert" => true, "property" => $lng->txt("status"),
187 "value" => $lng->txt("offline"));
188 }
189
190 if ($rbacsystem->checkAccess("write", $this->ref_id))
191 {
192 $props[] = array("alert" => false, "property" => $lng->txt("type"),
193 "value" => $lng->txt("dbk"));
194 }
195
196 return $props;
197 }
198
199
200} // END class.ilObjCategoryGUI
201?>
$_GET["client_id"]
static _getFrame($a_class, $a_type='')
Get content frame name.
static _isOffline($a_obj_id)
Type-specific implementation of general status.
_getLastAccessedPage($a_ref_id, $a_user_id="")
get last accessed page
Class ilObjDlBookListGUI.
getCommandLink($a_cmd)
Overwrite this method, if link target is not build by ctrl class (e.g.
initItem($a_ref_id, $a_obj_id, $a_title="", $a_description="")
getProperties()
Get item properties.
getCommandFrame($a_cmd)
Get command target frame.
Class ilObjectListGUI.
ilObjectListGUI()
constructor
static _isBuyable($a_ref_id, $a_subtype='')
static _hasAccess($a_ref_id, $a_transaction=0, $a_subtype='')
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40
global $ilUser
Definition: imgupload.php:15