X-Git-Url: https://git.mdrn.pl/edumed.git/blobdiff_plain/2ef45eda8c195bc284bd57a29813a55d6870c3f4..f79922ccd12952eb9a115b2f2736e264ffbb535c:/wtem/management/commands/wtem_send_results.py diff --git a/wtem/management/commands/wtem_send_results.py b/wtem/management/commands/wtem_send_results.py index d2dc147..4f2de33 100644 --- a/wtem/management/commands/wtem_send_results.py +++ b/wtem/management/commands/wtem_send_results.py @@ -37,9 +37,13 @@ class Command(BaseCommand): action='store', dest='only_to', default=None, - help='Send emails only to listed addresses'), + help='Send email only to one address'), ) + def __init__(self): + super(Command, self).__init__() + self.sent = self.failed = None + def handle(self, *args, **options): translation.activate('pl') for target in ['to_teachers', 'to_students']: @@ -50,7 +54,7 @@ class Command(BaseCommand): def handle_to_students(self, *args, **options): self.stdout.write('>>> Sending results to students') - subject = 'Wyniki II etapu Wielkiego Turnieju Edukacji Medialnej' + subject = 'Wyniki I etapu Olimpiady Cyfrowej' for submission in get_submissions(): if options['only_to'] and submission.email != options['only_to']: @@ -67,8 +71,7 @@ class Command(BaseCommand): def handle_to_teachers(self, *args, **options): self.stdout.write('>>> Sending results to teachers') - subject = 'Wyniki II etapu Wielkiego Turnieju Edukacji Medialnej' - failed = sent = 0 + subject = 'Wyniki I etapu Olimpiady Cyfrowej' submissions_by_contact = dict()