From: gustav_delius Date: Sun, 23 May 2004 20:46:29 +0000 (+0000) Subject: Fixed bug 1443: In the case of a "Teacher Forum" the "Subscribe everyone to this... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f81be26aeeac9d6b9e50f80e3e31dbaa19c809b3;p=moodle.git Fixed bug 1443: In the case of a "Teacher Forum" the "Subscribe everyone to this forum" button now only subscribes teachers. --- diff --git a/mod/forum/subscribers.php b/mod/forum/subscribers.php index 74c3c57b90..6f1c8cb347 100644 --- a/mod/forum/subscribers.php +++ b/mod/forum/subscribers.php @@ -38,11 +38,11 @@ if ($course->category) { $navigation = "id\">$course->shortname -> - id\">$strforums -> - id\">$forum->name -> $strsubscribers"; + id\">$strforums -> + id\">$forum->name -> $strsubscribers"; } else { $navigation = "id\">$strforums -> - id\">$forum->name -> $strsubscribers"; + id\">$forum->name -> $strsubscribers"; } print_header("$course->shortname: $strsubscribers", "$course->fullname", "$navigation"); @@ -56,7 +56,9 @@ } if ($subscribe == 'all') { - if ($currentgroup) { + if ($forum->type == 'teacher') { + $users = get_course_teachers($course->id); + } elseif ($currentgroup) { $users = get_group_users($currentgroup); } else { $users = get_course_users($course->id); @@ -70,7 +72,7 @@ if ($currentgroup) { if ($users = get_group_users($currentgroup)) { foreach ($users as $user) { - forum_unsubscribe($user->id, $forum->id); + forum_unsubscribe($user->id, $forum->id); } } } else {