Allow browsing user scores as admin
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="">
|
||||
<h2>User: {{ request.user.username }}</h2>
|
||||
<h2>User: {{ cid_user.username }}</h2>
|
||||
<h3>Assigned exams</h3>
|
||||
<div class="alert alert-dark" role="alert">
|
||||
<details>
|
||||
@@ -35,7 +35,15 @@
|
||||
<h4>{{exam_type|title}}</h4>
|
||||
<ul class='{{exam_type|lower}}'>
|
||||
{% for exam in exams %}
|
||||
<li class="exam" data-exam-id="{{exam.pk}}"><a href="{% url exam_type|add:':exam_scores_user' pk=exam.pk %}">{{exam.name}}</a> {% if exam.active %}[Active]{% endif %} {% if exam.publish_results %}[Results Published]{% endif %}</li>
|
||||
<li class="exam" data-exam-id="{{exam.pk}}">
|
||||
|
||||
{% if admin %}
|
||||
<a href= "{% url exam_type|add:':exam_scores_user_admin' pk=exam.pk user_id=user.pk %}" >
|
||||
{% else %}
|
||||
<a href= "{% url exam_type|add:':exam_scores_user' pk=exam.pk %}" >
|
||||
{% endif %}
|
||||
|
||||
{{exam.name}}</a> {% if exam.active %}[Active]{% endif %} {% if exam.publish_results %}[Results Published]{% endif %}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user