fnp
/
edumed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Handle empty buckets when checking question of type "przyporzadkuj"
[edumed.git]
/
wtem
/
models.py
diff --git
a/wtem/models.py
b/wtem/models.py
index
e29b1bc
..
69affe4
100644
(file)
--- 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:
toret = 0
for bucket_id, items in answer.items():
for item_id in items:
- if int(item_id) == exercise['answer']
[bucket_id]
: # @@ We assume only one item per bucker for now...
+ if int(item_id) == exercise['answer']
.get(bucket_id, None)
: # @@ We assume only one item per bucker for now...
toret += exercise['points_per_hit']
return toret
if t == 'edumed_wybor':
toret += exercise['points_per_hit']
return toret
if t == 'edumed_wybor':