MDL-39471 mod_assign: Fix for missing function in 3.2
Moodle 3.2 doesn't have can_edit_group_submission. This replaces the lack of that function.
This commit is contained in:
@@ -137,7 +137,14 @@ function assignsubmission_comments_comment_display($comments, $options) {
|
||||
$userinteam = false;
|
||||
if ($assignment->get_instance()->teamsubmission && has_capability('mod/assign:submit', $context)) {
|
||||
$assignment->set_course(get_course($course));
|
||||
$userinteam = $assignment->can_edit_group_submission($submission->groupid);
|
||||
|
||||
$members = $assignment->get_submission_group_members($submission->groupid, true);
|
||||
foreach ($members as $member) {
|
||||
if ($assignment->can_edit_submission($member->id)) {
|
||||
$userinteam = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($comments as $comment) {
|
||||
|
||||
Reference in New Issue
Block a user