From: W. Trevor King Date: Thu, 20 Sep 2012 00:37:20 +0000 (-0400) Subject: storage: only try and load grades for students. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3d107095408379e5fe6325b83b596111279f30b9;p=pygrader.git storage: only try and load grades for students. --- diff --git a/pygrader/storage.py b/pygrader/storage.py index 51fcadd..8d3d768 100644 --- a/pygrader/storage.py +++ b/pygrader/storage.py @@ -288,10 +288,11 @@ def load_grades(basedir, assignments, people): "Load all grades in a course directory." for assignment in assignments: for person in people: - try: - yield load_grade(basedir, assignment, person) - except IOError: - continue + if 'students' in person.groups: + try: + yield load_grade(basedir, assignment, person) + except IOError: + continue def load_grade(basedir, assignment, person): "Load a single grade from a course directory."