further improvements to questions
This commit is contained in:
@@ -121,23 +121,47 @@
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
<p>
|
||||
<a href="{% url 'atlas:add_self_review' cid_user_exam.id case.id %}"><button>Add self review</button></a>
|
||||
</p>
|
||||
|
||||
{% endif %}
|
||||
<form method="POST" class="post-form">{% csrf_token %}
|
||||
{% if collection.collection_type == "REP" or collection.collection_type == "QUE" %}
|
||||
{{form.json.errors}}
|
||||
<div class="form-contents">
|
||||
<fieldset {% if question_completed %}disabled="disabled"{% endif %}>
|
||||
{{form}}
|
||||
</fieldset>
|
||||
</div>
|
||||
<p>
|
||||
{% if question_completed %}
|
||||
<form method="POST" class="post-form{% if question_completed %} completed{% endif %}">{% csrf_token %}
|
||||
{% if collection.collection_type == "QUE" %}
|
||||
{% if question_completed %}
|
||||
<h3>Answers</h3>
|
||||
|
||||
<div class="answer-block">
|
||||
{% for value, user_answer, correct_answer, answer_is_correct, automark in answer.get_correct_json_answers %}
|
||||
<div class="{% if answer_is_correct %}
|
||||
correct
|
||||
{% else %}
|
||||
incorrect
|
||||
{% endif %}
|
||||
{% if automark %}
|
||||
automark
|
||||
{% endif %}
|
||||
|
||||
">
|
||||
<h4>{{value.title}}</h4>
|
||||
{{value.description}}
|
||||
<div
|
||||
>
|
||||
Answer : {{user_answer}}
|
||||
|
||||
{% if not answer_is_correct %}
|
||||
<br/>Correct answer: {{correct_answer}}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
{% if collection.self_review %}
|
||||
<p>
|
||||
<a href="{% url 'atlas:add_self_review' cid_user_exam.id case.id %}"><button>Add self review</button></a>
|
||||
</p>
|
||||
{% if self_review %}
|
||||
<h4>Self Feedback</h4>
|
||||
|
||||
@@ -151,9 +175,54 @@
|
||||
Answer feedback: {{answer.feedback|safe}}
|
||||
<br/>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<details><summary>View questions</summary>
|
||||
{{form.json.errors}}
|
||||
<div class="form-contents">
|
||||
<fieldset {% if question_completed %}disabled="disabled"{% endif %}>
|
||||
{{form}}
|
||||
</fieldset>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
{% else %}
|
||||
|
||||
{{form.json.errors}}
|
||||
<div class="form-contents">
|
||||
<fieldset {% if question_completed %}disabled="disabled"{% endif %}>
|
||||
{{form}}
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% elif collection.collection_type == "REP" %}
|
||||
{{form.json.errors}}
|
||||
<div class="form-contents">
|
||||
<fieldset {% if question_completed %}disabled="disabled"{% endif %}>
|
||||
{{form}}
|
||||
</fieldset>
|
||||
</div>
|
||||
<div>
|
||||
{% if collection.self_review %}
|
||||
<p>
|
||||
<a href="{% url 'atlas:add_self_review' cid_user_exam.id case.id %}"><button>Add self review</button></a>
|
||||
</p>
|
||||
{% if self_review %}
|
||||
<h4>Self Feedback</h4>
|
||||
|
||||
{% for review in self_review %}
|
||||
{{review.get_display_block}}
|
||||
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<h4>Answer score: {{answer.score}}</h4>
|
||||
Answer feedback: {{answer.feedback|safe}}
|
||||
<br/>
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
{% if previous %}
|
||||
@@ -197,6 +266,31 @@
|
||||
fieldset:disabled textarea {
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
form.completed {
|
||||
}
|
||||
|
||||
.correct {
|
||||
}
|
||||
|
||||
.correct h4::after {
|
||||
content: '✓';
|
||||
color: green;
|
||||
}
|
||||
|
||||
.incorrect h4::after {
|
||||
content: '✗';
|
||||
color: orange;
|
||||
}
|
||||
|
||||
.incorrect.automark h4::after {
|
||||
content: '✗';
|
||||
color: red;
|
||||
}
|
||||
|
||||
.answer-block>div {
|
||||
padding-top: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
{% endblock %}
|
||||
@@ -301,6 +395,6 @@ else {
|
||||
});
|
||||
})
|
||||
{% endcomment %}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
{% endblock js %}
|
||||
|
||||
Reference in New Issue
Block a user