improve exam collections
This commit is contained in:
@@ -771,6 +771,11 @@ class ExamCollectionForm(ModelForm):
|
|||||||
widget=FilteredSelectMultiple(verbose_name=name, is_stacked=False),
|
widget=FilteredSelectMultiple(verbose_name=name, is_stacked=False),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.fields["author"] = ModelMultipleChoiceField(
|
||||||
|
queryset=User.objects.all(),
|
||||||
|
widget=FilteredSelectMultiple(verbose_name="Authors", is_stacked=False), required=False,
|
||||||
|
)
|
||||||
|
|
||||||
def save(self, commit=True):
|
def save(self, commit=True):
|
||||||
# Get the unsaved Long instance
|
# Get the unsaved Long instance
|
||||||
instance = ModelForm.save(self, False)
|
instance = ModelForm.save(self, False)
|
||||||
|
|||||||
@@ -10,7 +10,9 @@
|
|||||||
<a href="{% url 'generic:examcollection_delete' object.pk %}">Delete</a>
|
<a href="{% url 'generic:examcollection_delete' object.pk %}">Delete</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
This collection contains the following exams
|
<div>Authors: {{ object.get_authors }}</div>
|
||||||
|
|
||||||
|
<p>This collection contains the following exams<p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,13 @@
|
|||||||
{% for exam in exams %}
|
{% for exam in exams %}
|
||||||
{% if not exam.active %}
|
{% if not exam.active %}
|
||||||
<li class="exam-item">
|
<li class="exam-item">
|
||||||
<a href="{% url app_name|add:':exam_overview' pk=exam.pk %}" class="flex-col-2 exam-name">{{exam}}</a>
|
<span class="flex-col-2">
|
||||||
|
<a href="{% url app_name|add:':exam_overview' pk=exam.pk %}" class="exam-name">{{exam}}</a>
|
||||||
|
{% if exam.examcollection %}
|
||||||
|
<a href='{% url "generic:examcollection_detail" exam.examcollection_id %}' title="Collection"><i class="bi bi-collection"></i></a>
|
||||||
|
{% endif %}
|
||||||
|
</span>
|
||||||
|
|
||||||
{% if marking %}<a href="{% url app_name|add:':mark_overview' pk=exam.pk %}" class="flex-col-half" title="Click to mark exam">Mark</a>{% endif %}
|
{% if marking %}<a href="{% url app_name|add:':mark_overview' pk=exam.pk %}" class="flex-col-half" title="Click to mark exam">Mark</a>{% endif %}
|
||||||
<span class="flex-col">
|
<span class="flex-col">
|
||||||
<a href="{% url app_name|add:':exam_cids' exam_id=exam.pk %}" title="Click to manage candidates">Candidates</a>
|
<a href="{% url app_name|add:':exam_cids' exam_id=exam.pk %}" title="Click to manage candidates">Candidates</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user