diff --git a/rapids/forms.py b/rapids/forms.py index fc8f776b..aa43334d 100755 --- a/rapids/forms.py +++ b/rapids/forms.py @@ -117,9 +117,16 @@ class RapidForm(ModelForm): self.fields["laterality"] = ChoiceField( choices=Rapid.LATERALITY_CHOICES, required=False, widget=RadioSelect() ) + + user = self.request.user + if user.groups.filter(name="rapid_checker").exists(): + return Exam.objects.all() + + exam_queryset = Exam.objects.filter(author__id=user.id) + self.fields["exams"] = ModelMultipleChoiceField( required=False, - queryset=Exam.objects.all(), + queryset=exam_queryset, widget=FilteredSelectMultiple(verbose_name="Exams", is_stacked=False), ) diff --git a/rapids/templates/rapids/base.html b/rapids/templates/rapids/base.html index 5155fd0d..fc41dad0 100755 --- a/rapids/templates/rapids/base.html +++ b/rapids/templates/rapids/base.html @@ -19,7 +19,7 @@ Rapids: {% if request.user.is_authenticated %} Packets / Exams / -Create Exam +Create Exam / Questions / Create Question {% endif %} diff --git a/rapids/templates/rapids/rapid_form.html b/rapids/templates/rapids/rapid_form.html index 08500962..64c9835b 100755 --- a/rapids/templates/rapids/rapid_form.html +++ b/rapids/templates/rapids/rapid_form.html @@ -333,6 +333,7 @@ {% block content %}