Resolve "Idee: QUIZ "kritisieren"" #288
@@ -437,6 +437,92 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
{% if user.is_authenticated %}
|
||||||
|
|
||||||
|
<form method="post" class="space-y-6" enctype="multipart/form-data">
|
||||||
|
{% csrf_token %}
|
||||||
|
<div class="max-w-full p-4 mt-8 rounded-2xl bg-gray-100 dark:bg-transparent shadow-sm">
|
||||||
|
<p class="text-lg font-bold text-red-800 dark:text-white dark:bg-transparent ">
|
||||||
|
Quiz kritisieren
|
||||||
|
</p>
|
||||||
|
<p class="text-xs opacity-50 mb-3">
|
||||||
|
Sie haben einen Fehler in dem Quiz entdeckt oder halten eine Frage für nicht angemessen? <br>
|
||||||
|
Dann weisen Sie den Autor gern darauf hin.
|
||||||
|
</p>
|
||||||
|
<select name="question_id" required
|
||||||
|
class="w-full rounded-lg border-gray-300 p-2 dark:bg-gray-800 dark:text-white">
|
||||||
|
<option value="">Kritik an einer bestimmten Frage?</option>
|
||||||
|
|
||||||
|
{% for question in questions %}
|
||||||
|
<option value="{{ question.id }}">
|
||||||
|
Frage {{ forloop.counter }}: {{ question.data.question|truncatechars:60 }}
|
||||||
|
</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
<select name="critic" required
|
||||||
|
class="w-full rounded-lg border-gray-300 p-2 dark:bg-gray-800 dark:text-white mb-4">
|
||||||
|
<option value="">Was ist Ihre Kritik?</option>
|
||||||
|
|
||||||
|
<option value="content_error">
|
||||||
|
Die Frage oder die Antworten enthalten einen inhaltlichen Fehler.
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<option value="spelling_error">
|
||||||
|
Die Frage oder die Antworten enthalten (einen oder mehrere) Rechtschreibfehler.
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<option value="logic_error">
|
||||||
|
Die Frage macht keinen Sinn oder ist nur sehr schwer zu verstehen.
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<option value="inappropriate_error">
|
||||||
|
Die Frage oder die Antworten sind unangemessen.
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<button type="submit" class="inline-flex items-center
|
||||||
|
px-4 py-2 border border-transparent shadow-sm text-sm
|
||||||
|
font-medium rounded-md text-white bg-red-600 hover:bg-red-700
|
||||||
|
focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500">
|
||||||
|
Abschicken
|
||||||
|
</button>
|
||||||
|
{% elif quiz.user_id != request.user %}
|
||||||
|
<div class="max-w-full p-4 mt-8 rounded-2xl bg-gray-100 dark:bg-transparent shadow-sm">
|
||||||
|
<p class="text-lg font-bold text-red-800 dark:text-white dark:bg-transparent ">
|
||||||
|
Quiz kritisieren
|
||||||
|
</p>
|
||||||
|
<p class="text-xs opacity-50 mb-3">
|
||||||
|
Sie haben einen Fehler in dem Quiz entdeckt oder halten eine Frage für nicht angemessen? <br>
|
||||||
|
Dann weisen Sie den Autor gern darauf hin.
|
||||||
|
</p>
|
||||||
|
<a class="inline-flex items-center
|
||||||
|
px-4 py-2 border border-transparent shadow-sm text-sm
|
||||||
|
font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700
|
||||||
|
focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500" href="{% url 'accounts:login' %}">Anmelden</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
{% for critique in quiz.criticism_quiz.all %}
|
||||||
|
|
||||||
|
|
||||||
|
<div class="max-w-full p-4 mt-8 rounded-2xl bg-gray-100 dark:bg-transparent shadow-sm">
|
||||||
|
|
||||||
|
Frage {{critique.question.data.question}}: {{ critique.criticism }}
|
||||||
|
<p class="text-xs dark:text-white dark:bg-transparent ">
|
||||||
|
von User {{ critique.user }}
|
||||||
|
</p>
|
||||||
|
<p class="text-xs font-bold text-red-800 dark:text-white dark:bg-transparent ">
|
||||||
|
{{ critique.creation_date }}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user