allow ordering of case collections
This commit is contained in:
@@ -9,15 +9,20 @@
|
||||
Self review: {{collection.self_review}}<br />
|
||||
</div>
|
||||
<h3>Cases</h3>
|
||||
<ul>
|
||||
<ol id="full-question-list" class="sortable">
|
||||
{% for case in cases %}
|
||||
<li><a href="{% url 'atlas:collection_case_view' pk=collection.pk case_number=forloop.counter0 %}">Case {{forloop.counter}}</a>
|
||||
<li data-question_pk={{case.pk}}><a href="{% url 'atlas:collection_case_view' pk=collection.pk case_number=forloop.counter0 %}">Case {{forloop.counter}}</a>
|
||||
: {{case.title}}
|
||||
</li>
|
||||
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</ol>
|
||||
|
||||
<p>This collection will be available to view/take <a href='{{collection.get_take_url}}'>here</a>
|
||||
|
||||
{% if can_edit %}
|
||||
|
||||
<p><button id='button-edit-order' title='click and drag questions to change order' data-posturl="{% url 'atlas:exam_json_edit' pk=collection.pk %}">Edit case order / Delete cases</button></p>
|
||||
{% endif %}
|
||||
{% include 'exam_overview_js.html' %}
|
||||
{% endblock %}
|
||||
|
||||
+1
-1
@@ -1097,7 +1097,7 @@ def collection_detail(request, pk):
|
||||
return render(
|
||||
request,
|
||||
"atlas/collection_detail.html",
|
||||
{"collection": collection, "cases": cases},
|
||||
{"collection": collection, "cases": cases, "can_edit": True},
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user