From c167650ab4b795d9931c3b6081e4b5f3bf1a8b46 Mon Sep 17 00:00:00 2001 From: Ross Date: Sat, 2 Apr 2022 22:52:36 +0100 Subject: [PATCH] . --- atlas/templates/atlas/collection_detail.html | 60 ++++---------------- atlas/templates/atlas/collection_take.html | 53 +++++++++++++++++ atlas/urls.py | 1 + atlas/views.py | 7 +++ 4 files changed, 73 insertions(+), 48 deletions(-) create mode 100644 atlas/templates/atlas/collection_take.html diff --git a/atlas/templates/atlas/collection_detail.html b/atlas/templates/atlas/collection_detail.html index caa7b552..a13bbd3c 100644 --- a/atlas/templates/atlas/collection_detail.html +++ b/atlas/templates/atlas/collection_detail.html @@ -7,61 +7,25 @@ Delete {% endif %} + + Edit + \ Delete + \ Clone +{% endif %} +{% if request.user.is_superuser %} + \ Admin Edit +{% endif %} +

{{collection.name}} + +{% include 'exam_notes.html' %} -{% if collection.collection_type == "REP" %} -

Start: {{exam.name}}

- - Enter your CID and passcode in the below boxes.
-

-

- - - - -{% endif %} {% endblock %} \ No newline at end of file diff --git a/atlas/templates/atlas/collection_take.html b/atlas/templates/atlas/collection_take.html new file mode 100644 index 00000000..922f6c0d --- /dev/null +++ b/atlas/templates/atlas/collection_take.html @@ -0,0 +1,53 @@ +{% extends 'atlas/base.html' %} + +{% block content %} +

{{collection.name}} + +{% if collection.collection_type == "REP" %} +

Start: {{exam.name}}

+ + Enter your CID and passcode in the below boxes.
+

+

+ + + + +{% endif %} + +{% endblock %} \ No newline at end of file diff --git a/atlas/urls.py b/atlas/urls.py index da7ea781..25136b76 100755 --- a/atlas/urls.py +++ b/atlas/urls.py @@ -18,6 +18,7 @@ urlpatterns = [ path("collection//delete", views.CaseCollectionDelete.as_view(), name="collection_delete"), path("collection//update", views.CaseCollectionUpdate.as_view(), name="collection_update"), path("collection/", views.collection_detail, name="collection_detail"), + path("collection//take", views.collection_take, name="collection_take"), path("collection//take//", views.collection_take_overview, name="collection_take_overview"), path("collection//", views.collection_case_view, name="collection_case_view"), path("collection///take//", views.collection_case_view_take, name="collection_case_view_take"), diff --git a/atlas/views.py b/atlas/views.py index 3c85985b..352d3512 100755 --- a/atlas/views.py +++ b/atlas/views.py @@ -1064,6 +1064,13 @@ def collection_detail(request, pk): request, "atlas/collection_detail.html", {"collection": collection} ) +def collection_take(request, pk): + collection = get_object_or_404(CaseCollection, pk=pk) + + return render( + request, "atlas/collection_take.html", {"collection": collection} + ) + def collection_take_overview(request, pk, cid, passcode): collection = get_object_or_404(CaseCollection, pk=pk)