Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodle
moodle
Commits
0884ddea
Commit
0884ddea
authored
Mar 07, 2017
by
Ankit Agarwal
Browse files
MDL-57362 assign: Fix permission checks
parent
113d58a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
mod/assign/locallib.php
View file @
0884ddea
...
...
@@ -3096,7 +3096,8 @@ class assign {
}
// Checks for the edge case when user belongs to no groups and groupmode is sep.
if
(
$this
->
get_course_module
()
->
effectivegroupmode
==
SEPARATEGROUPS
)
{
$groupflag
=
!
empty
(
groups_get_activity_allowed_groups
(
$this
->
get_course_module
()));
$groupflag
=
has_capability
(
'moodle/site:accessallgroups'
,
$this
->
get_context
());
$groupflag
=
$groupflag
||
!
empty
(
groups_get_activity_allowed_groups
(
$this
->
get_course_module
()));
return
(
bool
)
$groupflag
;
}
return
true
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment