fixed group management in wiki

This commit is contained in:
skodak 2006-09-12 21:07:54 +00:00
parent 3fde1a3d2f
commit 33e7885ee0
3 changed files with 3 additions and 16 deletions

View File

@ -46,19 +46,5 @@ $mod_wiki_capabilities = array(
'coursecreator' => CAP_PREVENT,
'admin' => CAP_ALLOW
)
),
'mod/wiki:manageallgroups' => array(
'captype' => 'write',
'contextlevel' => CONTEXT_MODULE,
'legacy' => array(
'guest' => CAP_PREVENT,
'student' => CAP_PREVENT,
'teacher' => CAP_PREVENT,
'editingteacher' => CAP_ALLOW,
'coursecreator' => CAP_PREVENT,
'admin' => CAP_ALLOW
)
)
);

View File

@ -31,7 +31,8 @@ function wiki_is_teacher($wiki, $userid=NULL) {
}
function wiki_is_teacheredit($wiki, $userid=NULL) {
return has_capability('mod/wiki:manageallgroups', wiki_context($wiki), $userid);
return has_capability('mod/wiki:manage', wiki_context($wiki), $userid)
and has_capability('moodle/site:accessallgroups', wiki_context($wiki), $userid);
}
function wiki_is_student($wiki, $userid=NULL) {

View File

@ -5,7 +5,7 @@
/// This fragment is called by moodle_needs_upgrading() and /admin/index.php
/////////////////////////////////////////////////////////////////////////////////
$module->version = 2006091201; // The current module version (Date: YYYYMMDDXX)
$module->version = 2006091202; // The current module version (Date: YYYYMMDDXX)
$module->requires = 2006080900; // The current module version (Date: YYYYMMDDXX)
$module->cron = 0; // Period for cron to check this module (secs)