switch to generic exam urls
This commit is contained in:
+4
-95
@@ -1,6 +1,7 @@
|
||||
from django.urls import path, include
|
||||
|
||||
from anatomy.models import Structure
|
||||
from generic.urls import generic_exam_urls, generic_view_urls
|
||||
from . import views
|
||||
from django.views.decorators.cache import cache_page
|
||||
|
||||
@@ -8,15 +9,11 @@ app_name = "anatomy"
|
||||
|
||||
urlpatterns = [
|
||||
# path('', views.question_list, name='question_list'),
|
||||
path("", views.GenericExamViews.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(),
|
||||
@@ -46,102 +43,16 @@ urlpatterns = [
|
||||
views.QuestionDelete.as_view(),
|
||||
name="question_delete",
|
||||
),
|
||||
path(
|
||||
"question/<int:pk>/user_answers",
|
||||
views.GenericViews.question_user_answers,
|
||||
name="question_user_answers",
|
||||
),
|
||||
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:exam_id>/report/email", views.GenericExamViews.exam_report_email, name="exam_report_email"),
|
||||
path("exam/<int:exam_id>/report/email_unsent", views.GenericExamViews.exam_report_email_unsent, name="exam_report_email_unsent"),
|
||||
path("exam/<int:exam_id>/report/email/status", views.GenericExamViews.exam_report_email_status, name="exam_report_email_status"),
|
||||
path("exam/<int:exam_id>/report/<int:user_id>", views.GenericExamViews.exam_user_report, name="exam_user_report"),
|
||||
path("exam/<int:exam_id>/report/<int:user_id>/email", views.GenericExamViews.exam_user_report_email, name="exam_user_report_email"),
|
||||
path("exam/<int:pk>/authors", views.ExamAuthorUpdate.as_view(), name="exam_authors"),
|
||||
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,
|
||||
# cache_page(60 * 1)(views.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:exam_id>/cids/edit", views.GenericExamViews.exam_cids_edit, name="exam_cids_edit"),
|
||||
path("exam/<int:exam_id>/users/edit", views.GenericExamViews.exam_users_edit, name="exam_users_edit"),
|
||||
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("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",
|
||||
@@ -173,14 +84,12 @@ urlpatterns = [
|
||||
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",
|
||||
),
|
||||
]
|
||||
|
||||
urlpatterns.extend(generic_view_urls(views.GenericViews))
|
||||
urlpatterns.extend(generic_exam_urls(views.GenericExamViews))
|
||||
Reference in New Issue
Block a user