### Eclipse Workspace Patch 1.0
#P 18stable
Index: grade/lib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/grade/lib.php,v
retrieving revision 1.65.2.14
diff -u -r1.65.2.14 lib.php
--- grade/lib.php	23 Nov 2007 04:12:13 -0000	1.65.2.14
+++ grade/lib.php	13 May 2008 23:37:51 -0000
@@ -1219,11 +1219,10 @@
 /// Check to see if groups are being used in this course
     $currentgroup = get_current_group($course->id);
 
+    $students = grade_get_course_students($course->id); //see CONTRIB-404 - get all students and restrict if there is a chosen group
     if (($currentgroup = get_current_group($course->id)) && groupmode($course) != 0) {
         $students = get_group_students($currentgroup, "u.lastname ASC");
-    } else {
-        $students = grade_get_course_students($course->id);
-    }
+    } 
 
     if (!empty($students)) {
         foreach ($students as $student) {

