Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

FIxed some logic for a wierd situation when you have a grouped forum but

upgrouped discussions and ungrouped students
  • Loading branch information...
commit f03554927bd0b4f45c17568cf8be9b22e5929bd2 1 parent 78ac8df
moodler authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 mod/forum/discuss.php
View
6 mod/forum/discuss.php
@@ -124,10 +124,12 @@
}
if ($groupmode and !isteacheredit($course->id)) { // Groups must be kept separate
+ $mygroupid = mygroupid($course->id);
+
if ($groupmode == SEPARATEGROUPS) {
require_login();
- if (mygroupid($course->id) == $discussion->groupid) {
+ if ((empty($mygroupid) and $discussion->groupid == -1) || ($mygroupid == $discussion->groupid)) {
$canreply = true;
} elseif ($discussion->groupid == -1) {
$canreply = false;
@@ -138,7 +140,7 @@
}
} else if ($groupmode == VISIBLEGROUPS) {
- $canreply = (mygroupid($course->id) == $discussion->groupid);
+ $canreply = ((empty($mygroupid) and $discussion->groupid == -1) || ($mygroupid == $discussion->groupid));
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.