probo/server/templates/exam.tpl
2023-12-11 09:32:50 +01:00

27 lines
1.8 KiB
Smarty

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="/static/css/neat.css">
<title>{{.Name}}</title>
</head>
<body>
<h1>{{.Name}}</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="{{$answer.ID}}" name="answer"
value="{{$answer.ID}}">
<label
for="{{$answer.ID}}">{{$answer.Text}}</label><br>
{{end}}
<br>
{{end}}
<button type="submit">Invia</button>
</form>
</body>
</html>