118 lines
9.9 KiB
HTML
118 lines
9.9 KiB
HTML
|
<nav role="navigation">
|
||
|
<ol class="breadcrumb">
|
||
|
<li ng-repeat="(k,exercice) in themes[current_theme].exercices" class="breadcrumb-item" ng-class="{active: k == current_exercice, disabled: !my.exercices[k]}">
|
||
|
<a ng-if="(k != current_exercice && !my.exercices[k])">{{ exercice.title }}</a>
|
||
|
<a ng-href="{{ themes[current_theme].urlid }}/{{ themes[current_theme].exercices[k].urlid }}" ng-if="(k != current_exercice && my.exercices[k])" ng-class="{'text-success': my.exercices[k].solved}">
|
||
|
{{ exercice.title }}
|
||
|
<span class="glyphicon glyphicon-gift" aria-hidden="true" ng-if="themes[current_theme].exercices[k].curcoeff > 1.0"></span>
|
||
|
<span class="glyphicon glyphicon-ok text-success" aria-hidden="true" ng-if="(my.team_id && my.exercices[k].solved)"></span>
|
||
|
</a>
|
||
|
<strong ng-if="k == current_exercice" class="text-info">
|
||
|
{{ exercice.title }}
|
||
|
<span class="glyphicon glyphicon-gift" aria-hidden="true" ng-if="themes[current_theme].exercices[k].curcoeff > 1.0"></span>
|
||
|
<span class="glyphicon glyphicon-ok text-success" aria-hidden="true" ng-if="(my.team_id && my.exercices[k].solved)"></span>
|
||
|
</strong>
|
||
|
</li>
|
||
|
</ol>
|
||
|
</nav>
|
||
|
|
||
|
<div class="alert alert-warning mt-3" ng-if="!(my.exercices[current_exercice])">
|
||
|
Vous n'avez pas encore accès à cet exercice.
|
||
|
</div>
|
||
|
<div class="jumbotron niceborder text-indent mt-3" ng-if="!(my.exercices[current_exercice])">
|
||
|
<p class="lead text-justify" ng-bind-html="themes[current_theme].headline"></p>
|
||
|
<p class="text-justify" ng-bind-html="themes[current_theme].intro"></p>
|
||
|
</div>
|
||
|
<div class="jumbotron niceborder text-indent mt-3" ng-if="(my.exercices[current_exercice])">
|
||
|
<h3 class="display-4">{{ themes[current_theme].exercices[current_exercice].title }}</h3>
|
||
|
<a ng-href="tags/{{tag}}" class="badge badge-pill badge-secondary mr-2 mb-2" ng-repeat="tag in themes[current_theme].exercices[current_exercice].tags">#{{ tag }}</a>
|
||
|
<p class="lead text-justify" ng-bind-html="my.exercices[current_exercice].statement"></p>
|
||
|
<div class="alert alert-{{my.exercices[current_exercice].issuekind}}" ng-if="my.exercices[current_exercice].issue" ng-bind-html="my.exercices[current_exercice].issue"></div>
|
||
|
<hr class="my-3">
|
||
|
<div class="row">
|
||
|
<div class="col">
|
||
|
<ul>
|
||
|
<li><strong>Gain :</strong> <ng-pluralize count="themes[current_theme].exercices[current_exercice].gain" when="{'one': '{} point', 'other': '{} points'}"></ng-pluralize> <em ng-if="settings.firstBlood && themes[current_theme].exercices[current_exercice].solved < 1">{{ 1 + settings.firstBlood | coeff }} prem's</em> <em ng-if="themes[current_theme].exercices[current_exercice].curcoeff != 1.0 || settings.exerciceCurrentCoefficient != 1.0">{{ themes[current_theme].exercices[current_exercice].curcoeff * settings.exerciceCurrentCoefficient | coeff }} bonus</em></li>
|
||
|
<li ng-if="themes[current_theme].exercices[current_exercice].tried"><strong>Tenté par :</strong> <ng-pluralize count="themes[current_theme].exercices[current_exercice].tried" when="{'0': 'aucune équipe', 'one': '{} équipe', 'other': '{} équipes'}"></ng-pluralize> <span ng-if="my.exercices[current_exercice].total_tries">(cumulant <ng-pluralize count="my.exercices[current_exercice].total_tries" when="{'one': '{} tentative', 'other': '{} tentatives'}"></ng-pluralize>)</span></li>
|
||
|
<li><strong>Résolu par :</strong> <ng-pluralize count="themes[current_theme].exercices[current_exercice].solved" when="{'0': 'aucune équipe', 'one': '{} équipe', 'other': '{} équipes'}"></ng-pluralize></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="col list-group">
|
||
|
<a ng-href="{{ file.path }}" target="_self" class="list-group-item" ng-repeat="file in my.exercices[current_exercice].files">
|
||
|
<h1 class="float-left" style="margin: 7px 7px 5px -5px"><span class="glyphicon glyphicon-download" aria-hidden="true"></span></h1>
|
||
|
<h4 class="list-group-item-heading"><strong><samp>{{ file.name }}</samp></strong></h4>
|
||
|
<p class="list-group-item-text"><nobr>Taille : <span title="{{ file.size }} octets">{{ file.size | size }}</span></nobr> – <nobr><span title="blake2.net">b2sum</span> : <samp class="cksum" title="{{ file.checksum }}">{{ file.checksum }}</samp></nobr></p>
|
||
|
</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="mt-2" ng-controller="SubmissionController">
|
||
|
<div class="card border-info" ng-if="my.exercices[current_exercice] && !(my.exercices[current_exercice].solved)">
|
||
|
<div class="card-header bg-info text-white">
|
||
|
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> NSEC – Réinitialisation de mot de passe
|
||
|
</div>
|
||
|
<ul class="list-group" ng-if="(my.exercices[current_exercice].tries || my.exercices[current_exercice].submitted || sberr)">
|
||
|
<li class="list-group-item text-warning" ng-if="my.exercices[current_exercice].solved_time && my.exercices[current_exercice].tries"><ng-pluralize count="my.exercices[current_exercice].tries" when="{'one': '{} tentative effectuée', 'other': '{} tentatives effectuées'}"></ng-pluralize>. Dernière tentative envoyée à {{ my.exercices[current_exercice].solved_time | date:"mediumTime" }}. <span ng-if="my.exercices[current_exercice].solve_dist"><ng-pluralize count="my.exercices[current_exercice].solve_dist" when="{'one': '{} réponse erronée', 'other': '{} réponses erronées'}"></ng-pluralize>.</span></li>
|
||
|
<li class="list-group-item" ng-class="messageClass" ng-if="my.exercices[current_exercice].submitted || sberr"><strong ng-if="!sberr">Votre demande de réinitialisation de mot de passe a bien été envoyée !</strong><strong ng-if="sberr">{{ sberr }}</strong> {{ message }}</li>
|
||
|
<li class="list-group-item text-danger" ng-if="my.exercices[current_exercice].timeouted"><strong>Oops</strong> La requête a dépassé le délai d'attente. Vous devriez réessayer dans quelques instant…</li>
|
||
|
</ul>
|
||
|
<div class="card-body" ng-if="!my.exercices[current_exercice].submitted || sberr">
|
||
|
<form ng-submit="ssubmit()">
|
||
|
<flag-key ng-repeat="(kid,key) in my.exercices[current_exercice].flags" kid="kid" key="key" settings="settings" wantchoices="wantchoices"></flag-key>
|
||
|
|
||
|
<div class="form-group" ng-repeat="(k,mcq) in my.exercices[current_exercice].mcqs">
|
||
|
<p ng-if="mcq.title"><span ng-class="{'text-light': !mcq.found}">{{ mcq.title }}</span> <span class="glyphicon glyphicon-ok form-control-feedback text-success" aria-hidden="true" ng-if="mcq.solved" title="QCM réussi à {{ mcq.solved | date:'mediumTime'}}"></span></p>
|
||
|
<div class="form-check">
|
||
|
<div class="custom-control custom-checkbox" ng-repeat="(cid,choice) in mcq.choices" ng-if="!mcq.solved || mcq.justify">
|
||
|
<input class="custom-control-input" type="checkbox" id="mcq_{{k}}_{{cid}}" name="mcq_{{k}}_{{cid}}" ng-model="choice.value" ng-disabled="choice.disabled">
|
||
|
<label class="custom-control-label" for="mcq_{{k}}_{{cid}}" ng-bind="choice.label"></label>
|
||
|
<flag-key kid="cid" key="choice.justification" settings="settings" wantchoices="wantchoices" ng-if="choice.value && mcq.justify && (!choice.justification || !choice.justification.solved)"></flag-key>
|
||
|
<span ng-if="choice.value && mcq.justify && choice.solved" ng-bind="choice.justify"></span>
|
||
|
<span class="glyphicon glyphicon-ok form-control-feedback text-success" aria-hidden="true" ng-if="choice.solved" title="Flag trouvé !"></span>
|
||
|
</div>
|
||
|
</div>
|
||
|
<hr>
|
||
|
</div>
|
||
|
|
||
|
<div class="form-group text-right">
|
||
|
<button type="submit" class="btn btn-info" id="sbmt">Réinitialiser le mot de passe</button>
|
||
|
</div>
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="card border-success" ng-if="my.exercices[current_exercice].solved">
|
||
|
<div class="card-header bg-success text-white">
|
||
|
<span class="glyphicon glyphicon-flag" aria-hidden="true"></span> NSEC – Réinitialisation de mot de passe
|
||
|
</div>
|
||
|
<div class="card-body">
|
||
|
<p class="card-text" ng-if="my.exercices[current_exercice].finished" ng-bind-html="my.exercices[current_exercice].finished"></p>
|
||
|
<hr ng-if="my.exercices[current_exercice].finished">
|
||
|
<p class="card-text font-italic" ng-if="my.exercices[current_exercice].solved_rank">
|
||
|
Vous êtes la {{ my.exercices[current_exercice].solved_rank }}<sup><ng-pluralize count="my.exercices[current_exercice].solved_rank" when="{'one': 're', 'other': 'e'}"></ng-pluralize></sup> équipe à avoir résolu ce défi à {{ my.exercices[current_exercice].solved_time | date:"mediumTime" }}. Vous avez marqué <ng-pluralize count="my.exercices[current_exercice].gain" when="{'one': '{} point', 'other': '{} points'}"></ng-pluralize> !
|
||
|
</p>
|
||
|
<p class="card-text font-italic" ng-if="!my.exercices[current_exercice].solved_rank">
|
||
|
Bravo, vous avez résolu ce défi à {{ my.exercices[current_exercice].solved_time | date:"mediumTime" }}. Vous marquez <ng-pluralize count="my.exercices[current_exercice].gain" when="{'one': '{} point', 'other': '{} points'}"></ng-pluralize> !
|
||
|
</p>
|
||
|
<hr ng-if="my.exercices[current_exercice].finished && themes[current_theme].exercices[current_exercice].next">
|
||
|
<a href="{{ themes[current_theme].urlid }}/{{ themes[current_theme].exercices[themes[current_theme].exercices[current_exercice].next].urlid }}" class="btn btn-success" ng-if="themes[current_theme].exercices[current_exercice].next">Se connecter</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="card border-success mt-2" ng-if="my.exercices[current_exercice].video_uri">
|
||
|
<div class="card-header bg-success text-white">
|
||
|
<span class="glyphicon glyphicon-blackboard" aria-hidden="true"></span> Solution du défi
|
||
|
</div>
|
||
|
<div class="card-body">
|
||
|
<div class="embed-responsive embed-responsive-16by9">
|
||
|
<iframe type="text/html" ng-src="{{ my.exercices[current_exercice].video_uri }}" class="embed-responsive-item">
|
||
|
Regardez la vidéo de résolution de ce défi : <a ng-href="{{ my.exercices[current_exercice].video_uri }}">{{ my.exercices[current_exercice].video_uri }}</a>.
|
||
|
</iframe>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|