178 lines
6.5 KiB
Python
Executable File
178 lines
6.5 KiB
Python
Executable File
from django.urls import path, include
|
|
from . import views
|
|
|
|
from django.views.decorators.cache import cache_page, cache_control
|
|
|
|
|
|
app_name = "rapids"
|
|
|
|
urlpatterns = [
|
|
# path('', views.question_list, name='question_list'),
|
|
path("", views.GenericExamViews.index, name="index"),
|
|
path("author/<int:pk>/", views.GenericViews.author_detail, name="author_detail"),
|
|
path("author/", views.GenericViews.author_list, name="author_list"),
|
|
path("question_viewer", views.question_viewer, name="question_viewer"),
|
|
path("question/", views.RapidView.as_view(), name="rapid_view"),
|
|
path("question/hash", views.get_question_by_hash, name="rapid_question_by_hash"),
|
|
# path("unchecked/", views.unchecked_list, name="unchecked_list"),
|
|
# path("verified/<int:pk>/", views.verified_detail, name="verified_detail"),
|
|
path(
|
|
"question/<int:pk>/", views.GenericViews.question_detail, name="question_detail"
|
|
),
|
|
path("question/<int:pk>/json", views.question_json, name="question_json"),
|
|
path(
|
|
"question/<int:pk>/json/unbased",
|
|
views.question_json_unbased,
|
|
name="question_json_unbased",
|
|
),
|
|
path(
|
|
"question/<int:pk>/save_annotation",
|
|
views.question_save_annotation,
|
|
name="question_save_annotation",
|
|
),
|
|
path("question/<int:pk>/split", views.rapid_split, name="rapid_split"),
|
|
path("question/<int:pk>/clone", views.RapidClone.as_view(), name="rapid_clone"),
|
|
# path("verified/", views.verified, name="verified"),
|
|
# path("all_questions/", views.all_questions, name="all_questions"),
|
|
path("question/<int:pk>/scrap", views.rapid_scrap, name="rapid_scrap"),
|
|
path(
|
|
"question/<int:pk>/delete",
|
|
views.QuestionDelete.as_view(),
|
|
name="question_delete",
|
|
),
|
|
path(
|
|
"question/<int:pk>/user_answers",
|
|
views.GenericViews.question_user_answers,
|
|
name="question_user_answers",
|
|
),
|
|
path(
|
|
"question/<int:pk>/anon",
|
|
views.question_anonymise_dicom,
|
|
name="question_anonymise_dicom",
|
|
),
|
|
path(
|
|
"exam/<int:pk>/review",
|
|
views.GenericViews.question_review,
|
|
name="question_review",
|
|
),
|
|
path("exam/<int:exam_pk>/<int:sk>/mark", views.mark, name="mark"),
|
|
path("exam/<int:exam_pk>/<int:sk>/mark/all", views.mark_all, name="mark_all"),
|
|
path(
|
|
"exam/<int:exam_pk>/<int:sk>/mark/review", views.mark_review, name="mark_review"
|
|
),
|
|
path(
|
|
"exam/<int:pk>/mark", views.GenericExamViews.mark_overview, name="mark_overview"
|
|
),
|
|
# path("exam/<int:pk>/<int:sk>/", views.exam_take, name="exam_take"),
|
|
path(
|
|
"exam/<int:pk>/question/<int:sk>/",
|
|
views.GenericExamViews.exam_question_detail,
|
|
name="exam_question_detail",
|
|
),
|
|
path("exam/<int:pk>/", views.GenericExamViews.exam_overview, name="exam_overview"),
|
|
path(
|
|
"exam/<int:pk>/json_edit",
|
|
views.GenericExamViews.exam_json_edit,
|
|
name="exam_json_edit",
|
|
),
|
|
path(
|
|
"exam/<int:pk>/scores",
|
|
views.GenericExamViews.exam_scores_cid,
|
|
name="exam_scores_cid",
|
|
),
|
|
path(
|
|
"exam/<int:pk>/scores/refresh",
|
|
views.GenericExamViews.exam_scores_refresh,
|
|
# cache_page(60 * 1)(views.exam_scores_cid),
|
|
name="exam_scores_refresh",
|
|
),
|
|
path(
|
|
"exam/<int:pk>/scores/<int:cid>/<str:passcode>/",
|
|
views.exam_scores_cid_user,
|
|
name="exam_scores_cid_user",
|
|
),
|
|
path(
|
|
"exam/<int:pk>/toggle_active",
|
|
views.GenericExamViews.exam_toggle_active,
|
|
name="exam_toggle_active",
|
|
),
|
|
path(
|
|
"exam/<int:pk>/toggle_results_published",
|
|
views.GenericExamViews.exam_toggle_results_published,
|
|
name="exam_toggle_results_published",
|
|
),
|
|
path(
|
|
"exam/submit",
|
|
views.GenericExamViews.postExamAnswers,
|
|
name="exam_answers_submit",
|
|
),
|
|
path("exam/", views.GenericExamViews.exam_list, name="exam_list"),
|
|
path("exam/all", views.GenericExamViews.exam_list_all, name="exam_list_all"),
|
|
path("exam/create", views.ExamCreate.as_view(), name="exam_create"),
|
|
path("exam/<int:exam_id>/clone", views.ExamClone.as_view(), name="exam_clone"),
|
|
path("exam/<int:exam_id>/cids", views.GenericExamViews.exam_cids, name="exam_cids"),
|
|
path("exam/<int:pk>/update", views.ExamUpdate.as_view(), name="exam_update"),
|
|
path("exam/<int:pk>/delete", views.ExamDelete.as_view(), name="exam_delete"),
|
|
path("exam/json/", views.GenericExamViews.active_exams, name="active_exams"),
|
|
path("exam/json/<int:pk>", views.GenericExamViews.exam_json, name="exam_json"),
|
|
path(
|
|
"exam/json/<int:pk>/unbased",
|
|
views.GenericExamViews.exam_json_unbased,
|
|
name="exam_json_unbased",
|
|
),
|
|
path(
|
|
"exam/json/<int:pk>/<int:sk>/unbased",
|
|
views.GenericExamViews.exam_question_json_unbased,
|
|
name="exam_question_json_unbased",
|
|
),
|
|
path(
|
|
"exam/json/<int:pk>/recreate",
|
|
views.GenericExamViews.exam_json_recreate,
|
|
name="exam_json_recreate",
|
|
),
|
|
path("create/", views.RapidCreate.as_view(), name="rapid_create"),
|
|
path("create/exam/<int:pk>", views.RapidCreate.as_view(), name="rapid_create_exam"),
|
|
path(
|
|
"create/defaults",
|
|
views.RapidCreationDefaultView.as_view(),
|
|
name="rapid_create_defaults",
|
|
),
|
|
path("region/create/", views.create_region, name="create_region"),
|
|
path("region/ajax/get_region_id", views.get_region_id, name="get_region_id"),
|
|
path("abnormality/create/", views.create_abnormality, name="create_abnormality"),
|
|
path(
|
|
"abnormality/ajax/get_abnormality_id",
|
|
views.get_abnormality_id,
|
|
name="get_abnormality_id",
|
|
),
|
|
path("examination/create/", views.create_examination, name="create_examination"),
|
|
path(
|
|
"examination/ajax/get_examination_id",
|
|
views.get_examination_id,
|
|
name="get_examination_id",
|
|
),
|
|
path(
|
|
"question/<int:pk>/update",
|
|
views.RapidUpdate.as_view(),
|
|
name="rapid_update",
|
|
),
|
|
path(
|
|
"user_answers/",
|
|
views.UserAnswerTableView.as_view(),
|
|
name="user_answer_table_view",
|
|
),
|
|
path(
|
|
"user_answers/<int:pk>", views.UserAnswerView.as_view(), name="user_answer_view"
|
|
),
|
|
path(
|
|
"user_answers/<int:pk>/delete",
|
|
views.UserAnswerDelete.as_view(),
|
|
name="user_answer_delete",
|
|
),
|
|
path(
|
|
"user_answers/delete",
|
|
views.GenericViews.user_answer_delete_multiple,
|
|
name="user_answer_delete_multiple",
|
|
),
|
|
]
|