<div class="tabbable tabs-left">
    <ul class="nav nav-tabs">
        {{#each collection}}
        <li role="presentation" class="detail-tab {{#if correct }}correct{{else}}incorrect{{/if}}{{#if @first}} active{{/if}}">
            <a href="#{{ id }}" data-toggle="tab" aria-expanded="true">Question {{ math @index "+" ../start_number }}</a>
        </li>
        {{/each}}
    </ul>
    <div class="tab-content">
        {{#each collection}}
        <div class="tab-pane detail-panel-contents {{#if @first}}active{{/if}}" id="{{ id }}">
            <p class="detail-tab {{#if correct }}correct">{{_ "Correct" }}{{else}}incorrect">{{_ "Incorrect" }}{{/if}}</p>
            {{#if time_taken }}<p>{{_ "Time taken" }}: {{ math time_taken "/" 1000 }} {{_ "seconds" }}</p>{{/if}}
            {{#if points }}<p>{{_ "Points" }}: {{ points }}</p>{{/if}}
            {{#if response_log }}
                <table class="table table-striped table-bordered details-table">
                <thead>
                <tr>
                    <th>{{_ "Attempt" }}</th>
                    <th>{{_ "Action" }}</th>
                    <th>{{_ "Time" }}</th>
                    <th>{{_ "Status" }}</th>
                </tr>
                </thead>
                <tbody>
                {{#each response_log }}
                <tr>
                    <td class="detail-table-cell">{{ math @index "+" 1  }}</td>
                    <td class="detail-table-cell">{{ type }}{{#if answer}}: {{#ifObject answer}}{{#each answer.[0] }}{{#unless @first }}, {{/unless}}{{#each this }}{{this}}{{/each}}{{/each}}{{else}}{{answer}}{{/ifObject}}{{/if}}</td>
                    <td class="detail-table-cell">{{ datetime timestamp }}</td>
                    <td class="detail-table-cell">{{#ifcond correct "===" true}}{{_ "Correct" }}{{else}}{{#ifcond correct "===" false }}{{_ "Incorrect" }}{{/ifcond}}{{/ifcond}}</td>
                </tr>
                {{/each}}
                </tbody>
                </table>
            {{/if}}
        </div>
        {{/each}}
    </div>
</div>