When a "teacher" role is restricted to one group, they can see grades of ALL students in the gradebook. They should just see their group.
The course group settings are "Separate" and "Forced".
If they are a member of more than one group, and the drop-down group list is shown, then the gradebook list is filtered correctly.
I believe the issue might be in /grade/report/grader/lib.php ~ line 141. The function for setting the group selection "WHERE" clause (setup_groups) is only fired if the user_preference 'showgroups' is set. However, I don't think this gets set if the teacher is only in one group. By removing the test for this preference before running the setup_groups function I can get the gradebook to operate as it should, but I don't know if this is breaking anything else.
Whilst similar to some of the other issues with the gradebook, I think it is slightly different, and I am not alone: http://moodle.org/mod/forum/discuss.php?d=90830 and http://moodle.org/mod/forum/discuss.php?d=101088#p446463
Thanks for any help, and as this is my first week working with Moodle then go easy...