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