ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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{
37
43 function init()
44 {
45 $this->static_link_enabled = true;
46 $this->delete_enabled = true;
47 $this->cut_enabled = true;
48 $this->copy_enabled = true;
49 $this->subscribe_enabled = true;
50 $this->link_enabled = false;
51 $this->info_screen_enabled = true;
52 $this->type = "grp";
53 $this->gui_class_name = "ilobjgroupgui";
54
55 // general commands array
56 include_once('./Modules/Group/classes/class.ilObjGroupAccess.php');
57 $this->commands = ilObjGroupAccess::_getCommands();
58 }
59
69 function getCommandLink($a_cmd)
70 {
71 global $ilCtrl;
72
73 switch($a_cmd)
74 {
75 // BEGIN WebDAV: Mount Webfolder.
76 case 'mount_webfolder' :
77 require_once ('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
79 {
80 require_once ('Services/WebDAV/classes/class.ilDAVServer.php');
81 $davServer = ilDAVServer::getInstance();
82
83 // XXX: The following is a very dirty, ugly trick.
84 // To mount URI needs to be put into two attributes:
85 // href and folder. This hack returns both attributes
86 // like this: http://...mount_uri..." folder="http://...folder_uri...
87 $cmd_link = $davServer->getMountURI($this->ref_id).
88 '" folder="'.$davServer->getFolderURI($this->ref_id);
89 break;
90 } // fall through if plugin is not active
91 // END Mount Webfolder.
92
93 case "edit":
94 default:
95 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $this->ref_id);
96 $cmd_link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", $a_cmd);
97 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
98 break;
99 }
100
101 return $cmd_link;
102 }
103
104
113 function getProperties()
114 {
115 global $lng, $rbacsystem,$ilUser;
116
117 // BEGIN WebDAV get parent properties
118 $props = parent::getProperties();
119 // END WebDAV get parent properties
120
121 include_once './Modules/Group/classes/class.ilObjGroupAccess.php';
123//var_dump($info);
124 if($info['reg_info_list_prop'])
125 {
126 $props[] = array(
127 'alert' => false,
128 'newline' => true,
129 'property' => $info['reg_info_list_prop']['property'],
130 'value' => $info['reg_info_list_prop']['value']
131 );
132 }
133 if($info['reg_info_list_prop_limit'])
134 {
135
136 $props[] = array(
137 'alert' => false,
138 'newline' => false,
139 'property' => $info['reg_info_list_prop_limit']['property'],
140 'propertyNameVisible' => strlen($info['reg_info_list_prop_limit']['property']) ? true : false,
141 'value' => $info['reg_info_list_prop_limit']['value']
142 );
143 }
144
145
146
147 // waiting list
148 include_once './Modules/Group/classes/class.ilGroupWaitingList.php';
149 if(ilGroupWaitingList::_isOnList($ilUser->getId(),$this->obj_id))
150 {
151 $props[] = array(
152 "alert" => true,
153 "property" => $lng->txt('member_status'),
154 "value" => $lng->txt('on_waiting_list')
155 );
156 }
157
158
159 return $props;
160 }
161
162 // BEGIN WebDAV mount_webfolder in _blank frame
172 function getCommandFrame($a_cmd)
173 {
174 // begin-patch fm
175 return parent::getCommandFrame($a_cmd);
176 // end-patch fm
177 }
178
179
189 public function checkCommandAccess($a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id = "")
190 {
191 if($a_permission == 'grp_linked')
192 {
193 return
194 parent::checkCommandAccess('read', '', $a_ref_id, $a_type, $a_obj_id) ||
195 parent::checkCommandAccess('join', 'join', $a_ref_id, $a_type, $a_obj_id);
196 }
197 return parent::checkCommandAccess($a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id);
198 }
199
200 // END WebDAV mount_webfolder in _blank frame
201} // END class.ilObjGroupListGUI
202?>
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
static getInstance()
Get singelton instance.
static _getCommands()
get commands
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.
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:17
$ilUser
Definition: imgupload.php:18
$a_type
Definition: workflow.php:93