From: Jan Szejko <janek37@gmail.com> Date: Wed, 22 Nov 2017 12:07:30 +0000 (+0100) Subject: minor fixes X-Git-Url: https://git.mdrn.pl/edumed.git/commitdiff_plain/a51aa3ca37185a57c1fee1154e6f8a53d8a0bafb?ds=sidebyside;hp=000e4c425eb0f65533002e29e5b1b6ae1e60a77f minor fixes --- diff --git a/wtem/management/commands/wtem_generate_keys.py b/wtem/management/commands/wtem_generate_keys.py index 1496c7b..06ea89f 100644 --- a/wtem/management/commands/wtem_generate_keys.py +++ b/wtem/management/commands/wtem_generate_keys.py @@ -10,7 +10,8 @@ class Command(BaseCommand): new = 0 skipped = 0 - for confirmation in Confirmation.objects.all(): + emails = list(Submission.objects.values_list('email', flat=True)) + for confirmation in Confirmation.objects.exclude(email__in=emails): if not Submission.objects.filter(email=confirmation.email).exists(): args = {} for attr in ['first_name', 'last_name', 'email', 'contact']: diff --git a/wtem/templates/wtem/exercises/edumed_wybor.html b/wtem/templates/wtem/exercises/edumed_wybor.html index 2d021f0..a41e177 100644 --- a/wtem/templates/wtem/exercises/edumed_wybor.html +++ b/wtem/templates/wtem/exercises/edumed_wybor.html @@ -21,7 +21,7 @@ {% for option in exercise.options %} <li class="question-piece" data-name="{{option.id}}"> <input type="checkbox" name="e{{no}}_{{option.id}}" id="e{{no}}_{{option.id}}"{% if option.id|stringformat:"s" in exercise.saved_answer.closed_part %} checked="checked"{% endif %}> - <label for="e{{no}}_{{option.id}}">{{option.text|safe}}</label> + <label for="e{{no}}_{{option.id}}">{# if option.id in exercise.answer %}<strong>{% endif #}{{option.text|safe}}{# if option.id in exercise.answer %}</strong>{% endif #}</label> </li> {% endfor %} </ol>