vale981_fahrschule/templates/quiz.html
2014-04-18 08:39:11 +02:00

64 lines
1.7 KiB
HTML

{% extends 'quizzes.html' %}
<html lang="en">
<head>
<title>Fahrschule Examiner 0.1</title>
{% load staticfiles %}
<link rel="stylesheet" type="text/css" href="{% static 'css/quizz.css' %}" />
</head>
{% block header %}
{% if len >= 20 %}
<div style="font-size: 20px">{{ quiz.title }}</div>
{% else %}
{{quiz.title}}
{% endif %}
{% endblock %}
{% block main %}
{% if quiz.fragen.count == 0 %}
<br>
<h1 id="main_link" style="text-align: center" align="center">Keine Fragen vorhanden!</h1>
{% endif %}
<form action="/quiz/check/" name="quiz_form" method="post">{% csrf_token %}
<input type="hidden" name="user_log" value="{{ user.id }}">
<input type="hidden" name="quiz" value="{{ quiz.id }}">
{% for Frage in quiz.fragen.all %}
<table class="bordered" style="width: 100%"><tr><th colspan="10"><div id="frage">{{Frage.content}}</div></th>
<input type="hidden" name="frage{{ Frage.id }}" value="{{ Frage.id }}">
</tr>
<tr>
{% for aw in Frage.antworten.all %}
<td colspan="3">{% if aw.bild == "" %}{% else %}<img src="/media/{{ aw.bild }}" align="center" width="100"><br>{% endif %}
<input align="center" type="checkbox" style="position: relative; bottom:-1px" class="css-checkbox" name="aw_check{{ aw.id }}" id="aw_check">
<label for="aw_check{{ aw.id }}">{% if aw.bild == "" %}{{ aw.content }}{% else %}{% endif %}</label>
</td>
<input type="hidden" name="antwort{{ Frage.id }}" value="{{ aw.id }}">
{% endfor %}
</tr></table><br>
{% endfor %}
<input type="submit" class="button" value="Abgeben"/>
</form>
{% endblock %}
</html>