Commit 9f66ec1892f23268d3091a1be122fb3aab58a25b

Authored by Miguel Barao
1 parent e7da34fc
Exists in master and in 1 other branch dev

- minor changes in logging messages.

Showing 2 changed files with 2 additions and 2 deletions   Show diff stats
@@ -129,7 +129,6 @@ class App(object): @@ -129,7 +129,6 @@ class App(object):
129 t = self.online[uid]['test'] 129 t = self.online[uid]['test']
130 t.update_answers(ans) 130 t.update_answers(ans)
131 grade = t.correct() 131 grade = t.correct()
132 - logger.info('Student {0}: finished with {1} points.'.format(uid, grade))  
133 132
134 # save JSON with the test 133 # save JSON with the test
135 fname = ' -- '.join((t['student']['number'], t['ref'], str(t['finish_time']))) + '.json' 134 fname = ' -- '.join((t['student']['number'], t['ref'], str(t['finish_time']))) + '.json'
@@ -155,6 +154,7 @@ class App(object): @@ -155,6 +154,7 @@ class App(object):
155 test_id=t['ref']) for q in t['questions'] if 'grade' in q]) 154 test_id=t['ref']) for q in t['questions'] if 'grade' in q])
156 s.commit() 155 s.commit()
157 156
  157 + logger.info('Student {0}: finished test.'.format(uid))
158 return grade 158 return grade
159 159
160 # ----------------------------------------------------------------------- 160 # -----------------------------------------------------------------------
@@ -232,7 +232,7 @@ class Test(dict): @@ -232,7 +232,7 @@ class Test(dict):
232 total_points += q['points'] 232 total_points += q['points']
233 233
234 self['grade'] = round(20.0 * max(grade / total_points, 0.0), 1) 234 self['grade'] = round(20.0 * max(grade / total_points, 0.0), 1)
235 - logger.info('Student {}: finished with {} points.'.format(self['student']['number'], self['grade'])) 235 + logger.info('Student {}: correction gave {} points.'.format(self['student']['number'], self['grade']))
236 return self['grade'] 236 return self['grade']
237 237
238 # ----------------------------------------------------------------------- 238 # -----------------------------------------------------------------------