Der Umstieg auf Sessions ist weitgehend geglückt
This commit is contained in:
@ -1,11 +1,18 @@
|
||||
{{ define "passed" }}
|
||||
{{ end }}
|
||||
{{define "answers"}}
|
||||
{{range .Answers}}
|
||||
<p class="{{if and .Chosen .Correct}} correct {{else if and .Chosen (not .Correct)}} incorrect {{end}}">
|
||||
{{.Text}}
|
||||
</p>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
{{ define "failed" }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
{{ q := range .Participant.Questions }}
|
||||
<p>{{ . }}{{ q.Text }}</p>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{define "content"}}
|
||||
<p>{{.Incorrect}} Fehler</p>
|
||||
{{range .Questions}}
|
||||
<p>{{.Text}}</p>
|
||||
{{template "answers" .}}
|
||||
{{end}}
|
||||
{{if gt .Incorrect 0}}
|
||||
<button hx-post="/retry/{{.SessionID}}/{{.Login}}/" hx-target="#content" type="submit">Wiederholen</button>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
Reference in New Issue
Block a user