From 3d107095408379e5fe6325b83b596111279f30b9 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 19 Sep 2012 20:37:20 -0400 Subject: [PATCH] storage: only try and load grades for students. --- pygrader/storage.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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." -- 2.26.2