Testtemplate with questions loading now

This commit is contained in:
Jan
2024-05-30 17:54:28 +02:00
parent 6e6868e230
commit 01a8e5f021
3 changed files with 49 additions and 6 deletions

View File

@@ -41,11 +41,15 @@
<h2>Questions</h2>
<form action="http://localhost:5000/send_json" method="post"></form>
<form action="http://localhost:5000/send_json" method="post">
{% for question in questions %}
{% if (questions[question] == "likert") %}
{% elif (config["question 1"]["blocks"][block]["type"] == "textinput") %}
{% if (questions[question]["type"] == "likert") %}
<div class="likert"></div>
{% for point in questions[question]["points"] %}
<label><input name="likertscale" type="radio" value="{{ questions[question]['points'][point]['value'] }}"/><span>{{ questions[question]['points'][point]['text'] }}</span></label>
{% endfor %}
</div>
{% elif (questions[question]["type"] == "textinput") %}
{% else %}
<p>Error: Block {{config["question 1"]["blocks"][block]["type"]}} could not be loaded!</p>
{% endif %}
@@ -53,6 +57,6 @@
<p><input id="submitbutton" type = "submit" value = "submit";/></p>
</form>
</body>
</body>
</html>