From 97cfe21a67fcf45235d48bbf68b85a6d0b720204 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Wed, 13 Nov 2013 16:30:57 +0100 Subject: [PATCH] Allow defining multiple items in a bucket as an answer to a question of type "przyporzadkuj" --- wtem/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wtem/models.py b/wtem/models.py index 69affe4..4038485 100644 --- a/wtem/models.py +++ b/wtem/models.py @@ -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': -- 2.20.1