From 2b6d1077b4236616f1b6dd2c1c63f5e5b74a1ccc Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 21 Apr 2022 17:34:59 +0100 Subject: [PATCH] . --- atlas/templates/atlas/collection_headers.html | 2 +- atlas/urls.py | 3 ++- atlas/views.py | 8 ++++++-- generic/templates/generic/exam_cids_edit.html | 3 --- generic/views.py | 18 +++++++++++++----- 5 files changed, 22 insertions(+), 12 deletions(-) diff --git a/atlas/templates/atlas/collection_headers.html b/atlas/templates/atlas/collection_headers.html index b903314e..26349bba 100644 --- a/atlas/templates/atlas/collection_headers.html +++ b/atlas/templates/atlas/collection_headers.html @@ -3,7 +3,7 @@ Collection: {{collection.name}}-> Overview / Mark / Scores / - Candidates + Candidates
Edit \ Delete diff --git a/atlas/urls.py b/atlas/urls.py index 4a5b6045..93c43deb 100755 --- a/atlas/urls.py +++ b/atlas/urls.py @@ -19,7 +19,8 @@ urlpatterns = [ 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//candidates", views.collection_candidates, name="collection_candidates"), + path("collection//cids", views.GenericExamViews.exam_cids, name="exam_cids"), + path("collection//cids/edit", views.GenericExamViews.exam_cids_edit, name="exam_cids_edit"), path("collection//mark", views.collection_mark_overview, name="collection_mark_overview"), path("collection//mark/", views.collection_mark_question, name="collection_mark_question"), path("collection//scores", views.collection_scores_cid, name="collection_scores_cid"), diff --git a/atlas/views.py b/atlas/views.py index e05529e6..c7592801 100755 --- a/atlas/views.py +++ b/atlas/views.py @@ -1165,7 +1165,7 @@ def collection_mark_question(request, pk, case_number): @user_is_collection_author_or_atlas_editor -def collection_candidates(request, pk): +def exam_cids(request, pk): collection = get_object_or_404(CaseCollection, pk=pk) if ( @@ -1177,7 +1177,7 @@ def collection_candidates(request, pk): cid_user_count = cid_users.count() return render( request, - "atlas/collection_candidates.html", + "atlas/exam_cids.html", { "collection": collection, "cid_users": cid_users, @@ -1510,3 +1510,7 @@ def collection_scores_cid(request, pk): "plot": fig_html, }, ) + +GenericExamViews = ExamViews( + CaseCollection, Case, None, CidReportAnswer, "casecollection", "case", None +) \ No newline at end of file diff --git a/generic/templates/generic/exam_cids_edit.html b/generic/templates/generic/exam_cids_edit.html index e1bcea62..93c1547d 100644 --- a/generic/templates/generic/exam_cids_edit.html +++ b/generic/templates/generic/exam_cids_edit.html @@ -24,10 +24,7 @@