more bootstrap nav convresion
This commit is contained in:
+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(
|
||||
|
||||
Reference in New Issue
Block a user