more bootstrap nav convresion
This commit is contained in:
@@ -5,17 +5,40 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block navigation %}
|
||||
Anatomy:
|
||||
{% if request.user.is_authenticated %}
|
||||
<a href="{% url 'anatomy:index' %}">Packets</a> /
|
||||
<a href="{% url 'anatomy:exam_list' %}">Exams</a> /
|
||||
<a href="{% url 'anatomy:exam_create' %}" title="Create a new exam">Create Exam</a> /
|
||||
<a href="{% url 'anatomy:question_list' %}">Questions</a> /
|
||||
<a href="{% url 'anatomy:anatomy_question_create' %}" title="Create a new question">Create Question</a>
|
||||
{% if request.user.is_superuser %}
|
||||
/ <a href="{% url 'anatomy:user_answer_table_view' %}" title="User answers">Answers</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<nav class="navbar navbar-expand-lg navbar-dark submenu">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="{% url 'anatomy:index' %}">Anatomy</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse">
|
||||
<ul class="navbar-nav">
|
||||
{% if request.user.is_authenticated %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'anatomy:exam_list' %}"><i class="bi bi-mortarboard"></i> Exams</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'anatomy:question_view' %}"><i class="bi bi-question-circle"></i> Questions</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false"><i class="bi bi-file-earmark-plus"></i> Create</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="{% url 'anatomy:exam_create' %}" title="Create a new exam"><i class="bi bi-mortarboard"></i> Exam</a></li>
|
||||
<li><a class="dropdown-item" href="{% url 'anatomy:question_create' %}" title="Create a new question"><i class="bi bi-question-circle"></i> Question</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
{% if request.user.is_superuser %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'anatomy:user_answer_table_view' %}" title="User answers">Answers</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
{% if simple_content %}
|
||||
|
||||
+3
-8
@@ -7,21 +7,16 @@ from django.views.decorators.cache import cache_page
|
||||
app_name = "anatomy"
|
||||
|
||||
urlpatterns = [
|
||||
# path('', views.question_list, name='question_list'),
|
||||
# path('', views.question_view, name='question_view'),
|
||||
path(
|
||||
"question/",
|
||||
views.AnatomyQuestionView.as_view(),
|
||||
name="question_list",
|
||||
name="question_view",
|
||||
),
|
||||
path(
|
||||
"question/create/",
|
||||
views.AnatomyQuestionCreate.as_view(),
|
||||
name="anatomy_question_create",
|
||||
),
|
||||
path(
|
||||
"create/exam/<int:pk>",
|
||||
views.AnatomyQuestionCreate.as_view(),
|
||||
name="anatomy_create_exam",
|
||||
name="question_create",
|
||||
),
|
||||
path(
|
||||
"question/<int:pk>/update",
|
||||
|
||||
+3
-3
@@ -109,14 +109,14 @@ def user_is_admin(user):
|
||||
return False
|
||||
|
||||
|
||||
def question_list(request):
|
||||
def question_view(request):
|
||||
questions = AnatomyQuestion.objects.all()
|
||||
|
||||
if not request.user.groups.filter(name="anatomy_checker").exists():
|
||||
questions = questions.filter(open_access=False)
|
||||
# raise PermissionDenied()
|
||||
|
||||
return render(request, "anatomy/question_list.html", {"questions": questions})
|
||||
return render(request, "anatomy/question_view.html", {"questions": questions})
|
||||
|
||||
|
||||
@login_required
|
||||
@@ -794,7 +794,7 @@ class UserAnswerDelete(SuperuserRequiredMixin, DeleteView):
|
||||
|
||||
class QuestionDelete(AuthorOrCheckerRequiredMixin, DeleteView):
|
||||
model = AnatomyQuestion
|
||||
success_url = reverse_lazy("anatomy:question_list")
|
||||
success_url = reverse_lazy("anatomy:question_view")
|
||||
|
||||
|
||||
class ExamCreate(ExamCreateBase):
|
||||
|
||||
@@ -8,7 +8,6 @@ from generic.views import ExamViews as GenericExamViews, GenericViewBase
|
||||
app_name = "generic"
|
||||
|
||||
urlpatterns = [
|
||||
# path('', views.question_list, name='question_list'),
|
||||
path("examination/", views.ExaminationView.as_view(), name="examination_view"),
|
||||
path("examination/<int:pk>", views.examination_detail, name="examination_detail"),
|
||||
path(
|
||||
|
||||
+1
-1
@@ -417,7 +417,7 @@ class LongCreationDefault(models.Model):
|
||||
# help_text="Default site to use when creating a new long")
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse("longs:long_create")
|
||||
return reverse("longs:question_create")
|
||||
|
||||
class ExamQuestionDetail(models.Model):
|
||||
sort_order = models.IntegerField(default=1000)
|
||||
|
||||
@@ -1,33 +1,66 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}
|
||||
Longs
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
{% block navigation %}
|
||||
Longs:
|
||||
{% if request.user.is_authenticated %}
|
||||
<a href="{% url 'longs:exam_list' %}">Exams</a> /
|
||||
<a href="{% url 'longs:exam_create' %}" title="Create a new exam">Create Exam</a> /
|
||||
<a href="{% url 'longs:long_view' %}">Cases</a> /
|
||||
<a href="{% url 'longs:long_series_view' %}">Series</a> /
|
||||
<a href="{% url 'longs:long_create' %}" title="Create a new long case">Create Case</a> /
|
||||
<a href="{% url 'longs:long_series_create' %}" title="Create a new image series">Create Series</a>
|
||||
{% endif %}
|
||||
{% if request.user.is_superuser %}
|
||||
/ <a href="{% url 'longs:user_answer_table_view' %}" title="User answers">Answers</a>
|
||||
{% endif %}
|
||||
{% comment %} </br>
|
||||
Questions by:
|
||||
<span id="authors-link"><a href="{% url 'longs:author_list' %}">author</a></span> {% endcomment %}
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}
|
||||
Longs
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
{% block navigation %}
|
||||
<nav class="navbar navbar-expand-lg navbar-dark submenu">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="{% url 'longs:index' %}">Longs</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse">
|
||||
<ul class="navbar-nav">
|
||||
{% if request.user.is_authenticated %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'longs:exam_list' %}"><i class="bi bi-mortarboard"></i> Exams</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'longs:question_view' %}"><i class="bi bi-question-circle"></i> Questions</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false"><i class="bi bi-file-earmark-plus"></i> Create</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="{% url 'longs:exam_create' %}" title="Create a new exam"><i class="bi bi-mortarboard"></i> Exam</a></li>
|
||||
<li><a class="dropdown-item" href="{% url 'longs:question_create' %}" title="Create a new question"><i class="bi bi-question-circle"></i> Question</a></li>
|
||||
<li><a class="dropdown-item" href="{% url 'longs:series_create' %}" title="Create a new image series">Create Series</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
{% if request.user.is_superuser %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'longs:user_answer_table_view' %}" title="User answers">Answers</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
Longs:
|
||||
{% if request.user.is_authenticated %}
|
||||
<a href="{% url 'longs:exam_list' %}">Exams</a> /
|
||||
<a href="{% url 'longs:exam_create' %}" title="Create a new exam">Create Exam</a> /
|
||||
<a href="{% url 'longs:question_view' %}">Cases</a> /
|
||||
<a href="{% url 'longs:series_view' %}">Series</a> /
|
||||
<a href="{% url 'longs:question_create' %}" title="Create a new long case">Create Case</a> /
|
||||
{% endif %}
|
||||
{% if request.user.is_superuser %}
|
||||
/ <a href="{% url 'longs:user_answer_table_view' %}" title="User answers">Answers</a>
|
||||
{% endif %}
|
||||
{% comment %} </br>
|
||||
Questions by:
|
||||
<span id="authors-link"><a href="{% url 'longs:author_list' %}">author</a></span> {% endcomment %}
|
||||
{% endblock %}
|
||||
@@ -318,7 +318,6 @@
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<h2>Series Form</h2>
|
||||
<!-- <a href="{% url 'longs:long_create_defaults' %}">Edit defaults</a> -->
|
||||
This form will create a image set that can be associated with a long question. If the question has already been created it can be linked below.
|
||||
<form action="" method="post" enctype="multipart/form-data" id="long-form">
|
||||
{% csrf_token %}
|
||||
|
||||
+4
-10
@@ -6,11 +6,10 @@ from . import views
|
||||
app_name = "longs"
|
||||
|
||||
urlpatterns = [
|
||||
# path('', views.question_list, name='question_list'),
|
||||
path("author/<int:pk>/", views.author_detail, name="author_detail"),
|
||||
path("author/", views.author_list, name="author_list"),
|
||||
path("question/", views.LongView.as_view(), name="long_view"),
|
||||
path("series/", views.LongSeriesView.as_view(), name="long_series_view"),
|
||||
path("question/", views.LongView.as_view(), name="question_view"),
|
||||
path("series/", views.LongSeriesView.as_view(), name="series_view"),
|
||||
path("series/<int:pk>", views.series_detail, name="series_detail"),
|
||||
path(
|
||||
"series/<int:pk>/order_dicom",
|
||||
@@ -100,18 +99,13 @@ urlpatterns = [
|
||||
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("create/", views.LongCreate.as_view(), name="long_create"),
|
||||
path("create/series", views.LongSeriesCreate.as_view(), name="long_series_create"),
|
||||
path("create/", views.LongCreate.as_view(), name="question_create"),
|
||||
path("create/series", views.LongSeriesCreate.as_view(), name="series_create"),
|
||||
path(
|
||||
"create/series/<int:pk>",
|
||||
views.LongSeriesCreate.as_view(),
|
||||
name="long_series_id_create",
|
||||
),
|
||||
path(
|
||||
"create/defaults",
|
||||
views.LongCreationDefaultView.as_view(),
|
||||
name="long_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"),
|
||||
|
||||
+2
-2
@@ -273,12 +273,12 @@ class LongCreationDefaultView(LoginRequiredMixin, UpdateView):
|
||||
|
||||
class LongDelete(RevisionMixin, AuthorOrCheckerRequiredMixin, DeleteView):
|
||||
model = Long
|
||||
success_url = reverse_lazy("longs:long_view")
|
||||
success_url = reverse_lazy("longs:question_view")
|
||||
|
||||
|
||||
class LongSeriesDelete(RevisionMixin, AuthorOrCheckerRequiredMixin, DeleteView):
|
||||
model = LongSeries
|
||||
success_url = reverse_lazy("longs:long_series_view")
|
||||
success_url = reverse_lazy("longs:series_view")
|
||||
|
||||
|
||||
@login_required
|
||||
|
||||
@@ -1,18 +1,43 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}
|
||||
Physics
|
||||
Physics
|
||||
{% endblock %}
|
||||
|
||||
{% block navigation %}
|
||||
Physics:
|
||||
{% if request.user.is_authenticated %}
|
||||
<a href="{% url 'physics:exam_list' %}">Exams</a> /
|
||||
<a href="{% url 'physics:question_view' %}">Questions</a>
|
||||
{% if request.user.is_superuser %}
|
||||
/ <a href="{% url 'physics:user_answer_table_view' %}" title="User answers">Answers</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<nav class="navbar navbar-expand-lg navbar-dark submenu">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="{% url 'physics:index' %}">Physics</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse">
|
||||
<ul class="navbar-nav">
|
||||
{% if request.user.is_authenticated %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'physics:exam_list' %}"><i class="bi bi-mortarboard"></i> Exams</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'physics:question_view' %}"><i class="bi bi-question-circle"></i> Questions</a>
|
||||
</li>
|
||||
{% comment %} <li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false"><i class="bi bi-file-earmark-plus"></i> Create</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="{% url 'physics:exam_create' %}" title="Create a new exam"><i class="bi bi-mortarboard"></i> Exam</a></li>
|
||||
<li><a class="dropdown-item" href="{% url 'physics:question_create' %}" title="Create a new question"><i class="bi bi-question-circle"></i> Question</a></li>
|
||||
</ul>
|
||||
</li> {% endcomment %}
|
||||
|
||||
{% if request.user.is_superuser %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'physics:user_answer_table_view' %}" title="User answers">Answers</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
-19
@@ -31,30 +31,12 @@ from longs import views as long_views
|
||||
|
||||
from generic import views as generic_views
|
||||
|
||||
from rest_framework import routers
|
||||
|
||||
from django.conf.urls import handler400, handler403, handler404, handler500
|
||||
|
||||
from .api import api
|
||||
from autocomplete import HTMXAutoComplete
|
||||
|
||||
|
||||
router_drf = routers.DefaultRouter()
|
||||
#router_drf.register(r"rapids/exams", rapid_views.ExamViewSet, basename="rapid-exam")
|
||||
#router_drf.register(r"anatomy/exams", anatomy_views.ExamViewSet, basename="anatomy-exam")
|
||||
#router_drf.register(r"longs/exams", long_views.ExamViewSet, basename="long-exam")
|
||||
#router_drf.register(
|
||||
# r"rapids/answers",
|
||||
# rapid_views.QuestionAnswerViewSet,
|
||||
# basename="rapid-question-answers",
|
||||
#)
|
||||
#router_drf.register(
|
||||
# r"rapids/user_answer",
|
||||
# rapid_views.UserAnswerViewSet,
|
||||
# basename="rapid-question-answers",
|
||||
#)
|
||||
#router_drf.register(r"rapids", rapid_views.RapidViewSet, basename="rapid")
|
||||
|
||||
urlpatterns = [
|
||||
path("admin/", admin.site.urls, name="admin"),
|
||||
path("api/", api.urls),
|
||||
@@ -164,7 +146,6 @@ urlpatterns = [
|
||||
name="answer_suggestion_confirm",
|
||||
),
|
||||
path("feedback/view", views.view_feedback, name="view_feedback"),
|
||||
#path("api/", include(router_drf.urls)),
|
||||
#path("api-auth/", include("rest_framework.urls")),
|
||||
path("tinymce/", include("tinymce.urls")),
|
||||
path("cookies/", include("cookie_consent.urls")),
|
||||
|
||||
+1
-1
@@ -605,7 +605,7 @@ class RapidCreationDefault(models.Model):
|
||||
# help_text="Default site to use when creating a new rapid")
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse("rapids:rapid_create")
|
||||
return reverse("rapids:question_create")
|
||||
|
||||
class ExamQuestionDetail(models.Model):
|
||||
exam = models.ForeignKey("Exam", on_delete=models.CASCADE)
|
||||
|
||||
@@ -18,17 +18,39 @@
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block navigation %}
|
||||
Rapids:
|
||||
{% if request.user.is_authenticated %}
|
||||
<a href="{% url 'rapids:index' %}">Packets</a> /
|
||||
<a href="{% url 'rapids:exam_list' %}">Exams</a> /
|
||||
<a href="{% url 'rapids:exam_create' %}" title="Create a new exam">Create Exam</a> /
|
||||
<a href="{% url 'rapids:rapid_view' %}">Questions</a> /
|
||||
<a href="{% url 'rapids:rapid_create' %}" title="Create a new question">Create Question</a>
|
||||
{% endif %}
|
||||
{% if request.user.is_superuser %}
|
||||
/ <a href="{% url 'rapids:user_answer_table_view' %}" title="User answers">Answers</a>
|
||||
{% endif %}
|
||||
<nav class="navbar navbar-expand-lg navbar-dark submenu">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="{% url 'rapids:index' %}">Rapids</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse">
|
||||
<ul class="navbar-nav">
|
||||
{% if request.user.is_authenticated %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'rapids:exam_list' %}"><i class="bi bi-mortarboard"></i> Exams</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'rapids:question_view' %}"><i class="bi bi-question-circle"></i> Questions</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false"><i class="bi bi-file-earmark-plus"></i> Create</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="{% url 'rapids:exam_create' %}" title="Create a new exam"><i class="bi bi-mortarboard"></i> Exam</a></li>
|
||||
<li><a class="dropdown-item" href="{% url 'rapids:question_create' %}" title="Create a new question"><i class="bi bi-question-circle"></i> Question</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
{% if request.user.is_superuser %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'rapids:user_answer_table_view' %}" title="User answers">Answers</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
{% comment %} </br>
|
||||
Questions by:
|
||||
<span id="authors-link"><a href="{% url 'rapids:author_list' %}">author</a></span> {% endcomment %}
|
||||
|
||||
@@ -11,5 +11,5 @@
|
||||
<a href="{% url 'rapids:exam_cids' exam_id=exam.pk %}">Candidates</a> /
|
||||
<a href="{% url 'rapids:exam_stats' exam_id=exam.pk %}">Stats</a> /
|
||||
{% endif %}
|
||||
<a href="{% url 'rapids:rapid_create_exam' pk=exam.pk %}">Add New Question</a>
|
||||
<a href="{% url 'rapids:question_create_exam' pk=exam.pk %}">Add New Question</a>
|
||||
{% endblock %}
|
||||
|
||||
@@ -319,7 +319,6 @@
|
||||
{% endif %}
|
||||
|
||||
<h2>Submit Rapid</h2>
|
||||
{% comment %} <a href="{% url 'rapids:rapid_create_defaults' %}">Edit defaults</a> {% endcomment %}
|
||||
<p>
|
||||
<h3>Instructions</h3>
|
||||
Abnormality, Region and Laterality are used to categorise within the system (they are not used for marking). String
|
||||
|
||||
+3
-9
@@ -11,11 +11,10 @@ app_name = "rapids"
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
# path('', views.question_list, name='question_list'),
|
||||
#path("", views.GenericExamViews.index, name="index"),
|
||||
#path("exam", generic_exam_urls(views.GenericExamViews), name="index"),
|
||||
path("question_viewer", views.question_viewer, name="question_viewer"),
|
||||
path("question/", views.RapidView.as_view(), name="rapid_view"),
|
||||
path("question/", views.RapidView.as_view(), name="question_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"),
|
||||
@@ -64,13 +63,8 @@ urlpatterns = [
|
||||
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("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("create/", views.RapidCreate.as_view(), name="question_create"),
|
||||
path("create/exam/<int:pk>", views.RapidCreate.as_view(), name="question_create_exam"),
|
||||
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"),
|
||||
|
||||
+1
-1
@@ -733,7 +733,7 @@ def mark(request, exam_pk, sk, unmarked_exam_answers_only=True, review=False):
|
||||
|
||||
class QuestionDelete(AuthorOrCheckerRequiredMixin, DeleteView):
|
||||
model = Rapid
|
||||
success_url = reverse_lazy("rapids:rapid_view")
|
||||
success_url = reverse_lazy("rapids:question_view")
|
||||
|
||||
|
||||
GenericExamViews = ExamViews(
|
||||
|
||||
@@ -17,7 +17,6 @@ pydicom
|
||||
django-dbbackup
|
||||
#django-hashedfilenamestorage
|
||||
git+https://github.com/allysonbarros/django-hashedfilenamestorage#egg=django-hashedfilenamestorage
|
||||
djangorestframework
|
||||
django-tinymce
|
||||
django-zipview
|
||||
pymemcache
|
||||
|
||||
+4
-4
@@ -80,9 +80,9 @@ class AuthorOrCheckerRequiredMixin(object):
|
||||
return obj
|
||||
|
||||
|
||||
def question_list(request):
|
||||
questions = Question.objects.all()
|
||||
return render(request, "sbas/question_list.html", {"questions": questions})
|
||||
# def question_view(request):
|
||||
# questions = Question.objects.all()
|
||||
# return render(request, "sbas/question_view.html", {"questions": questions})
|
||||
|
||||
|
||||
@login_required
|
||||
@@ -383,7 +383,7 @@ GenericViews = GenericViewBase("sbas", Question, UserAnswer, Exam)
|
||||
|
||||
class QuestionDelete(AuthorOrCheckerRequiredMixin, DeleteView):
|
||||
model = Question
|
||||
success_url = reverse_lazy("sbas:question_list")
|
||||
success_url = reverse_lazy("sbas:question_view")
|
||||
|
||||
|
||||
class ExamCreate(ExamCreateBase):
|
||||
|
||||
Reference in New Issue
Block a user