blob: fee042738f855de0772c25d01fd87442df37ffbe [file] [log] [blame]
{% extends "experimentpage.html" %}
{% block content %}
<h1>Participant Info</h1>
<h3>Email: {{ userprofile.user.email }}</h3>
<h3> Experiment </h3>
<form method="POST" action="{% url 'exp_portal:edit_user' userprofilepk=userprofile.pk %}">
<div class="form-group">
<label for="id_experiment">Experiment Name</label>
<select class="form-control" name="experiment_name" id='id_experiment' placeholder='Select Experiment' required>
{% for experiment in experiments %}
<option value="{{experiment.name}}">{{experiment.name}}</option>
{% endfor %}
</select>
</div>
<input class="btn btn-primary" type="submit" value="Change Experiment"/>
{% csrf_token %}
</form>
<script>
document.getElementById("id_experiment").value = "{{userprofile.experiment.name}}";
</script>
<h3>Tasks</h3>
<form id="add_task_form" method="get" action="{% url 'exp_portal:add_user_task' userpk=userprofile.id%}">
{% csrf_token %}
<button class="btn btn-default btn-lg" type="submit">Add Task</button>
</form>
<div class="col-md-15">
<table class="table table-hover">
<thead>
<tr>
<th class="text-center">Item</th>
<th class="text-center">SessionID</th>
<th class="text-center">Task Name</th>
<th class="text-center">Product</th>
<th class="text-center">Challenge Problem</th>
<th class="text-center">Active</th>
<th class="text-center">Complete</th>
<th class="text-center">Activity Count</th>
</tr>
</thead>
<tbody>
{% for task in userprofile.tasklistitem_set.all %}
<tr>
<td>{{ forloop.counter }}</td>
<td>{{ task.userprofile.user_hash }}::{{task.id}}</td>
<td>{{ task.op_task.name }}</td>
<td>{{ task.product.name }}</td>
<td>{{ task.product.dataset.name }}</td>
<td>{{ task.task_active }} </td>
<td>{{ task.task_complete }} </td>
<td>{{ task.activity_count }} </td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}