Allow defining multiple items in a bucket as an answer to a question of type "przypor...
[edumed.git] / wtem / models.py
index 69affe4..4038485 100644 (file)
@@ -97,7 +97,7 @@ class Submission(models.Model):
                 toret = 0
                 for bucket_id, items in answer.items():
                     for item_id in items:
-                        if int(item_id) == exercise['answer'].get(bucket_id, None): # @@ We assume only one item per bucker for now...
+                        if int(item_id) in exercise['answer'].get(bucket_id, []):
                             toret += exercise['points_per_hit']
                 return toret
             if t == 'edumed_wybor':