mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
fixed group management in wiki
This commit is contained in:
parent
3fde1a3d2f
commit
33e7885ee0
@ -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
|
||||
)
|
||||
)
|
||||
);
|
||||
|
@ -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) {
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user