.
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ class CidUserTable(tables.Table):
|
||||
# edit = tables.LinkColumn(
|
||||
# "anatomy:anatomy_question_update", text="Edit", args=[A("pk")], orderable=False
|
||||
# )
|
||||
cid = tables.LinkColumn("cid_scores", args=[A("cid"), A("passcode")], orderable=False)
|
||||
cid = tables.LinkColumn("cid_scores", args=[A("cid"), A("passcode")], orderable=True)
|
||||
# image = ImageColumn("image", orderable=False)
|
||||
# clone = tables.LinkColumn('anatomy:anatomy_question_clone',
|
||||
# text='Clone',
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</tr>
|
||||
{% for user, value in user_answers_marks.items %}
|
||||
<tr>
|
||||
<td><a href="{% url 'cid_scores' user %}">{{user}}</a></td>
|
||||
<td><a href="{% url 'cid_scores_admin' user %}">{{user}}</a></td>
|
||||
<td>{{user_scores|get_item:user}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
@@ -33,11 +33,11 @@
|
||||
<h3>Answers as a table</h3>
|
||||
<table class="table table-dark table-striped table-hover table-sm">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Candidate</th>
|
||||
{% for cid in cids %}
|
||||
<th>{{cid}}</th>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<th>Candidate</th>
|
||||
{% for cid in cids %}
|
||||
<th>{{cid}}</th>
|
||||
{% endfor %}
|
||||
</thead>
|
||||
</tr>
|
||||
{% for question in questions %}
|
||||
|
||||
@@ -57,6 +57,7 @@ urlpatterns = [
|
||||
path("accounts/profile", views.profile, name="profile"),
|
||||
path("", TemplateView.as_view(template_name="index.html"), name="home"),
|
||||
path("cid/<int:pk>/<str:passcode>", views.cid_scores, name="cid_scores"),
|
||||
path("cid/<int:cid>/", views.cid_scores_admin, name="cid_scores_admin"),
|
||||
path("cid/", views.cid_selector, name="cid_selector"),
|
||||
# Global url that registers RTS compatible exams
|
||||
path("exam/json/", views.active_exams, name="active_exams"),
|
||||
|
||||
@@ -75,6 +75,11 @@ def cid_selector(request):
|
||||
"cid_selector.html",
|
||||
)
|
||||
|
||||
@login_required
|
||||
def cid_scores_admin(request, cid):
|
||||
cid_user = CidUser.objects.filter(cid=cid).first()
|
||||
|
||||
return cid_scores(cid_user.cid, cid_user.passcode)
|
||||
|
||||
def cid_scores(request, pk, passcode):
|
||||
# exam = get_object_or_404(Exam, pk=pk)
|
||||
|
||||
Reference in New Issue
Block a user