exam.tpl 1.9 KB

12345678910111213141516171819202122232425262728
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <!-- <link rel="stylesheet" href="https://unpkg.com/mvp.css"> -->
  6. <link rel="stylesheet" type="text/css" href="/static/css/neat.css">
  7. <title>Exam</title>
  8. </head>
  9. <body>
  10. <h1>Exam</h1>
  11. <h2>{{.Participant.Firstname}} {{.Participant.Lastname}}</h2>
  12. <form action="/{{.SessionID}}/{{.Participant.Token}}" method="post">
  13. {{range $index, $quiz := .Quizzes}}
  14. <h3>Question {{$index}}:</h3>
  15. <p>{{$quiz.Question.Text}}</p>
  16. {{range $answer := $quiz.Answers}}
  17. <input type="radio"
  18. id="{{$quiz.Question.ID}}_{{$answer.ID}}" name="{{$quiz.Question.ID}}"
  19. value="{{$answer.ID}}">
  20. <label
  21. for="{{$answer.ID}}">{{$answer.Text}}</label><br>
  22. {{end}}
  23. <br>
  24. {{end}}
  25. <button type="submit">Invia</button>
  26. </form>
  27. </body>
  28. </html>