Skip to content
GitLab
Menu
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
892ceeb7
Commit
892ceeb7
authored
Mar 06, 2017
by
Dan Poltawski
Browse files
Merge branch 'MDL-57362-master' of
git://github.com/ankitagarwal/moodle
parents
3c45d26f
ca09e215
Changes
1
Hide whitespace changes
Inline
Side-by-side
mod/assign/locallib.php
View file @
892ceeb7
...
...
@@ -3064,7 +3064,7 @@ class assign {
* Throw an error if the permissions to view this users submission are missing.
*
* @throws required_capability_exception
* @return
none
* @return
void
*/
public function require_view_submission($userid) {
if (!$this->can_view_submission($userid)) {
...
...
@@ -3076,7 +3076,7 @@ class assign {
* Throw an error if the permissions to view grades in this assignment are missing.
*
* @throws required_capability_exception
* @return
none
* @return
void
*/
public function require_view_grades() {
if (!$this->can_view_grades()) {
...
...
@@ -3094,7 +3094,11 @@ class assign {
if (!has_any_capability(array('mod/assign:viewgrades', 'mod/assign:grade'), $this->context)) {
return false;
}
// 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()));
return (bool)$groupflag;
}
return true;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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