fnp
/
edumed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
serve media on debug
[edumed.git]
/
stage2
/
management
/
commands
/
stage2_mark_complete.py
diff --git
a/stage2/management/commands/stage2_mark_complete.py
b/stage2/management/commands/stage2_mark_complete.py
index
0f239b7
..
3720afb
100644
(file)
--- a/
stage2/management/commands/stage2_mark_complete.py
+++ b/
stage2/management/commands/stage2_mark_complete.py
@@
-9,6
+9,7
@@
class Command(BaseCommand):
def handle(self, **options):
assignment_count = Assignment.objects.count()
for participant in Participant.objects.all():
def handle(self, **options):
assignment_count = Assignment.objects.count()
for participant in Participant.objects.all():
- if participant.answer_set.count() == assignment_count:
+ answers = participant.answer_set.all()
+ if len(answers) == assignment_count and all(answer.is_complete() for answer in answers):
participant.complete_set = True
participant.save()
participant.complete_set = True
participant.save()