ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilObjCategoryAccess.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 include_once("classes/class.ilObjectAccess.php");
25 
36 {
37 
50  function _getCommands()
51  {
52  $commands = array();
53  $commands[] = array("permission" => "read", "cmd" => "render", "lang_var" => "show", "default" => true);
54 
55  // why here, why read permission? it just needs info_screen_enabled = true in ilObjCategoryListGUI (alex, 30.7.2008)
56  // this is not consistent, with all other objects...
57  //$commands[] = array("permission" => "read", "cmd" => "showSummary", "lang_var" => "info_short", "enable_anonymous" => "false");
58 
59  // BEGIN WebDAV
60  require_once ('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
62  {
63  include_once './Services/WebDAV/classes/class.ilDAVUtils.php';
64  if(ilDAVUtils::getInstance()->isLocalPasswordInstructionRequired())
65  {
66  $commands[] = array('permission' => 'read', 'cmd' => 'showPasswordInstruction', 'lang_var' => 'mount_webfolder', 'enable_anonymous' => 'false');
67  }
68  else
69  {
70  $commands[] = array("permission" => "read", "cmd" => "mount_webfolder", "lang_var" => "mount_webfolder", "enable_anonymous" => "false");
71  }
72  }
73  // END WebDAV
74  $commands[] = array("permission" => "write", "cmd" => "edit", "lang_var" => "edit");
75 
76  return $commands;
77  }
78 
82  function _checkGoto($a_target)
83  {
84  global $ilAccess;
85 
86  $t_arr = explode("_", $a_target);
87 
88  if ($t_arr[0] != "cat" || ((int) $t_arr[1]) <= 0)
89  {
90  return false;
91  }
92 
93  if ($ilAccess->checkAccess("read", "", $t_arr[1]))
94  {
95  return true;
96  }
97  return false;
98  }
99 }
100 
101 ?>