ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
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 
25 include_once "Services/Object/classes/class.ilObjectListGUI.php";
26 
36 {
41  function ilObjGroupListGUI()
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  switch($a_cmd)
81  {
82  case "view":
83  case "join":
84  // using ilCtrl does not work on personal desktop
85  //$this->ctrl->setParameterByClass("ilObjGroupGUI", "ref_id", $this->ref_id);
86  //$cmd_link = $this->ctrl->getLinkTargetByClass("ilObjGroupGUI");
87  $cmd_link = "repository.php?ref_id=".$this->ref_id."&cmd=$a_cmd";
88  break;
89 
90  // BEGIN WebDAV: Mount Webfolder.
91  case 'mount_webfolder' :
92  require_once ('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
94  {
95  require_once ('Services/WebDAV/classes/class.ilDAVServer.php');
96  $davServer = ilDAVServer::getInstance();
97 
98  // XXX: The following is a very dirty, ugly trick.
99  // To mount URI needs to be put into two attributes:
100  // href and folder. This hack returns both attributes
101  // like this: http://...mount_uri..." folder="http://...folder_uri...
102  $cmd_link = $davServer->getMountURI($this->ref_id).
103  '" folder="'.$davServer->getFolderURI($this->ref_id);
104  break;
105  } // fall through if plugin is not active
106  // END Mount Webfolder.
107 
108  case "edit":
109  default:
110  $cmd_link = "repository.php?ref_id=".$this->ref_id."&cmd=$a_cmd";
111  break;
112  }
113 
114  return $cmd_link;
115  }
116 
117 
126  function getProperties()
127  {
128  global $lng, $rbacsystem,$ilUser;
129 
130  // BEGIN WebDAV get parent properties
131  $props = parent::getProperties();
132  // END WebDAV get parent properties
133 
134  // waiting list
135  include_once './Modules/Group/classes/class.ilGroupWaitingList.php';
136  if(ilGroupWaitingList::_isOnList($ilUser->getId(),$this->obj_id))
137  {
138  $props[] = array(
139  "alert" => true,
140  "property" => $lng->txt('member_status'),
141  "value" => $lng->txt('on_waiting_list')
142  );
143  }
144 
145 
146  return $props;
147  }
148 
149  // BEGIN WebDAV mount_webfolder in _blank frame
159  function getCommandFrame($a_cmd)
160  {
161  require_once ('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
163  {
164  return ($a_cmd == 'mount_webfolder') ? '_blank' : '';
165  }
166  else
167  {
168  return '';
169  }
170  }
171  // END WebDAV mount_webfolder in _blank frame
172 } // END class.ilObjGroupListGUI
173 ?>