diff --git a/generic/forms.py b/generic/forms.py index b3e34f0a..2ce58f88 100755 --- a/generic/forms.py +++ b/generic/forms.py @@ -63,12 +63,13 @@ class ExamFormMixin: def __init__(self, *args, user, **kwargs) -> None: super(ModelForm, self).__init__(*args, **kwargs) - if user.is_superuser or user.groups.filter(name="cid_manager").exists(): + if user.is_superuser or user.groups.filter(name="cid_user_manager").exists(): cid_user_group_queryset = CidUserGroup.objects.all() - user_user_group_queryset = UserUserGroup.objects.all() else: cid_user_group_queryset = CidUserGroup.objects.none() - user_user_group_queryset = UserUserGroup.objects.none() + + user_user_group_queryset = UserUserGroup.objects.all() + self.fields["cid_user_groups"] = ModelMultipleChoiceField( required=False, queryset=cid_user_group_queryset, diff --git a/generic/templates/generic/exam_scores_base.html b/generic/templates/generic/exam_scores_base.html index cfdbb1a5..a912d1c4 100644 --- a/generic/templates/generic/exam_scores_base.html +++ b/generic/templates/generic/exam_scores_base.html @@ -7,21 +7,26 @@ User answer scores are cached, if you update or change an answer you will need to refresh the scores. {% endif %} - {% if missing_cids %} - - {% endif %} - {% if missing_users %} - + {% if missing_cids or missing_users %} +
+ This exam has candidates / users with unsubmitted results + {% if missing_cids %} + + {% endif %} + {% if missing_users %} + + {% endif %} +
{% endif %} {% if unmarked %}