.
This commit is contained in:
+6
-3
@@ -23,9 +23,9 @@ class CidUserTable(tables.Table):
|
||||
# edit = tables.LinkColumn(
|
||||
# "anatomy:anatomy_question_update", text="Edit", args=[A("pk")], orderable=False
|
||||
# )
|
||||
# view = tables.LinkColumn(
|
||||
# "anatomy:question_detail", text="View", args=[A("pk")], orderable=False
|
||||
# )
|
||||
view = tables.LinkColumn(
|
||||
"cid_scores", text="View", args=[A("cid"), A("passcode")], orderable=False
|
||||
)
|
||||
# image = ImageColumn("image", orderable=False)
|
||||
# clone = tables.LinkColumn('anatomy:anatomy_question_clone',
|
||||
# text='Clone',
|
||||
@@ -51,3 +51,6 @@ class CidUserTable(tables.Table):
|
||||
"email",
|
||||
)
|
||||
# sequence = ("view")
|
||||
|
||||
# def render_cid(self, value, record):
|
||||
# return format_html("""<a href="#" onclick="return window.create_popup_window('/longs/series/{}', 'Series')" >Popup</a>""", record.pk)
|
||||
|
||||
@@ -105,41 +105,6 @@ def cid_scores(request, pk, passcode):
|
||||
exams.append((exam_type, Exam.objects.filter(id__in=exam_ids, **kwargs)))
|
||||
|
||||
|
||||
#physics_answers = PhysicsCidUserAnswer.objects.filter(cid=cid)
|
||||
#anatomy_answers = AnatomyCidUserAnswer.objects.filter(cid=cid)
|
||||
#rapids_answers = RapidsCidUserAnswer.objects.filter(cid=cid)
|
||||
#longs_answers = LongsCidUserAnswer.objects.filter(cid=cid)
|
||||
#sbas_answers = SbasCidUserAnswer.objects.filter(cid=cid)
|
||||
|
||||
## if (
|
||||
## not physics_answers
|
||||
## and not anatomy_answers
|
||||
## and not rapids_answers
|
||||
## and not longs_answers
|
||||
## and not sbas_answers
|
||||
## ):
|
||||
## raise Http404("cid not found")
|
||||
|
||||
##kwargs = {"publish_results": True}
|
||||
|
||||
##if request.user.groups.filter(name="view_all_results").exists():
|
||||
## kwargs = {}
|
||||
|
||||
#physics_exam_ids = physics_answers.values_list("exam").distinct()
|
||||
#physics_exams = PhysicsExam.objects.filter(id__in=physics_exam_ids, **kwargs)
|
||||
|
||||
#anatomy_exam_ids = anatomy_answers.values_list("exam").distinct()
|
||||
#anatomy_exams = AnatomyExam.objects.filter(id__in=anatomy_exam_ids, **kwargs)
|
||||
|
||||
#rapids_exam_ids = rapids_answers.values_list("exam").distinct()
|
||||
#rapid_exams = RapidsExam.objects.filter(id__in=rapids_exam_ids, **kwargs)
|
||||
|
||||
#longs_exam_ids = longs_answers.values_list("exam").distinct()
|
||||
#longs_exams = LongsExam.objects.filter(id__in=longs_exam_ids, **kwargs)
|
||||
|
||||
#sbas_exam_ids = sbas_answers.values_list("exam").distinct()
|
||||
#sba_exams = SbasExam.objects.filter(id__in=sbas_exam_ids, **kwargs)
|
||||
|
||||
available_exams = cid_user.get_cid_exams()
|
||||
|
||||
return render(
|
||||
|
||||
@@ -26,45 +26,6 @@
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% comment %} {% if physics_exams %}
|
||||
<h4>Physics</h4>
|
||||
<ul>
|
||||
{% for exam in physics_exams %}
|
||||
<li><a href="{% url 'physics:exam_scores_cid_user' pk=exam.pk sk=cid passcode=passcode %}">{{exam.name}}</a> {% if exam.active %}[Active]{% endif %} {% if exam.publish_results %}[Results Published]{% endif %}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if anatomy_exams %}
|
||||
<h4>Anatomy</h4>
|
||||
<ul>
|
||||
{% for exam in anatomy_exams %}
|
||||
<li><a href="{% url 'anatomy:exam_scores_cid_user' pk=exam.pk sk=cid passcode=passcode %}">{{exam.name}}</a> {% if exam.active %}[Active]{% endif %} {% if exam.publish_results %}[Results Published]{% endif %}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if rapid_exams %}
|
||||
<h4>Rapids</h4>
|
||||
<ul>
|
||||
{% for exam in rapid_exams %}
|
||||
<li><a href="{% url 'rapids:exam_scores_cid_user' pk=exam.pk cid=cid passcode=passcode %}">{{exam.name}}</a> {% if exam.active %}[Active]{% endif %} {% if exam.publish_results %}[Results Published]{% endif %}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if longs_exams %}
|
||||
<h4>Longs</h4>
|
||||
<ul>
|
||||
{% for exam in longs_exams %}
|
||||
<li><a href="{% url 'longs:exam_scores_cid_user' pk=exam.pk sk=cid passcode=passcode %}">{{exam.name}}</a> {% if exam.active %}[Active]{% endif %} {% if exam.publish_results %}[Results Published]{% endif %}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if sba_exams %}
|
||||
<h4>SBAs</h4>
|
||||
<ul>
|
||||
{% for exam in sba_exams %}
|
||||
<li><a href="{% url 'sbas:exam_scores_cid_user' pk=exam.pk sk=cid passcode=passcode %}">{{exam.name}}</a> {% if exam.active %}[Active]{% endif %} {% if exam.publish_results %}[Results Published]{% endif %}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %} {% endcomment %}
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user