probo/server/templates/exam.tpl
2023-12-17 18:56:20 +01:00

28 lines
1.9 KiB
Smarty

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- <link rel="stylesheet" href="https://unpkg.com/mvp.css"> -->
<link rel="stylesheet" type="text/css" href="/static/css/neat.css">
<title>Exam</title>
</head>
<body>
<h1>Exam</h1>
<h2>{{.Participant.Firstname}} {{.Participant.Lastname}}</h2>
<form action="/{{.SessionID}}/{{.Participant.Token}}" method="post">
{{range $index, $quiz := .Quizzes}}
<h3>Question {{$index}}:</h3>
<p>{{$quiz.Question.Text}}</p>
{{range $answer := $quiz.Answers}}
<input type="radio"
id="{{$quiz.Question.ID}}_{{$answer.ID}}" name="{{$quiz.Question.ID}}"
value="{{$answer.ID}}">
<label
for="{{$answer.ID}}">{{$answer.Text}}</label><br>
{{end}}
<br>
{{end}}
<button type="submit">Invia</button>
</form>
</body>
</html>