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