|
|
@ -74,10 +74,6 @@ class attendance_permissions { |
|
|
|
return $this->canviewreports; |
|
|
|
} |
|
|
|
|
|
|
|
public function require_view_reports_capability() { |
|
|
|
require_capability('mod/attendance:viewreports', $this->context); |
|
|
|
} |
|
|
|
|
|
|
|
public function can_take() { |
|
|
|
if (is_null($this->cantake)) { |
|
|
|
$this->cantake = has_capability('mod/attendance:takeattendances', $this->context); |
|
|
@ -115,10 +111,6 @@ class attendance_permissions { |
|
|
|
|
|
|
|
return $this->canmanage; |
|
|
|
} |
|
|
|
|
|
|
|
public function require_manage_capability() { |
|
|
|
require_capability('mod/attendance:manageattendances', $this->context); |
|
|
|
} |
|
|
|
|
|
|
|
// Check to see if the user can manage temporary users. |
|
|
|
public function can_managetemp() { |
|
|
@ -128,10 +120,6 @@ class attendance_permissions { |
|
|
|
return $this->canmanagetemp; |
|
|
|
} |
|
|
|
|
|
|
|
public function require_managetemp_capability() { |
|
|
|
require_capability('mod/attendance:managetemporaryusers', $this->context); |
|
|
|
} |
|
|
|
|
|
|
|
public function can_change_preferences() { |
|
|
|
if (is_null($this->canchangepreferences)) { |
|
|
|
$this->canchangepreferences = has_capability('mod/attendance:changepreferences', $this->context); |
|
|
@ -140,10 +128,6 @@ class attendance_permissions { |
|
|
|
return $this->canchangepreferences; |
|
|
|
} |
|
|
|
|
|
|
|
public function require_change_preferences_capability() { |
|
|
|
require_capability('mod/attendance:changepreferences', $this->context); |
|
|
|
} |
|
|
|
|
|
|
|
public function can_export() { |
|
|
|
if (is_null($this->canexport)) { |
|
|
|
$this->canexport = has_capability('mod/attendance:export', $this->context); |
|
|
@ -152,10 +136,6 @@ class attendance_permissions { |
|
|
|
return $this->canexport; |
|
|
|
} |
|
|
|
|
|
|
|
public function require_export_capability() { |
|
|
|
require_capability('mod/attendance:export', $this->context); |
|
|
|
} |
|
|
|
|
|
|
|
public function can_be_listed() { |
|
|
|
if (is_null($this->canbelisted)) { |
|
|
|
$this->canbelisted = has_capability('mod/attendance:canbelisted', $this->context, null, false); |
|
|
|