ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilObjFolderListGUI.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 
24 
35 include_once "Services/Object/classes/class.ilObjectListGUI.php";
36 
38 {
43  function ilObjFolderListGUI()
44  {
45  $this->ilObjectListGUI();
46  }
47 
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 = "fold";
62  $this->gui_class_name = "ilobjfoldergui";
63 
64  // general commands array
65  include_once('./Modules/Folder/classes/class.ilObjFolderAccess.php');
66  $this->commands = ilObjFolderAccess::_getCommands();
67  }
68 
69  // BEGIN WebDAV: Get parent properties
70  // BEGIN ChangeEvent: Get parent properties
79  function getProperties()
80  {
81  global $lng, $ilUser, $ilias;
82 
83  // BEGIN WebDAV get parent properties
84  $props = parent::getProperties();
85  // END WebDAV get parent properties
86 
87  return $props;
88  }
89  // END ChangeEvent: Get parent properties
90  // END WebDAV: Get parent properties
91 
99  function getCommandLink($a_cmd)
100  {
101  // BEGIN WebDAV: Mount webfolder.
102  switch ($a_cmd)
103  {
104  case 'mount_webfolder' :
105  require_once ('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
107  {
108  require_once ('Services/WebDAV/classes/class.ilDAVServer.php');
109  $davServer = ilDAVServer::getInstance();
110 
111  // XXX: The following is a very dirty, ugly trick.
112  // To mount URI needs to be put into two attributes:
113  // href and folder. This hack returns both attributes
114  // like this: http://...mount_uri..." folder="http://...folder_uri...
115  $cmd_link = $davServer->getMountURI($this->ref_id, $this->title, $this->parent).
116  '" folder="'.$davServer->getFolderURI($this->ref_id, $this->title, $this->parent);
117  break;
118  } // Fall through, when plugin is inactive.
119  default :
120  // separate method for this line
121  $cmd_link = "repository.php?ref_id=".$this->ref_id."&cmd=$a_cmd";
122  break;
123  }
124 
125  return $cmd_link;
126  // END WebDAV: Mount Webfolder
127  }
128 
129  // BEGIN WebDAV: mount_webfolder in _blank frame
139  function getCommandFrame($a_cmd)
140  {
141  require_once ('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
143  {
144  return ($a_cmd == 'mount_webfolder') ? '_blank' : '';
145  }
146  else
147  {
148  return '';
149  }
150  }
151  // END WebDAV: mount_webfolder in _blank frame
152 
153 
154 } // END class.ilObjFolderListGUI
155 ?>