diff options
author | Simon Rettberg | 2019-04-01 18:02:28 +0200 |
---|---|---|
committer | Simon Rettberg | 2019-04-01 18:15:42 +0200 |
commit | ab3bc2ad4bd7f09144794aafeb4320cf7b7aaa8e (patch) | |
tree | 5447de97e1ab3a406d048325f92fb39d01512b14 | |
parent | slx-fixes.js: Move more code to document.ready event (diff) | |
download | slx-admin-ab3bc2ad4bd7f09144794aafeb4320cf7b7aaa8e.tar.gz slx-admin-ab3bc2ad4bd7f09144794aafeb4320cf7b7aaa8e.tar.xz slx-admin-ab3bc2ad4bd7f09144794aafeb4320cf7b7aaa8e.zip |
[exams] Shortcut for permcheck
-rw-r--r-- | modules-available/exams/page.inc.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules-available/exams/page.inc.php b/modules-available/exams/page.inc.php index 600089fc..31593273 100644 --- a/modules-available/exams/page.inc.php +++ b/modules-available/exams/page.inc.php @@ -105,6 +105,8 @@ class Page_Exams extends Page // returns true if user is allowed to edit the exam protected function userCanEditExam($examid = NULL) { + if (in_array(0, $this->userEditLocations)) // Trivial case -- don't query if global perms + return true; if ($examid === null) return User::hasPermission('exams.edit'); // Check locations of existing exam |