This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
atsebay.t/htdocs/views/responses.html

56 lines
1.5 KiB
HTML

<h2>
{{ survey.title }}
<small>
<span class="badge badge-danger" ng-if="survey.start_availability > now">Prévu</span>
<span class="badge badge-warning" ng-if="survey.start_availability <= now && survey.end_availability >= now">En cours</span>
<span class="badge badge-danger" ng-if="survey.end_availability < now">Clos</span>
</small>
</h2>
<div ng-controller="QuestionsController" ng-if="survey.id" ng-cloak>
<table class="table table-hover table-striped mb-5">
<thead>
<tr>
<th>Question</th>
<th>Réponses</th>
<th>Moyenne</th>
</tr>
</thead>
<tbody ng-controller="SurveyGradesController">
<tr ng-repeat="(qid,question) in questions" ng-click="showResponses()" ng-controller="ResponsesController">
<td ng-bind="question.title"></td>
<td>{{ responses.length }}</td>
<td>{{ grades[question.id] }}&nbsp;%</td>
</tr>
<tr>
<th>Moyenne</th>
<td></td>
<th>{{ mean }}&nbsp;%</th>
</tr>
</tbody>
</table>
<div ng-if="usersResponses">
<h3>Restant à corriger</h3>
<table class="table table-hover table-striped mb-5">
<thead>
<tr>
<th>Étudiant</th>
<th>Questions</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="(id_user,questions) in usersResponses" ng-click="showUserSurvey()">
<td ng-controller="UserController">{{ user.login }}</td>
<td>
<div ng-repeat="question in questions">
{{ mapQuestions[question].title }}
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>