Created
October 9, 2015 16:44
-
-
Save DanielCoulbourne/c09c3f1791e33188c08f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for the_quiz in post.quiz %} | |
{% set quiz_obj = TimberPost(the_quiz) %} | |
<h3>Take the {{quiz_obj.title}} Quiz</h3> | |
{% for the_question in quiz_obj.get_field('question') %} | |
{% if loop.index is even %} | |
<div class="row"> | |
{% endif %} | |
<div class="col-md-6"> | |
<p><span>{{loop.index}}.</span>{{the_question.question}}</p> | |
<form> | |
{% for answer in the_question.answer %} | |
<input id="{{answer_text|sanitize}}{{loop.index}}" type="checkbox" name="answer" class="correct_{{answer.correct}}"></input> | |
<label for="{{answer_text|sanitize}}{{loop.index}}">{{answer.answer_text}}</label><br/> | |
{% endfor %} | |
</form> | |
</div> | |
{% if loop.index is even %} | |
</div> | |
{% endif %} | |
{% endfor %} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment