Permalink
Browse files

Merge branch 'MDL-37629-23' of git://github.com/damyon/moodle into MO…

…ODLE_23_STABLE
  • Loading branch information...
Sam Hemelryk
Sam Hemelryk committed Jan 27, 2013
2 parents b5fe549 + eed5149 commit a83ce21dfba53bd3170ddf3dca1a9fc436f81fa9
Showing with 0 additions and 18 deletions.
  1. +0 −18 mod/assign/submission/comments/lib.php
@@ -51,15 +51,6 @@ function assignsubmission_comments_comment_validate(stdClass $options) {
if (!has_capability('mod/assign:grade', $context)) {
if (!has_capability('mod/assign:submit', $context)) {
throw new comment_exception('nopermissiontocomment');
- } else if ($assignment->get_instance()->teamsubmission) {
- $group = $assignment->get_submission_group($USER->id);
- $groupid = 0;
- if ($group) {
- $groupid = $group->id;
- }
- if ($groupid != $submission->groupid) {
- throw new comment_exception('nopermissiontocomment');
- }
} else if ($submission->userid != $USER->id) {
throw new comment_exception('nopermissiontocomment');
}
@@ -95,15 +86,6 @@ function assignsubmission_comments_comment_permissions(stdClass $options) {
if (!has_capability('mod/assign:grade', $context)) {
if (!has_capability('mod/assign:submit', $context)) {
return array('post' => false, 'view' => false);
- } else if ($assignment->get_instance()->teamsubmission) {
- $group = $assignment->get_submission_group($USER->id);
- $groupid = 0;
- if ($group) {
- $groupid = $group->id;
- }
- if ($groupid != $submission->groupid) {
- return array('post' => false, 'view' => false);
- }
} else if ($submission->userid != $USER->id) {
return array('post' => false, 'view' => false);
}

0 comments on commit a83ce21

Please sign in to comment.