ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilObjGroupListGUI.php
Go to the documentation of this file.
1<?php
2/*
3 +-----------------------------------------------------------------------------+
4 | ILIAS open source |
5 +-----------------------------------------------------------------------------+
6 | Copyright (c) 1998-2008 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
24
25include_once "Services/Object/classes/class.ilObjectListGUI.php";
26
36{
42 {
43 $this->ilObjectListGUI();
44 }
45
51 function init()
52 {
53 $this->static_link_enabled = true;
54 $this->delete_enabled = true;
55 $this->cut_enabled = true;
56 $this->copy_enabled = true;
57 $this->subscribe_enabled = true;
58 $this->link_enabled = false;
59 $this->payment_enabled = false;
60 $this->info_screen_enabled = true;
61 $this->type = "grp";
62 $this->gui_class_name = "ilobjgroupgui";
63
64 // general commands array
65 include_once('./Modules/Group/classes/class.ilObjGroupAccess.php');
66 $this->commands = ilObjGroupAccess::_getCommands();
67 }
68
78 function getCommandLink($a_cmd)
79 {
80 global $ilCtrl;
81
82 switch($a_cmd)
83 {
84 // BEGIN WebDAV: Mount Webfolder.
85 case 'mount_webfolder' :
86 require_once ('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
88 {
89 require_once ('Services/WebDAV/classes/class.ilDAVServer.php');
90 $davServer = ilDAVServer::getInstance();
91
92 // XXX: The following is a very dirty, ugly trick.
93 // To mount URI needs to be put into two attributes:
94 // href and folder. This hack returns both attributes
95 // like this: http://...mount_uri..." folder="http://...folder_uri...
96 $cmd_link = $davServer->getMountURI($this->ref_id).
97 '" folder="'.$davServer->getFolderURI($this->ref_id);
98 break;
99 } // fall through if plugin is not active
100 // END Mount Webfolder.
101
102 case "edit":
103 default:
104 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $this->ref_id);
105 $cmd_link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", $a_cmd);
106 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
107 break;
108 }
109
110 return $cmd_link;
111 }
112
113
122 function getProperties()
123 {
124 global $lng, $rbacsystem,$ilUser;
125
126 // BEGIN WebDAV get parent properties
127 $props = parent::getProperties();
128 // END WebDAV get parent properties
129
130 include_once './Modules/Course/classes/class.ilObjCourseAccess.php';
132//var_dump($info);
133 if($info['reg_info_list_prop'])
134 {
135 $props[] = array(
136 'alert' => false,
137 'newline' => true,
138 'property' => $info['reg_info_list_prop']['property'],
139 'value' => $info['reg_info_list_prop']['value']
140 );
141 }
142 if($info['reg_info_list_prop_limit'])
143 {
144
145 $props[] = array(
146 'alert' => false,
147 'newline' => false,
148 'property' => $info['reg_info_list_prop_limit']['property'],
149 'propertyNameVisible' => strlen($info['reg_info_list_prop_limit']['property']) ? true : false,
150 'value' => $info['reg_info_list_prop_limit']['value']
151 );
152 }
153
154
155
156 // waiting list
157 include_once './Modules/Group/classes/class.ilGroupWaitingList.php';
158 if(ilGroupWaitingList::_isOnList($ilUser->getId(),$this->obj_id))
159 {
160 $props[] = array(
161 "alert" => true,
162 "property" => $lng->txt('member_status'),
163 "value" => $lng->txt('on_waiting_list')
164 );
165 }
166
167
168 return $props;
169 }
170
171 // BEGIN WebDAV mount_webfolder in _blank frame
181 function getCommandFrame($a_cmd)
182 {
183 // begin-patch fm
184 return parent::getCommandFrame($a_cmd);
185 // end-patch fm
186 }
187
188
198 public function checkCommandAccess($a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id = "")
199 {
200 if($a_permission == 'grp_linked')
201 {
202 return
203 parent::checkCommandAccess('read', '', $a_ref_id, $a_type, $a_obj_id) ||
204 parent::checkCommandAccess('join', 'join', $a_ref_id, $a_type, $a_obj_id);
205 }
206 return parent::checkCommandAccess($a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id);
207 }
208
209 // END WebDAV mount_webfolder in _blank frame
210} // END class.ilObjGroupListGUI
211?>
$_GET["client_id"]
static getInstance()
Get singelton iunstance.
static lookupRegistrationInfo($a_obj_id)
Lookup registration info @global ilDB $ilDB @global ilObjUser $ilUser @global ilLanguage $lng.
Class ilObjGroupListGUI.
getCommandLink($a_cmd)
Overwrite this method, if link target is not build by ctrl class (e.g.
getCommandFrame($a_cmd)
Get command target frame.
checkCommandAccess($a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id="")
Workaround for course titles (linked if join or read permission is granted)
getProperties()
Get item properties.
Class ilObjectListGUI.
ilObjectListGUI()
constructor
static _isOnList($a_usr_id, $a_obj_id)
Check if a user on the waiting list.
$info
Definition: example_052.php:80
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40
global $ilUser
Definition: imgupload.php:15