ars/templates/single_choice/result.stpl

20 lines
781 B
Text

<% if is_correct { %>
<article>
<center><img src="/static/check.svg" width="50%"/></center>
<center><h1>Correct</h1></center>
<center><p>Your answer is correct. The correct answer is <b><%= correct_answer %></b>.</p></center>
</article>
<% } else { %>
<article>
<center><img src="/static/xmark.svg" width="50%"/></center>
<center><h1>Wrong</h1></center>
<center><p>
Your answer is incorrect. The correct answer is <b><%= correct_answer %></b>.
<% if let Some(player_answer) = player_answer { %>
You answered <b><%= player_answer %></b>.
<% } else { %>
You didn't answer the question.
<% } %>
</p></center>
</article>
<% } %>