feat: add new endpoints for fetching active exams by type and cid; enhance exam handling in views

This commit is contained in:
Ross
2026-07-04 22:40:48 +01:00
parent 856fb0bf08
commit d8bacfefa9
7 changed files with 73 additions and 20 deletions
+12
View File
@@ -137,6 +137,18 @@ urlpatterns = [
name="active_exams_cid_unbased",
),
path("exam/json/unbased", views.active_exams_unbased, name="active_exams_unbased"),
path("exam/json/<str:exam_type>/", views.active_exams_by_type, name="active_exams_by_type"),
path(
"exam/json/<str:exam_type>/<int:cid>/<str:passcode>",
views.active_exams_by_type,
name="active_exams_by_type_cid",
),
path(
"exam/json/<str:exam_type>/unbased/<int:cid>/<str:passcode>",
views.active_exams_by_type_unbased,
name="active_exams_by_type_cid_unbased",
),
path("exam/json/<str:exam_type>/unbased", views.active_exams_by_type_unbased, name="active_exams_by_type_unbased"),
path("exam/submit", views.exam_submit, name="global_exam_answers_submit"),
# path('', include('generic.urls')),
path(