]> git.mjollnir.org Git - moodle.git/commitdiff
Added second argument ($cm) to groupmode() calls in
authorrkingdon <rkingdon>
Thu, 16 Sep 2004 17:33:59 +0000 (17:33 +0000)
committerrkingdon <rkingdon>
Thu, 16 Sep 2004 17:33:59 +0000 (17:33 +0000)
_get_available_students function.

mod/dialogue/locallib.php

index e39dbdc9b8844a95f33c7c617d575609f77a541e..e5d11623a2791779dfa48521e3ed38533a91c70a 100644 (file)
@@ -139,7 +139,7 @@ global $USER;
     
     $groupid = get_current_group($course->id);
     // add current group before list of students if it's the teacher
-    if (isteacher($course->id) and groupmode($course)) {
+    if (isteacher($course->id) and groupmode($course, $cm)) {
         // show teacher their current group
         if ($groupid) {
             if (!$group = get_record("groups", "id", $groupid)) {
@@ -157,7 +157,7 @@ global $USER;
             // ...exclude self and...
             if ($USER->id != $otheruser->id) {
                 // ...if teacher and groups then exclude students not in the current group
-                if (isteacher($course->id) and groupmode($course) and $groupid) {
+                if (isteacher($course->id) and groupmode($course, $cm) and $groupid) {
                     if (!ismember($groupid, $otheruser->id)) {
                         continue;
                     }