can_view_reports() can_view() not used anywhere anymore - kill them!
authorDan Marsden <dan@danmarsden.com>
Thu, 13 Aug 2015 09:48:54 +0000 (21:48 +1200)
committerDan Marsden <dan@danmarsden.com>
Thu, 13 Aug 2015 09:50:29 +0000 (21:50 +1200)
locallib.php

index 7a80373..e33e336 100644 (file)
@@ -39,8 +39,6 @@ define('ATT_SORT_LASTNAME', 1);
 define('ATT_SORT_FIRSTNAME', 2);
 
 class attendance_permissions {
-    private $canview;
-    private $canviewreports;
     private $cantake;
     private $canchange;
     private $canmanage;
@@ -58,22 +56,6 @@ class attendance_permissions {
         $this->context = $context;
     }
 
-    public function can_view() {
-        if (is_null($this->canview)) {
-            $this->canview = has_capability('mod/attendance:view', $this->context);
-        }
-
-        return $this->canview;
-    }
-
-    public function can_view_reports() {
-        if (is_null($this->canviewreports)) {
-            $this->canviewreports = has_capability('mod/attendance:viewreports', $this->context);
-        }
-
-        return $this->canviewreports;
-    }
-
     public function can_take() {
         if (is_null($this->cantake)) {
             $this->cantake = has_capability('mod/attendance:takeattendances', $this->context);