116 lines
3.7 KiB
Python
116 lines
3.7 KiB
Python
from django.urls import path, include
|
|
|
|
from generic.urls import generic_exam_urls, generic_view_urls
|
|
|
|
from . import views
|
|
from django.views.decorators.cache import cache_page
|
|
|
|
app_name = "sbas"
|
|
|
|
urlpatterns = [
|
|
path("question/", views.QuestionView.as_view(), name="question_view"),
|
|
#path("question/<int:pk>/", views.question_detail, name="question_detail"),
|
|
path("question/create/", views.QuestionCreate.as_view(), name="question_create"),
|
|
path(
|
|
"question/<int:pk>/update",
|
|
views.QuestionUpdate.as_view(),
|
|
name="question_update",
|
|
),
|
|
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>/<int:sk>/<str:cid>/<str:passcode>/take",
|
|
views.exam_take,
|
|
name="exam_take",
|
|
),
|
|
path(
|
|
"exam/<int:pk>/<int:sk>/take",
|
|
views.exam_take,
|
|
name="exam_take_user",
|
|
),
|
|
path("exam/<int:pk>/start", views.exam_start, name="exam_start"),
|
|
path(
|
|
"exam/<int:pk>/<str:cid>/<str:passcode>/finish",
|
|
views.exam_take_overview,
|
|
name="exam_take_overview",
|
|
),
|
|
path(
|
|
"exam/<int:pk>/finish",
|
|
views.exam_take_overview,
|
|
name="exam_take_overview_user",
|
|
),
|
|
path(
|
|
"exam/<int:pk>/<str:cid>/<str:passcode>/complete",
|
|
views.exam_complete,
|
|
name="exam_complete",
|
|
),
|
|
path(
|
|
"exam/<int:pk>/complete",
|
|
views.exam_complete,
|
|
name="exam_complete_user",
|
|
),
|
|
|
|
path("exam/<int:pk>/markers", views.ExamMarkersUpdate.as_view(), name="exam_markers"),
|
|
path("exam/<int:pk>/groups", views.ExamGroupsUpdate.as_view(), name="exam_groups_edit"),
|
|
path(
|
|
"exam/<int:pk>/authors", views.ExamAuthorUpdate.as_view(), name="exam_authors"
|
|
),
|
|
path("exam/<int:exam_id>/clone", views.ExamClone.as_view(), name="exam_clone"),
|
|
path("exam/<int:exam_id>/clone2", views.exam_clone2, name="exam_clone2"),
|
|
path("exam/available", views.active_exams, name="active_exams"),
|
|
path("exam/create", views.ExamCreate.as_view(), name="exam_create"),
|
|
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/<int:pk>", views.exam_json, name="exam_json"),
|
|
# path("exam/json/<int:pk>/recreate", views.exam_json_recreate, name="exam_json_recreate"),
|
|
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(
|
|
"llm_prompts/",
|
|
views.llm_prompt_view,
|
|
name="llm_prompt_view",
|
|
|
|
)
|
|
,
|
|
path(
|
|
"import_llm_questions/",
|
|
views.import_llm_questions,
|
|
name="import_llm_questions",
|
|
),
|
|
path(
|
|
"import_llm_confirm/",
|
|
views.import_llm_confirm,
|
|
name="import_llm_confirm",
|
|
),
|
|
#path(
|
|
# "exam/<int:pk>/scores/<int:cid>/<str:passcode>/",
|
|
# views.exam_scores_cid_user,
|
|
# name="exam_scores_cid_user",
|
|
#),
|
|
#path(
|
|
# "exam/<int:pk>/scores/",
|
|
# views.exam_scores_cid_user,
|
|
# name="exam_scores_user",
|
|
#),
|
|
]
|
|
|
|
urlpatterns.extend(generic_view_urls(views.GenericViews))
|
|
urlpatterns.extend(generic_exam_urls(views.GenericExamViews))
|