diff --git a/app.py b/app.py index d855cc5..da99666 100644 --- a/app.py +++ b/app.py @@ -129,7 +129,6 @@ class App(object): t = self.online[uid]['test'] t.update_answers(ans) grade = t.correct() - logger.info('Student {0}: finished with {1} points.'.format(uid, grade)) # save JSON with the test fname = ' -- '.join((t['student']['number'], t['ref'], str(t['finish_time']))) + '.json' @@ -155,6 +154,7 @@ class App(object): test_id=t['ref']) for q in t['questions'] if 'grade' in q]) s.commit() + logger.info('Student {0}: finished test.'.format(uid)) return grade # ----------------------------------------------------------------------- diff --git a/test.py b/test.py index ab9f2a0..9073b0e 100644 --- a/test.py +++ b/test.py @@ -232,7 +232,7 @@ class Test(dict): total_points += q['points'] self['grade'] = round(20.0 * max(grade / total_points, 0.0), 1) - logger.info('Student {}: finished with {} points.'.format(self['student']['number'], self['grade'])) + logger.info('Student {}: correction gave {} points.'.format(self['student']['number'], self['grade'])) return self['grade'] # ----------------------------------------------------------------------- -- libgit2 0.21.2