Complete supervisor model and start improving forms
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<!DOCTYPE HTML>
|
||||
{% load static %}
|
||||
{% load django_htmx %}
|
||||
{% load crispy_forms_tags %}
|
||||
{% load auth_extras %}
|
||||
<html>
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
|
||||
<p><a href="http://www.penracourses.org.uk/rts">RTS is available here</a></p>
|
||||
<p><a href="{% url 'cid_selector' %}">CID users can log in here</a></p>
|
||||
<div>
|
||||
{% if request.user.is_staff %}
|
||||
Manage users <a href="{% url 'generic:manage_cids'%}">here</a>
|
||||
|
||||
+21
-9
@@ -1,30 +1,42 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="anatomy">
|
||||
<div class="anatomy">
|
||||
<h1>Profile</h1>
|
||||
<div>
|
||||
Username: {{ user.username }}
|
||||
Username: {{ user.username }}
|
||||
</div>
|
||||
<div>
|
||||
Email: {{ user.email }}
|
||||
Email: {{ user.email }}
|
||||
</div>
|
||||
<div>
|
||||
Name: {{ user.first_name }}
|
||||
{{ user.last_name }}
|
||||
Name: {{ user.first_name }}
|
||||
{{ user.last_name }}
|
||||
</div>
|
||||
<div>
|
||||
Grade: {{ user.userprofile.grade }}
|
||||
Grade: {{ user.userprofile.grade }}
|
||||
</div>
|
||||
<div>
|
||||
Supervisor: {{ user.userprofile.supervisor }}<br/>
|
||||
Supervisor: {{ user.userprofile.supervisor }}<br/>
|
||||
</div>
|
||||
<div>
|
||||
Registration number: {{ user.userprofile.registration_number }}
|
||||
Registration number: {{ user.userprofile.registration_number }}
|
||||
</div>
|
||||
|
||||
|
||||
<h3>Groups</h3>
|
||||
|
||||
<ul>
|
||||
{% for group in user.user_groups.all %}
|
||||
<li>{{group}}</li>
|
||||
{% empty %}
|
||||
<li>No groups.</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
|
||||
<a href="{% url 'password_change'%}">Change password</a>
|
||||
<a href="{% url 'account_update' user.username %}">Update user details</a>
|
||||
<a href="{% url 'account_profile_update' user.username %}">Update user profile</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
{% if view_all_results %}
|
||||
<div class="alert alert-info" role="alert">
|
||||
Exam state: Active [{{exam.active}}] / Published [{{exam.publish_results}}]
|
||||
</div>
|
||||
{% else %}
|
||||
{% if not exam.publish_results %}
|
||||
<div class="alert alert-info" role="alert">Results are not currently published. You can see your own answers below.</a></div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<h2>Exam: {{ exam.name }}</h2>
|
||||
<h3>Candidate: {{ cid|default_if_none:request.user.username }}</h3>
|
||||
Answers:
|
||||
@@ -0,0 +1,11 @@
|
||||
{% if view_all_results or exam.publish_results %}
|
||||
<br /> Total mark: {{ total_score }} / {{max_score}}
|
||||
{% if normalised_score %}
|
||||
<br /> Normalised score: {{ normalised_score }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<div>
|
||||
{% if cid %}
|
||||
<a href="{% url 'cid_scores' cid passcode %}">Other exams</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -1,10 +1,10 @@
|
||||
{% extends 'generic/base.html' %}
|
||||
|
||||
{% load crispy_forms_tags %}
|
||||
{% block content %}
|
||||
<h2>Editing user: {{object.username}}</h2>
|
||||
This form allows you to edit the users name and email address. More details (such as grade / supervisor / etc...) can be changed <a href="{% url 'account_profile_update' object.username %}">here</a>
|
||||
<form method="post">{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
{{ form|crispy }}
|
||||
<input type="submit" value="Update">
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -1,10 +1,11 @@
|
||||
{% extends 'generic/base.html' %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Editing user: {{object.username}}</h2>
|
||||
This form allows you to edit additional user details. Name and emails can be edited <a href="{% url 'account_update' object.username %}">here</a>
|
||||
<form method="post">{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
{{ form|crispy }}
|
||||
<input type="submit" value="Update">
|
||||
</form>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user