2018-11-25 02:08:07 +00:00
< 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 >
2018-11-28 03:22:20 +00:00
< 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}" >
2018-11-25 02:08:07 +00:00
{{ exercice.title }}
< span class = "glyphicon glyphicon-gift" aria-hidden = "true" ng-if = "themes[current_theme].exercices[k].curcoeff > 1.0" > < / span >
2018-11-28 01:27:51 +00:00
< span class = "glyphicon glyphicon-ok text-success" aria-hidden = "true" ng-if = "(my.team_id && my.exercices[k].solved)" > < / span >
2018-11-25 02:08:07 +00:00
< / a >
2018-11-28 03:22:20 +00:00
< 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 >
2018-11-25 02:08:07 +00:00
< / li >
< / ol >
< / nav >
2018-11-25 04:41:46 +00:00
< div class = "alert alert-warning mt-3" ng-if = "!(my.exercices[current_exercice])" >
2018-11-25 02:08:07 +00:00
Vous n'avez pas encore accès à cet exercice.
< / div >
2018-12-01 23:45:22 +00:00
< div class = "jumbotron niceborder text-indent mt-3" ng-if = "!(my.exercices[current_exercice])" >
2018-12-02 10:43:24 +00:00
< 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 >
2018-11-25 02:08:07 +00:00
< / div >
2018-12-01 23:45:22 +00:00
< div class = "jumbotron niceborder text-indent mt-3" ng-if = "(my.exercices[current_exercice])" >
2018-11-25 02:08:07 +00:00
< 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" >
< 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" > {{ themes[current_theme].exercices[current_exercice].curcoeff | coeff }} bonus< / em > < / 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 = "row" >
2018-11-25 04:41:46 +00:00
< div class = "col-xl mb-5" ng-if = "(my.exercices[current_exercice] && my.exercices[current_exercice].files.length)" >
< div class = "card" >
2018-11-25 02:08:07 +00:00
< div class = "card-header text-white" >
< span class = "glyphicon glyphicon-download-alt" aria-hidden = "true" > < / span > Téléchargements
< / div >
< div class = "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 >
2018-11-25 04:41:46 +00:00
< div class = "col-xl mb-5" ng-if = "(my.exercices[current_exercice] && my.exercices[current_exercice].hints.length)" >
< div class = "card border-info" >
2018-11-25 02:08:07 +00:00
< div class = "card-header bg-info text-white" >
< span class = "glyphicon glyphicon-lamp" aria-hidden = "true" > < / span > Indices
< / div >
2018-12-01 15:13:53 +00:00
< div class = "card-body" ng-if = "hinterror" >
< div class = "card-text text-danger" ng-bind = "hinterror" > < / div >
< / div >
2018-11-25 02:08:07 +00:00
< div class = "list-group" >
< a target = "_self" class = "list-group-item text-light" ng-repeat = "hint in my.exercices[current_exercice].hints" ng-href = "{{ hint.file }}" >
< button type = "button" ng-click = "hsubmit(hint)" class = "float-right btn btn-info" ng-if = "!(hint.content || hint.file)" ng-class = "{disabled: hint.submitted}" > < span class = "glyphicon glyphicon-lock" aria-hidden = "true" > < / span > Débloquer< / button >
< button type = "button" ng-click = "hint.hidden = false;" class = "float-right btn btn-info" ng-if = "!hint.file && hint.hidden" > < span class = "glyphicon glyphicon-lock" aria-hidden = "true" > < / span > Afficher< / button >
< h1 class = "float-left" style = "margin: 5px 7px 5px -5px" ng-if = "hint.file" > < span class = "glyphicon glyphicon-download" aria-hidden = "true" > < / span > < / h1 >
< h4 class = "list-group-item-heading" > {{ hint.title }}< / h4 >
< p class = "list-group-item-text" ng-if = "!hint.file && hint.content && !hint.hidden" ng-bind-html = "hint.content" > < / p >
< p class = "list-group-item-text" ng-if = "hint.file" > Cliquez ici pour télécharger l'indice. < samp class = "cksum" title = "Somme de contrôle BLAKE2b : {{ hint.content }}" > {{ hint.content }}< / samp > < / p >
< p class = "list-group-item-text" ng-if = "!hint.file && !hint.content && (hint.hidden === true || hint.hidden === undefined)" > Débloquer cet indice vous fera perdre < ng-pluralize count = "hint.cost" when = "{'one': '{} point', 'other': '{} points'}" > < / ng-pluralize > .< / p >
< / a >
< / div >
< / div >
< / div >
2018-12-01 23:45:22 +00:00
< div class = "col-xl mb-5" ng-controller = "SubmissionController" >
2018-11-28 03:15:14 +00:00
< div class = "card border-danger" ng-if = "my.exercices[current_exercice] && !(my.exercices[current_exercice].solved)" >
2018-11-25 02:08:07 +00:00
< div class = "card-header bg-danger text-white" >
< span class = "glyphicon glyphicon-flag" aria-hidden = "true" > < / span > Faire son rapport
< / div >
< ul class = "list-group" ng-if = "(my.exercices[current_exercice].tries || my.exercices[current_exercice].submitted || sberr)" >
2018-11-28 03:15:14 +00:00
< 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 solution 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 >
2018-11-25 02:08:07 +00:00
< li class = "list-group-item" ng-class = "messageClass" ng-if = "my.exercices[current_exercice].submitted || sberr" > < strong ng-if = "!sberr" > Votre solution a bien été envoyée !< / strong > < strong ng-if = "sberr" > {{ sberr }}< / strong > {{ message }}< / li >
< / ul >
< div class = "card-body" ng-if = "!my.exercices[current_exercice].submitted || sberr" >
2018-12-01 23:45:22 +00:00
< form ng-submit = "ssubmit()" >
2018-11-28 01:27:51 +00:00
< div class = "form-group" ng-repeat = "(kid,key) in my.exercices[current_exercice].flags" >
< label for = "sol_{{ kid }}" > {{ key.label }} :< / label >
2018-12-02 00:24:38 +00:00
< span ng-if = "key.found && key.value" ng-bind = "key.value" > < / span >
2018-12-02 22:18:32 +00:00
< div class = "input-group" >
< input type = "text" class = "form-control" id = "sol_{{ kid }}" autocomplete = "off" name = "sol_{{ kid }}" ng-model = "key.value" ng-if = "!key.found && !key.choices" >
< select class = "custom-select" id = "sol_{{ kid }}" name = "sol_{{ kid }}" ng-model = "key.value" ng-if = "!key.found && key.choices" ng-options = "l as v for (l, v) in key.choices" > < / select >
< div class = "input-group-append" ng-if = "key.choices_cost" >
< button class = "btn btn-success" type = "button" ng-click = "wantchoices(kid)" ng-class = "{disabled: key.wcsubmitted}" title = "Cliquez pour échanger ce champ de texte par une liste de choix. L'opération vous coûtera {{ key.choices_cost }} points." >
< span class = "glyphicon glyphicon-tasks" aria-hidden = "true" > < / span >
Liste de propositions ({{ key.choices_cost }} points)
< / button >
< / div >
< / div >
2018-11-28 03:15:14 +00:00
< small class = "form-text text-muted" ng-if = "!key.found && key.help.length > 0" ng-bind = "key.help" > < / small >
2018-11-28 01:27:51 +00:00
< span class = "glyphicon glyphicon-ok form-control-feedback text-success" aria-hidden = "true" ng-if = "key.found" title = "Flag trouvé à {{ key.found | date:'mediumTime'}}" > < / span >
2018-11-25 02:08:07 +00:00
< / div >
2018-11-28 01:27:51 +00:00
< div class = "form-check" ng-repeat = "(k,mcq) in my.exercices[current_exercice].mcqs" >
< p ng-if = "mcq.title" > {{ mcq.title }} < 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 >
2018-12-02 00:24:38 +00:00
< div class = "custom-control custom-checkbox" ng-repeat = "(cid,choice) in mcq.choices" ng-if = "!mcq.solved || mcq.justify" >
2018-11-28 05:39:38 +00:00
< input class = "custom-control-input" type = "checkbox" id = "mcq_{{k}}_{{cid}}" name = "mcq_{{k}}_{{cid}}" ng-model = "choice.value" ng-disabled = "choice.disabled" >
2018-11-25 02:08:07 +00:00
< label class = "custom-control-label" for = "mcq_{{k}}_{{cid}}" ng-bind = "choice.label" > < / label >
2018-12-02 03:52:15 +00:00
< input type = "text" class = "form-control" autocomplete = "off" placeholder = "{{ choice.help }}" name = "sol_{{ cid }}" ng-model = "choice.justify" ng-if = "choice.value && mcq.justify && !choice.solved" >
2018-12-02 00:24:38 +00:00
< span ng-if = "choice.value && mcq.justify && choice.solved" ng-bind = "choice.justify" > < / span >
2018-11-28 05:39:38 +00:00
< span class = "glyphicon glyphicon-ok form-control-feedback text-success" aria-hidden = "true" ng-if = "choice.solved" title = "Flag trouvé !" > < / span >
2018-11-25 02:08:07 +00:00
< / div >
< hr >
< / div >
< div class = "form-group text-right" >
< button type = "submit" class = "btn btn-danger" id = "sbmt" > Soumettre< / button >
< / div >
< / form >
< / div >
< / div >
2018-11-28 03:15:14 +00:00
< div class = "card border-success" ng-if = "my.exercices[current_exercice].solved" >
2018-11-25 02:08:07 +00:00
< div class = "card-header bg-success text-white" >
2018-12-02 17:24:26 +00:00
< span class = "glyphicon glyphicon-flag" aria-hidden = "true" > < / span > Défi réussi !
2018-11-25 02:08:07 +00:00
< / div >
< div class = "card-body" >
< p class = "card-text" >
2018-12-02 17:24:26 +00:00
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 > !
2018-11-25 02:08:07 +00:00
< / p >
2018-12-02 16:53:26 +00:00
< hr ng-if = "my.exercices[current_exercice].finished" >
< 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 && themes[current_theme].exercices[current_exercice].next" >
2018-12-02 17:24:26 +00:00
< 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" > Passer au défi suivant< / a >
2018-11-25 02:08:07 +00:00
< / div >
< / div >
2018-11-28 03:15:14 +00:00
< div class = "card border-success mt-2" ng-if = "my.exercices[current_exercice].video_uri" >
2018-11-25 02:08:07 +00:00
< div class = "card-header bg-success text-white" >
2018-12-02 17:24:26 +00:00
< span class = "glyphicon glyphicon-blackboard" aria-hidden = "true" > < / span > Solution du défi
2018-11-25 02:08:07 +00:00
< / div >
< div class = "card-body" >
< div class = "embed-responsive embed-responsive-16by9" >
2018-11-28 03:15:14 +00:00
< iframe type = "text/html" ng-src = "{{ my.exercices[current_exercice].video_uri }}" class = "embed-responsive-item" >
2018-12-02 17:24:26 +00:00
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 > .
2018-11-25 02:08:07 +00:00
< / iframe >
< / div >
< / div >
< / div >
< / div >
< / div >