diff options
author | Simon Rettberg | 2019-04-01 18:02:28 +0200 |
---|---|---|
committer | Simon Rettberg | 2019-04-01 18:02:28 +0200 |
commit | a12e0d6ae853cd4c7419b8c755d142eeeedc36a4 (patch) | |
tree | f9f570aee9c1f6e0a629ff9979691c6202b2f255 /modules-available | |
parent | slx-fixes.js: Move more code to document.ready event (diff) | |
download | slx-admin-a12e0d6ae853cd4c7419b8c755d142eeeedc36a4.tar.gz slx-admin-a12e0d6ae853cd4c7419b8c755d142eeeedc36a4.tar.xz slx-admin-a12e0d6ae853cd4c7419b8c755d142eeeedc36a4.zip |
[exams] Shortcut for permcheck
Diffstat (limited to 'modules-available')
-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 |