158 lines
5.2 KiB
Python
158 lines
5.2 KiB
Python
from django.urls import path, include
|
|
|
|
from anatomy.models import Structure
|
|
from . import views
|
|
from django.views.decorators.cache import cache_page
|
|
|
|
app_name = "anatomy"
|
|
|
|
urlpatterns = [
|
|
# path('', views.question_list, name='question_list'),
|
|
path("", views.AnatomyExamViews.index, name="index"),
|
|
path(
|
|
"question/",
|
|
views.AnatomyQuestionView.as_view(),
|
|
name="question_list",
|
|
),
|
|
path(
|
|
"question/<int:pk>/", views.GenericViews.question_detail, name="question_detail"
|
|
),
|
|
path(
|
|
"question/create/",
|
|
views.AnatomyQuestionCreate.as_view(),
|
|
name="anatomy_question_create",
|
|
),
|
|
path("create/exam/<int:pk>", views.AnatomyQuestionCreate.as_view(), name="anatomy_create_exam"),
|
|
path(
|
|
"question/<int:pk>/update",
|
|
views.AnatomyQuestionUpdate.as_view(),
|
|
name="anatomy_question_update",
|
|
),
|
|
path(
|
|
"question/<int:pk>/save_annotation",
|
|
views.question_save_annotation,
|
|
name="question_save_annotation",
|
|
),
|
|
path("question/<int:pk>/answer/", views.answer_question, name="answer_question"),
|
|
path(
|
|
"question/<int:pk>/clone", views.QuestionClone.as_view(), name="question_clone"
|
|
),
|
|
path(
|
|
"question/<int:pk>/delete",
|
|
views.QuestionDelete.as_view(),
|
|
name="question_delete",
|
|
),
|
|
path(
|
|
"exam/<int:pk>/review",
|
|
views.GenericViews.question_review,
|
|
name="question_review",
|
|
),
|
|
path("exam/<int:pk>/<int:sk>/mark", views.mark, name="mark"),
|
|
path(
|
|
"exam/<int:pk>/mark", views.AnatomyExamViews.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.AnatomyExamViews.exam_question_detail,
|
|
name="exam_question_detail",
|
|
),
|
|
path("exam/<int:pk>/", views.AnatomyExamViews.exam_overview, name="exam_overview"),
|
|
path(
|
|
"exam/<int:pk>/json_edit",
|
|
views.AnatomyExamViews.exam_json_edit,
|
|
name="exam_json_edit",
|
|
),
|
|
path(
|
|
"exam/<int:pk>/scores",
|
|
cache_page(60 * 1)(views.exam_scores_cid),
|
|
name="exam_scores_cid",
|
|
),
|
|
path(
|
|
"exam/<int:pk>/scores/<int:sk>/",
|
|
views.exam_scores_cid_user,
|
|
name="exam_scores_cid_user",
|
|
),
|
|
path(
|
|
"exam/<int:pk>/toggle_active",
|
|
views.AnatomyExamViews.exam_toggle_active,
|
|
name="exam_toggle_active",
|
|
),
|
|
path(
|
|
"exam/<int:pk>/toggle_results_published",
|
|
views.AnatomyExamViews.exam_toggle_results_published,
|
|
name="exam_toggle_results_published",
|
|
),
|
|
path(
|
|
"exam/submit",
|
|
views.AnatomyExamViews.postExamAnswers,
|
|
name="exam_answers_submit",
|
|
),
|
|
path("exam/", views.AnatomyExamViews.exam_list, name="exam_list"),
|
|
path("exam/all", views.AnatomyExamViews.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: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.AnatomyExamViews.active_exams, name="active_exams"),
|
|
path("exam/json/<int:pk>", views.AnatomyExamViews.exam_json, name="exam_json"),
|
|
path(
|
|
"exam/json/<int:pk>/unbased",
|
|
views.AnatomyExamViews.exam_json_unbased,
|
|
name="exam_json_unbased",
|
|
),
|
|
path(
|
|
"exam/json/<int:pk>/<int:sk>/unbased",
|
|
views.AnatomyExamViews.exam_question_json_unbased,
|
|
name="exam_question_json_unbased",
|
|
),
|
|
path(
|
|
"exam/json/<int:pk>/recreate",
|
|
views.AnatomyExamViews.exam_json_recreate,
|
|
name="exam_json_recreate",
|
|
),
|
|
# path("cid/", views.cid_selector, name="cid_selector"),
|
|
path("ajax/exam/flag/", views.flag_question, name="flag_question"),
|
|
path("body_part/create/", views.create_body_part, name="create_body_part"),
|
|
path(
|
|
"body_part/ajax/get_body_part_id",
|
|
views.get_body_part_id,
|
|
name="get_body_part_id",
|
|
),
|
|
path("structure/create/", views.create_structure, name="create_structure"),
|
|
path(
|
|
"structure/ajax/get_structure_id",
|
|
views.get_structure_id,
|
|
name="get_structure_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(
|
|
"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",
|
|
),
|
|
path(
|
|
"structure-autocomplete",
|
|
views.StructureAutocomplete.as_view(model=Structure, create_field='structure'),
|
|
name="structure-autocomplete",
|
|
),
|
|
]
|