Files
changeblindness/views/results.html.twig
mattbk 0da40716fc Add participant ID
Collect participant ID at the beginning, store in database, export with
results.  Closes https://github.com/mattbk/changeblindness/issues/2.
2015-11-01 15:11:27 -06:00

82 lines
2.9 KiB
Twig

{% extends 'base.html.twig' %}
{% block content %}
<header class="page-header">
<h1>Change blindness results</h1>
</header>
<!--
<div class="alert alert-info">{% if records == 1 %}Retrieved 1 result.{% else %}Retrieved {{ records }} results.{% endif %}</div>
-->
{% if allow_filtering %}
<div class="btn-group">
<a class="btn{% if filtered %} active{% endif %}" href="index.php?mode=results&filtered=1">Filtered results</a>
<a class="btn{% if not filtered %} active{% endif %}" href="index.php?mode=results">All results</a>
</div>
{% endif %}
<!--
<h2 id="statistics">Statistics</h2>
<table class="table">
<thead>
<tr>
<th>#</th>
<th>Notable</th>
<th>Unnoted</th>
<th>Renoted</th>
</tr>
</thead>
<tbody>
{% for record in stats %}
<tr>
<td>{{ loop.index }}.</td>
{% if record.scene1.correct %}<td class="alert-success"><i class="icon-ok"></i>{% else %}<td class="alert-danger"><i class="icon-remove"></i>{% endif %}&nbsp;{{ record.scene1.time }} ms</td>
{% if record.scene2.correct %}<td class="alert-success"><i class="icon-ok"></i>{% else %}<td class="alert-danger"><i class="icon-remove"></i>{% endif %}&nbsp;{{ record.scene2.time }} ms</td>
{% if record.scene3.correct %}<td class="alert-success"><i class="icon-ok"></i>{% else %}<td class="alert-danger"><i class="icon-remove"></i>{% endif %}&nbsp;{{ record.scene3.time }} ms</td>
</tr>
{% endfor %}
</tbody>
</table>
-->
<h2 id="raw-results">Raw results</h2>
<p><a class="btn" href="index.php?mode=results&download=1"><i class="icon-download-alt"></i> Download results</a></p>
<!--
{% for record in data %}
<pre>{{dump(record.uid)}}</pre>
<pre>{{record.uid}}</pre>
{% endfor %}
-->
<table class="table table-striped">
<thead>
<tr>
<th>uid</th>
<th>date</th>
<th>host</th>
<th>participant</th>
<th>phase</th>
<th>x</th>
<th>y</th>
<th>time</th>
<th>score</th>
</tr>
</thead>
<tbody>
{% for record in data %}
<tr class="{% if record.result.host == '192.168.0.1' %}muted{% endif %}">
<td>{{record.uid}}.</td>
<td>{{ record.datetime }}</td>
<td>{{ record.host }}</td>
<td>{{ record.participantid }}</td>
<td>{{ record.phase }}</td>
<td>{{ record.xcoordinate }}</td>
<td>{{ record.ycoordinate }}</td>
<td>{{ record.responsetime }}</td>
<td>{{ record.score }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}