Implement MCQ

This commit is contained in:
nemunaire 2020-03-21 00:02:18 +01:00
commit 00f196bac3
4 changed files with 221 additions and 4 deletions

View file

@ -14,7 +14,13 @@
<div class="card mb-2" ng-repeat="response in responses">
<div class="card-body">
<button class="btn btn-success ml-1 float-right" ng-click="submitCorrection()"><svg class="bi bi-check" width="1em" height="1em" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M15.854 5.646a.5.5 0 010 .708l-7 7a.5.5 0 01-.708 0l-3.5-3.5a.5.5 0 11.708-.708L8.5 12.293l6.646-6.647a.5.5 0 01.708 0z" clip-rule="evenodd"></path></svg></button>
<p class="card-text" style="white-space: pre-line" ng-bind="response.value"></p>
<p class="card-text" style="white-space: pre-line" ng-bind="response.value" ng-if="question.kind == 'text'"></p>
<div class="card-text" ng-if="question.kind == 'mcq'" ng-controller="ProposalsController">
<div class="form-group form-check" ng-repeat="proposal in proposals">
<input type="checkbox" disabled class="form-check-input" id="p{{proposal.id}}" ng-checked="response.value.indexOf(proposal.id) != -1">
<label class="form-check-label" for="p{{proposal.id}}">{{ proposal.label }}</label>
</div>
</div>
<div class="form-group">
<div class="input-group mb-1">