numerous improvements
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
{% extends 'anatomy/base.html' %}
|
||||
|
||||
{% load render_table from django_tables2 %}
|
||||
{% block css %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div id="view-filter-options">
|
||||
<h3>Filter Anatomy Questions</h3>
|
||||
<form action="" method="get">
|
||||
{{ filter.form }}
|
||||
<input class="btn btn-primary btn-sm mt-1 mb-1" type="submit" />
|
||||
</form>
|
||||
</div>
|
||||
{% render_table table %}
|
||||
|
||||
{% endblock %}
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
<head>
|
||||
<title>Anatomy Quiz</title>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="{% static 'tagulous/lib/select2-3/select2.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'css/anatomy.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'css/toastr.min.css' %}">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
@@ -22,12 +24,24 @@
|
||||
|
||||
<body>
|
||||
<div class="page-header">
|
||||
{% if request.user.is_staff %}<span id="admin-link"><a
|
||||
href="{% url 'admin:index' %}">Admin</a></span>{% endif %}
|
||||
{% if request.user.is_authenticated %}
|
||||
<span id="logout-link">
|
||||
<a href="{% url 'logout' %}">Logout</a>
|
||||
</span>
|
||||
<span id="profile-link">
|
||||
<a href="{% url 'profile' %}">Profile</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if request.user.is_staff %}
|
||||
<span id="admin-link">
|
||||
<a href="{% url 'admin:index' %}">Admin</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="content container">
|
||||
<a href="{% url 'anatomy:exam_list' %}">Exams</a>
|
||||
<a href="{% url 'anatomy:anatomy_question_create' %}" title="Create a new question">Create Question</a>
|
||||
<a href="{% url 'anatomy:exam_list' %}">Exams</a> /
|
||||
<a href="{% url 'anatomy:anatomy_question_view' %}">Questions</a> /
|
||||
<a href="{% url 'anatomy:anatomy_question_create' %}" title="Create a new question">Create Question</a>
|
||||
{% block navigation %}
|
||||
{% endblock %}
|
||||
<div class="row">
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{% extends 'anatomy/base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Examinations</h1>
|
||||
<div class="anatomy">
|
||||
Active exams:<br/>
|
||||
<ul>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="anatomy">
|
||||
<h2>{{ exam.name }}</h2>
|
||||
{% for user, value in user_answers_marks.items %}
|
||||
<h3>Candidate: {{ user_names|get_item:user }}</h3>
|
||||
<h3>Candidate: <a href="{% url 'anatomy:cid_scores' user %}">{{ user_names|get_item:user }}</a></h3>
|
||||
<!-- Answers: {{ user_answers_and_marks|get_item:user }}-->
|
||||
Answers: {% for ans, score in user_answers_and_marks|get_item:user %}
|
||||
{{ans}} ({{score}}),
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
|
||||
{% block navigation %}
|
||||
<br/>
|
||||
{{exam.name}}-> <a href="{% url 'anatomy:exam_overview' pk=exam.pk %}">Overview</a> <a href="{% url 'anatomy:mark_overview' pk=exam.pk %}">Mark</a> <a href="{% url 'anatomy:exam_scores_cid' pk=exam.pk %}">Scores</a>
|
||||
{{exam.name}}-> <a href="{% url 'anatomy:exam_overview' pk=exam.pk %}">Overview</a> / <a href="{% url 'anatomy:mark_overview' pk=exam.pk %}">Mark</a> / <a href="{% url 'anatomy:exam_scores_cid' pk=exam.pk %}">Scores</a>
|
||||
{% endblock %}
|
||||
@@ -23,7 +23,7 @@
|
||||
</div>
|
||||
<div>
|
||||
Examinations: {% for exam in question.exams.all %}
|
||||
{{ exam.name }}
|
||||
<a href="{% url 'anatomy:exam_overview' pk=exam.pk %}">{{ exam.name }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
{% extends '../anatomy/base.html' %}
|
||||
|
||||
{% block title %}Login{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Login</h2>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user