From c32a56a5657b0bb61ce873e59103a7d013166adc Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Thu, 13 Aug 2015 21:48:54 +1200 Subject: [PATCH] can_view_reports() can_view() not used anywhere anymore - kill them! --- locallib.php | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/locallib.php b/locallib.php index 7a80373..e33e336 100644 --- a/locallib.php +++ b/locallib.php @@ -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);