From a028c2918764b684872dc3165d9193db18aa9c1e Mon Sep 17 00:00:00 2001 From: vyshane Date: Tue, 15 Aug 2006 04:13:22 +0000 Subject: [PATCH] Added new capabilities --- lib/db/access.php | 62 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 59 insertions(+), 3 deletions(-) diff --git a/lib/db/access.php b/lib/db/access.php index b5c310ddd89..868aca51012 100644 --- a/lib/db/access.php +++ b/lib/db/access.php @@ -95,9 +95,9 @@ $moodle_capabilities = array( 'legacy' => array( 'guest' => CAP_PREVENT, 'student' => CAP_PREVENT, - 'teacher' => CAP_PREVENT, - 'editingteacher' => CAP_PREVENT, - 'coursecreator' => CAP_PREVENT, + 'teacher' => CAP_ALLOW, + 'editingteacher' => CAP_ALLOW, + 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW ) ), @@ -172,6 +172,20 @@ $moodle_capabilities = array( ) ), + 'moodle/site:viewreports' => array( + + 'captype' => 'read', + 'contextlevel' => CONTEXT_SITE, + 'legacy' => array( + 'guest' => CAP_PREVENT, + 'student' => CAP_PREVENT, + 'teacher' => CAP_ALLOW, + 'editingteacher' => CAP_ALLOW, + 'coursecreator' => CAP_ALLOW, + 'admin' => CAP_ALLOW + ) + ), + 'moodle/user:create' => array( 'captype' => 'write', @@ -382,6 +396,34 @@ $moodle_capabilities = array( ) ), + 'moodle/course:managefiles' => array( + + 'captype' => 'write', + 'contextlevel' => CONTEXT_COURSE, + 'legacy' => array( + 'guest' => CAP_PREVENT, + 'student' => CAP_PREVENT, + 'teacher' => CAP_PREVENT, + 'editingteacher' => CAP_ALLOW, + 'coursecreator' => CAP_ALLOW, + 'admin' => CAP_ALLOW + ) + ), + + 'moodle/course:managequestions' => array( + + 'captype' => 'write', + 'contextlevel' => CONTEXT_COURSE, + 'legacy' => array( + 'guest' => CAP_PREVENT, + 'student' => CAP_PREVENT, + 'teacher' => CAP_ALLOW, + 'editingteacher' => CAP_ALLOW, + 'coursecreator' => CAP_ALLOW, + 'admin' => CAP_ALLOW + ) + ), + 'moodle/course:manageactivities' => array( 'captype' => 'write', @@ -480,6 +522,20 @@ $moodle_capabilities = array( ) ), + 'moodle/course:reset' => array( + + 'captype' => 'write', + 'contextlevel' => CONTEXT_COURSE, + 'legacy' => array( + 'guest' => CAP_PREVENT, + 'student' => CAP_PREVENT, + 'teacher' => CAP_PREVENT, + 'editingteacher' => CAP_ALLOW, + 'coursecreator' => CAP_ALLOW, + 'admin' => CAP_ALLOW + ) + ), + 'moodle/blog:view' => array( 'captype' => 'read',