.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
CID: {{cid}}
|
||||
<div class="no-select">
|
||||
CID: {{cid}}
|
||||
<div class="no-select">
|
||||
<h2>Question [{{pos|add:1}}/{{exam_length}}]</h2>
|
||||
{% if exam.publish_results %}
|
||||
<div class="alert alert-primary" role="alert">
|
||||
@@ -49,16 +49,16 @@ CID: {{cid}}
|
||||
<button type="submit" id="goto-button" value="test" name="goto" class="hide">goto</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4>Questions</h4>
|
||||
<div id="menu-list">
|
||||
<h4>Questions</h4>
|
||||
<div id="menu-list">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script>
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
/* beautify ignore:start */
|
||||
{% if not exam.publish_results %}
|
||||
@@ -89,16 +89,16 @@ CID: {{cid}}
|
||||
});
|
||||
/* beautify ignore:end */
|
||||
})
|
||||
</script>
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% block css %}
|
||||
<style type="text/css">
|
||||
/* .form-contents {
|
||||
<style type="text/css">
|
||||
/* .form-contents {
|
||||
display: none;
|
||||
} */
|
||||
|
||||
.selected {
|
||||
border: 1px solid purple;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
{% endblock %}
|
||||
+4
-4
@@ -337,13 +337,13 @@ def exam_take(request, pk, sk, cid):
|
||||
# answer.published_date = timezone.now()
|
||||
answer.save()
|
||||
if "next" in request.POST:
|
||||
return redirect("sbas:exam_take", pk=pk, sk=pos + 1, cid=cid)
|
||||
return redirect("physics:exam_take", pk=pk, sk=pos + 1, cid=cid)
|
||||
elif "previous" in request.POST:
|
||||
return redirect("sbas:exam_take", pk=pk, sk=pos - 1, cid=cid)
|
||||
return redirect("physics:exam_take", pk=pk, sk=pos - 1, cid=cid)
|
||||
elif "finish" in request.POST:
|
||||
return redirect("sbas:exam_finish", pk=pk, cid=cid)
|
||||
return redirect("physics:exam_finish", pk=pk, cid=cid)
|
||||
elif "goto" in request.POST:
|
||||
return redirect("sbas:exam_take", pk=pk, sk=int(request.POST.get("goto")), cid=cid)
|
||||
return redirect("physics:exam_take", pk=pk, sk=int(request.POST.get("goto")), cid=cid)
|
||||
else:
|
||||
form = CidUserAnswerForm(instance=answer)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user