2022-05-31 14:41:36 +00:00
< div class = "d-flex align-items-start" >
< h2 class = "text-truncate" >
{{exercice.title}}
< small ng-if = "themes && themes[exercice.id_theme]" > < a href = "themes/{{ exercice.id_theme }}" title = "{{themes[exercice.id_theme].authors | stripHTML}}" > {{themes[exercice.id_theme].name}}< / a > < / small >
< / h2 >
2024-03-15 16:46:50 +00:00
< div class = "btn-group" role = "group" ng-if = "themes[exercice.id_theme?exercice.id_theme:'0'].exercices" >
< a href = "exercices/{{ themes[exercice.id_theme?exercice.id_theme:'0'].exercices[my_ex_num[exercice.id]-1].id }}" title = "Exercice précédent" ng-class = "{'disabled': !themes[exercice.id_theme?exercice.id_theme:'0'].exercices[my_ex_num[exercice.id]-1]}" class = "btn btn-sm btn-light" > < span class = "glyphicon glyphicon-chevron-left" aria-hidden = "true" > < / span > < / a >
< a href = "exercices/{{ themes[exercice.id_theme?exercice.id_theme:'0'].exercices[my_ex_num[exercice.id]-1+2].id }}" title = "Exercice suivant" ng-class = "{'disabled': !themes[exercice.id_theme?exercice.id_theme:'0'].exercices[my_ex_num[exercice.id]-1+2]}" class = "btn btn-sm btn-light" > < span class = "glyphicon glyphicon-chevron-right" aria-hidden = "true" > < / span > < / a >
2018-12-09 18:06:29 +00:00
< / div >
2022-05-31 14:41:36 +00:00
< div class = "ml-auto d-flex flex-row-reverse text-nowrap" >
< a href = "exercices/{{exercice.id}}/resolution" ng-disabled = "!exercice.videoURI" class = "ml-2 btn btn-sm btn-info" > < span class = "glyphicon glyphicon-facetime-video" aria-hidden = "true" > < / span > Vidéo< / a >
< a href = "exercices/{{exercice.id}}/flags" class = "ml-2 btn btn-sm btn-success" > < span class = "glyphicon glyphicon-flag" aria-hidden = "true" > < / span > Flags< / a >
< button type = "button" ng-click = "syncExo()" ng-class = "{'disabled': inSync}" class = "ml-2 btn btn-sm btn-light" > < span class = "glyphicon glyphicon-refresh" aria-hidden = "true" > < / span > Synchroniser< / button >
< a href = "{{exercice.forge_link}}" target = "_blank" class = "ml-2 btn btn-sm btn-dark" ng-if = "exercice.forge_link" > < span class = "glyphicon glyphicon-folder-open" aria-hidden = "true" > < / span > Voir sur la forge< / a >
< / div >
< / div >
2016-12-26 00:23:31 +00:00
2018-11-18 17:48:23 +00:00
< div class = "row mb-5" >
< form class = "col-md-8" ng-submit = "saveExercice()" >
< div class = "form-group row" ng-repeat = "field in fields" >
< label for = "{{ field }}" class = "col-sm-1 col-form-label-sm" > {{ field | capitalize }}< / label >
< div class = "col-sm-11" >
2024-03-18 10:26:01 +00:00
< input type = "text" class = "form-control form-control-sm" id = "{{ field }}" ng-model = "exercice[field]" ng-if = "field != 'statement' && field != 'issue' && field != 'issuekind' && field != 'overview' && field != 'resolution' && field != 'finished' && field != 'depend' && field != 'gain' && field != 'coefficient' && field != 'wip' && field != 'disabled' && field != 'background_color'" >
2023-03-20 10:23:03 +00:00
< input type = "checkbox" id = "{{ field }}" ng-model = "exercice[field]" ng-if = "field == 'wip' || field == 'disabled'" >
2018-11-21 00:19:13 +00:00
< input type = "text" class = "form-control form-control-sm" id = "{{ field }}" ng-model = "exercice[field]" ng-if = "field == 'gain'" integer >
< input type = "text" class = "form-control form-control-sm" id = "{{ field }}" ng-model = "exercice[field]" ng-if = "field == 'coefficient'" float >
2022-05-24 11:32:02 +00:00
< textarea class = "form-control form-control-sm" id = "{{field}}" ng-model = "exercice[field]" ng-if = "field == 'statement' || field == 'overview' || field == 'finished' || field == 'resolution' || field == 'issue'" > < / textarea >
2018-11-21 00:19:13 +00:00
< select class = "form-control form-control-sm" id = "{{field}}" ng-model = "exercice[field]" ng-options = "ex.id as ex.title group by ex.path.split('/')[0] for ex in exercices" ng-if = "field == 'depend'" >
2018-11-18 17:48:23 +00:00
< option value = "" > Aucune< / option >
< / select >
2018-11-21 01:20:37 +00:00
< select class = "form-control form-control-sm" id = "{{field}}" ng-model = "exercice[field]" ng-options = "v for v in ['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark']" ng-if = "field == 'issuekind'" > < / select >
2024-03-18 10:26:01 +00:00
< input type = "color" class = "form-control form-control-sm" id = "{{ field }}" ng-model = "exercice[field]" ng-if = "field == 'background_color'" color >
2018-11-18 17:48:23 +00:00
< / div >
< / div >
< div class = "text-right" ng-show = "exercice.id" >
< button type = "submit" class = "btn btn-primary" > < span class = "glyphicon glyphicon-save" aria-hidden = "true" > < / span > Save< / button >
2018-11-18 20:34:08 +00:00
< button type = "button" class = "btn btn-danger" ng-click = "deleteExercice()" > < span class = "glyphicon glyphicon-remove" aria-hidden = "true" > < / span > Delete< / button >
2018-11-18 17:48:23 +00:00
< / div >
< div class = "text-right" ng-show = "!exercice.id" >
< button type = "submit" class = "btn btn-primary" > < span class = "glyphicon glyphicon-plus" aria-hidden = "true" > < / span > Create exercice< / button >
< / div >
< / form >
2018-12-05 06:31:49 +00:00
< div class = "col-md-4 accordion" ng-show = "exercice.id" id = "accordionExercice" >
2020-01-20 09:41:21 +00:00
< div class = "mb-2" style = "overflow-y: auto; max-height: 250px" ng-controller = "ExerciceClaimsController" ng-show = "claims.length" >
< table class = "table table-sm table-hover table-striped" >
< tbody >
< tr ng-repeat = "claim in claims | orderBy: 'priority'" ng-click = "show(claim.id)" ng-class = "{'table-info': claim.priority == 'medium', 'table-warning': claim.priority == 'high', 'table-danger': claim.priority == 'critical'}" ng-if = "showClosed || (claim.state != 'closed' && claim.state != 'invalid')" >
< td ng-bind = "claim.subject" > < / td >
< td > < a ng-href = "teams/{{ claim.id_team}}" style = "background-color: {{ claim.team.color | toColor }}" ng-bind = "claim.team.name" > < / a > < / td >
< td ng-bind = "claim.state" > < / td >
< td ng-repeat = "assignee in assignees" ng-if = "assignee.id == claim.id_assignee" ng-bind = "assignee.name" > < / td >
< / tr >
< / tbody >
< / table >
< / div >
2020-01-28 13:01:13 +00:00
< div class = "card border-secondary" ng-controller = "ExerciceStatsController" >
< div class = "card-header bg-primary text-light" type = "button" data-toggle = "collapse" data-target = "#collapseStats" aria-expanded = "true" aria-controls = "collapseStats" >
< h4 class = "m-0" > < small class = "glyphicon glyphicon-chevron-right" aria-hidden = "true" > < / small > Statistiques< / h4 >
< / div >
< div class = "collapse show" id = "collapseStats" aria-labelledby = "headingStats" data-parent = "#accordionExercice" >
< dl class = "row mt-2 ml-2" >
2023-04-01 15:11:40 +00:00
< dt class = "col-sm-6 text-truncate" title = "Nombre de points actuel" > Points actuels< / dt >
< dd class = "col-sm-6" > < ng-pluralize count = "stats.current_gain" when = "{'0': '0 points', 'one': '{} point', 'other': '{} points'}" > < / ng-pluralize > < / dd >
2022-11-07 15:30:08 +00:00
< dt class = "col-sm-6 text-truncate" title = "Nombre d'équipes" > Défi tenté par< / dt >
< dd class = "col-sm-6" > < ng-pluralize count = "stats.team_tries" when = "{'0': 'aucune équipe', 'one': '{} équipe', 'other': '{} équipes'}" > < / ng-pluralize > < / dd >
2020-01-28 13:01:13 +00:00
< dt class = "col-sm-6 text-truncate" title = "Nombre de tentatives" > Nombre de tentatives< / dt >
< dd class = "col-sm-6" > < ng-pluralize count = "stats.total_tries" when = "{'0': 'aucune tentative', 'one': '{} tentative', 'other': '{} tentatives'}" > < / ng-pluralize > < / dd >
< dt class = "col-sm-6 text-truncate" title = "Défi validé par" > Défi validé par< / dt >
< dd class = "col-sm-6" > < ng-pluralize count = "stats.solved_count" when = "{'0': 'aucune équipe', 'one': '{} équipe', 'other': '{} équipes'}" > < / ng-pluralize > < / dd >
2020-01-29 14:57:34 +00:00
< dt class = "col-sm-6 text-truncate" title = "Drapeaux validés" > Drapeaux validés< / dt >
< dd class = "col-sm-6" title = "{{ stats.flag_solved }}" ng-if = "stats.flag_solved" > {{ stats.flag_solved.length }}< / dd >
< dd class = "col-sm-6" title = "{{ stats.flag_solved }}" ng-if = "!stats.flag_solved" > aucun< / dd >
< dt class = "col-sm-6 text-truncate" title = "QCM validés" > QCM validés< / dt >
< dd class = "col-sm-6" title = "{{ stats.mcq_solved }}" ng-if = "stats.mcq_solved" > {{ stats.mcq_solved.length }}< / dd >
< dd class = "col-sm-6" title = "{{ stats.mcq_solved }}" ng-if = "!stats.mcq_solved" > aucun< / dd >
2020-01-28 13:01:13 +00:00
< / dl >
< / div >
< / div >
2018-11-18 21:44:23 +00:00
< div class = "card border-secondary" ng-controller = "ExerciceFilesController" >
2018-12-05 06:31:49 +00:00
< div class = "card-header bg-secondary text-light" type = "button" data-toggle = "collapse" data-target = "#collapseFiles" aria-expanded = "true" aria-controls = "collapseFiles" >
< h4 class = "m-0" > < small class = "glyphicon glyphicon-chevron-right" aria-hidden = "true" > < / small > Téléchargements< / h4 >
2018-11-18 17:48:23 +00:00
< / div >
2018-12-05 06:31:49 +00:00
< div class = "collapse" id = "collapseFiles" aria-labelledby = "headingFiles" data-parent = "#accordionExercice" >
< div class = "list-group" >
< div class = "btn-toolbar bg-secondary justify-content-end" role = "toolbar" >
< div class = "btn-group" role = "group" >
< button type = "button" ng-click = "syncFiles()" class = "btn btn-sm btn-light" > < span class = "glyphicon glyphicon-refresh" aria-hidden = "true" > < / span > Synchroniser< / button >
< / div >
2018-11-21 00:35:10 +00:00
< / div >
2018-12-05 06:31:49 +00:00
< form ng-submit = "saveFile()" class = "list-group-item bg-light text-dark" ng-repeat = "file in files" >
< div class = "row form-group" >
< input type = "text" ng-model = "file.name" class = "col form-control form-control-sm" placeholder = "Nom de fichier" >
2022-11-21 13:56:32 +00:00
< a href = "../files{{file.path}}" class = "btn btn-sm btn-secondary col-auto" > < span class = "glyphicon glyphicon-download" aria-hidden = "true" > < / span > < / a >
2018-12-05 06:31:49 +00:00
< button type = "submit" class = "btn btn-sm btn-success col-auto" > < span class = "glyphicon glyphicon-ok" aria-hidden = "true" > < / span > < / button > < br >
< button type = "button" ng-click = "deleteFile()" class = "btn btn-sm btn-danger col-auto" > < span class = "glyphicon glyphicon-remove" aria-hidden = "true" > < / span > < / button >
< / div >
< div class = "cksum" >
Taille : < span title = "{{ file.size }} octets" > {{ file.size | size }}< / span > ‐
BLAKE2b : < samp title = "{{ file.checksum | cksum }}" > {{ file.checksum | cksum }}< / samp >
< / div >
2022-10-31 17:52:29 +00:00
< div class = "col-auto custom-control custom-checkbox" >
< input type = "checkbox" class = "custom-control-input" ng-model = "file.published" id = "f{{file.id}}" >
< label class = "custom-control-label" for = "f{{file.id}}" > Publié aux équipes< / label >
< / div >
2019-07-21 21:46:23 +00:00
< div >
Dépend de la validation de :
< span ng-if = "!file.depends" > aucun flag< / span >
< ul ng-if = "file.depends" >
2020-01-23 13:23:02 +00:00
< dependancy ng-repeat = "dep in file.depends" dep = "dep" deleteDep = "deleteFileDep" > < / dependancy >
2019-07-21 21:46:23 +00:00
< / ul >
< / div >
2018-12-05 06:31:49 +00:00
< / form >
2018-11-18 20:27:35 +00:00
< / div >
2018-11-18 17:48:23 +00:00
< / div >
2016-12-26 00:23:31 +00:00
< / div >
2018-12-05 06:31:49 +00:00
< div class = "card border-info" ng-controller = "ExerciceHintsController" >
< div class = "card-header bg-info text-light" type = "button" data-toggle = "collapse" data-target = "#collapseHints" aria-expanded = "true" aria-controls = "collapseHints" >
< h4 class = "m-0" > < small class = "glyphicon glyphicon-chevron-right" aria-hidden = "true" > < / small > Indices< / h4 >
2016-12-26 00:23:31 +00:00
< / div >
2018-12-05 06:31:49 +00:00
< div class = "collapse" id = "collapseHints" aria-labelledby = "headingHints" data-parent = "#accordionExercice" >
< div class = "list-group" >
< div class = "btn-toolbar bg-info justify-content-end" role = "toolbar" >
< div class = "btn-group" role = "group" >
< button type = "button" ng-click = "syncHints()" class = "btn btn-sm btn-light" > < span class = "glyphicon glyphicon-refresh" aria-hidden = "true" > < / span > Synchroniser< / button >
< button type = "button" ng-click = "addHint()" class = "btn btn-sm btn-primary" > < span class = "glyphicon glyphicon-plus" aria-hidden = "true" > < / span > Ajouter< / button >
< / div >
2018-11-21 00:35:10 +00:00
< / div >
2018-12-05 06:31:49 +00:00
< form ng-submit = "saveHint()" class = "list-group-item form-horizontal bg-light text-dark" ng-repeat = "hint in hints" >
< input type = "text" id = "htitle{{hint.id}}" ng-model = "hint.title" class = "form-control form-control-sm" placeholder = "Titre" >
< textarea class = "form-control form-control-sm" id = "hcnt{{hint.id}}" ng-model = "hint.content" ng-if = "!hint.file" > < / textarea >
< p ng-if = "hint.file" >
Fichier : < samp > {{ hint.file }}< / samp > < br >
Hash : < samp class = "cksum" > {{ hint.content }}< / samp > < br >
< / p >
< div class = "row" >
< div class = "col-8 input-group input-group-sm mb-3" >
< div class = "input-group-prepend" >
< span class = "input-group-text" id = "inputGroup-sizing-sm" > Coût< / span >
< / div >
< input type = "text" id = "hcost{{hint.id}}" ng-model = "hint.cost" class = "form-control" integer >
< / div >
< div class = "col-4" >
< button type = "submit" class = "btn btn-sm btn-success" > < span class = "glyphicon glyphicon-ok" aria-hidden = "true" > < / span > < / button >
< button type = "button" ng-click = "deleteHint()" class = "btn btn-sm btn-danger" ng-show = "hint.id" > < span class = "glyphicon glyphicon-remove" aria-hidden = "true" > < / span > < / button >
2018-01-07 23:17:46 +00:00
< / div >
< / div >
2020-01-23 13:23:02 +00:00
< div ng-controller = "ExerciceHintDepsController" ng-init = "init(hint)" >
Dépendances :
< ul ng-if = "deps.length > 0" >
< dependancy ng-repeat = "dep in deps" dep = "dep" > < / dependancy >
< / ul >
< span ng-if = "deps.length == 0" > sans< / span >
< / div >
2018-12-05 06:31:49 +00:00
< / form >
< / div >
2016-12-26 00:23:31 +00:00
< / div >
< / div >
2018-12-05 06:31:49 +00:00
< div class = "card border-success" ng-controller = "ExerciceFlagsController" >
< div class = "card-header bg-success text-light" type = "button" data-toggle = "collapse" data-target = "#collapseFlags" aria-expanded = "true" aria-controls = "collapseFlags" >
< h4 class = "m-0" > < small class = "glyphicon glyphicon-chevron-right" aria-hidden = "true" > < / small > Drapeaux< / h4 >
2016-12-26 00:23:31 +00:00
< / div >
2018-12-05 06:31:49 +00:00
< div class = "collapse" id = "collapseFlags" aria-labelledby = "headingFlags" data-parent = "#accordionExercice" >
< div class = "list-group" >
< div class = "btn-toolbar bg-success justify-content-end" role = "toolbar" >
< div class = "btn-group" role = "group" >
< button type = "button" ng-click = "syncFlags()" class = "btn btn-sm btn-light" > < span class = "glyphicon glyphicon-refresh" aria-hidden = "true" > < / span > Synchroniser< / button >
< button type = "button" ng-click = "addFlag()" class = "btn btn-sm btn-primary" > < span class = "glyphicon glyphicon-plus" aria-hidden = "true" > < / span > Ajouter< / button >
2016-12-27 20:08:36 +00:00
< / div >
2016-12-26 00:23:31 +00:00
< / div >
2018-12-08 02:13:16 +00:00
< div ng-repeat = "flag in flags" class = "list-group-item bg-light text-dark" >
< form ng-submit = "saveFlag()" class = "form-horizontal" >
2018-12-05 06:31:49 +00:00
< div class = "row" id = "flag-{{flag.id}}" >
< input type = "text" id = "klabel{{flag.id}}" ng-model = "flag.label" class = "col form-control form-control-sm" placeholder = "Intitulé" title = "Intitulé" >
< div class = "col-auto" ng-show = "flag.id" >
< button type = "button" ng-click = "deleteFlag()" class = "btn btn-sm btn-danger" > < span class = "glyphicon glyphicon-remove" aria-hidden = "true" > < / span > < / button >
< / div >
2016-12-27 20:08:36 +00:00
< / div >
2018-12-05 06:31:49 +00:00
< div class = "row" >
2020-09-07 17:33:09 +00:00
< input type = "text" id = "kplaceholder{{flag.id}}" ng-model = "flag.placeholder" class = "col form-control form-control-sm" placeholder = "Indication de formatage" title = "Indication de formatage" >
2018-12-05 06:31:49 +00:00
< div class = "col-auto" >
< button type = "submit" class = "btn btn-sm btn-success" > < span class = "glyphicon glyphicon-ok" aria-hidden = "true" > < / span > < / button >
< / div >
2018-11-18 17:48:23 +00:00
< / div >
2018-12-05 06:31:49 +00:00
< div class = "row" >
2019-01-21 12:35:09 +00:00
< div class = "col input-group" ng-if = "flag.id && !flag.show_raw" style = "padding:0" >
< input type = "text" id = "kvalue{{flag.id}}" ng-model = "flag.value" class = "form-control form-control-sm" placeholder = "Condensat" title = "Condensat" >
< div class = "input-group-append" >
< button class = "btn btn-sm btn-outline-secondary" ng-click = "changeValue(flag)" title = "Cliquez pour éditer la valeur brute du flag, au lieu du checksum" type = "button" > < span class = "glyphicon glyphicon-erase" aria-hidden = "true" > < / span > < / button >
< / div >
< / div >
< input type = "text" id = "kflag{{flag.id}}" ng-model = "flag.flag" class = "col form-control form-control-sm" placeholder = "Chaîne brute à valider" ng-if = "!flag.id || flag.show_raw" title = "Chaîne brute à valider" >
2018-12-05 06:31:49 +00:00
< div class = "col-auto custom-control custom-checkbox ml-1" >
< input type = "checkbox" class = "custom-control-input" id = "kicase{{flag.id}}" ng-model = "flag.ignorecase" >
< label class = "custom-control-label" for = "kicase{{flag.id}}" > Ignore case< / label >
< / div >
2020-01-16 14:33:28 +00:00
< div class = "col-auto custom-control custom-checkbox ml-1" >
2020-01-28 09:49:12 +00:00
< input type = "checkbox" class = "custom-control-input" id = "kmline{{flag.id}}" ng-model = "flag.multiline" >
2020-01-16 14:33:28 +00:00
< label class = "custom-control-label" for = "kmline{{flag.id}}" > Multiline< / label >
< / div >
2018-12-05 06:31:49 +00:00
< / div >
< div class = "row" >
< input type = "text" id = "kvre{{flag.id}}" ng-model = "flag.validator_regexp" class = "col form-control form-control-sm" placeholder = "Regexp selecting validation string" title = "Regexp selecting validation string" >
< / div >
2018-12-08 02:13:16 +00:00
< / form >
< form ng-submit = "testFlag(flag)" >
2019-01-21 12:35:09 +00:00
< div class = "input-group row" >
< input type = "text" id = "ktest{{flag.id}}" ng-model = "flag.test_str" class = "form-control form-control-sm" placeholder = "Test the flag" >
2018-12-08 02:13:16 +00:00
< div class = "input-group-append" >
< button class = "btn btn-sm btn-warning" type = "submit" > < span class = "glyphicon glyphicon-play" aria-hidden = "true" > < / span > < / button >
< / div >
< / div >
2020-01-23 13:23:02 +00:00
< div ng-controller = "ExerciceFlagDepsController" ng-init = "init(flag)" >
Dépendances :
< ul ng-if = "deps.length > 0" >
< dependancy ng-repeat = "dep in deps" dep = "dep" > < / dependancy >
< / ul >
< span ng-if = "deps.length == 0" > sans< / span >
< / div >
2018-12-08 02:13:16 +00:00
< / form >
< / div >
2018-12-05 06:31:49 +00:00
< / div >
2016-12-26 00:23:31 +00:00
< / div >
< / div >
2018-06-24 16:12:26 +00:00
2018-12-05 06:31:49 +00:00
< div class = "card border-success" ng-controller = "ExerciceMCQFlagsController" >
< div class = "card-header bg-success text-light" type = "button" data-toggle = "collapse" data-target = "#collapseQuizz" aria-expanded = "true" aria-controls = "collapseQuizz" >
< h4 class = "m-0" > < small class = "glyphicon glyphicon-chevron-right" aria-hidden = "true" > < / small > Quizz< / h4 >
2018-06-24 16:12:26 +00:00
< / div >
2018-12-05 06:31:49 +00:00
< div class = "collapse" id = "collapseQuizz" aria-labelledby = "headingQuizz" data-parent = "#accordionExercice" >
< div class = "list-group" >
< div class = "btn-toolbar bg-success justify-content-end" role = "toolbar" >
< div class = "btn-group" role = "group" >
< button type = "button" ng-click = "addQuiz()" class = "btn btn-sm btn-primary" > < span class = "glyphicon glyphicon-plus" aria-hidden = "true" > < / span > Ajouter< / button >
2018-06-24 16:12:26 +00:00
< / div >
< / div >
2018-12-05 06:31:49 +00:00
< form ng-submit = "saveQuiz()" class = "list-group-item form-horizontal bg-light text-dark" ng-repeat = "(qk,q) in quiz" >
< div class = "form-group row" id = "quiz-{{q.id}}" >
< input type = "text" id = "qlabel{{q.id}}" ng-model = "q.title" class = "col form-control" placeholder = "Intitulé" >
< div class = "col-auto" ng-show = "q.id" >
< button type = "button" ng-click = "deleteQuiz()" class = "btn btn-danger" > < span class = "glyphicon glyphicon-remove" aria-hidden = "true" > < / span > < / button >
< / div >
2018-06-24 16:12:26 +00:00
< / div >
2018-12-05 06:31:49 +00:00
< div class = "form-group row" ng-repeat = "(ck,choice) in q.entries" >
< div class = "col form-check" >
< label class = "custom-control custom-checkbox" >
< input class = "custom-control-input" type = "checkbox" ng-model = "choice.response" >
< span class = "custom-control-label" >
< input type = "text" id = "kchoice{{q.id}}-{{choice.id}}" ng-model = "choice.label" class = "form-control form-control-sm" placeholder = "Intitulé" >
< / span >
< / label >
< / div >
< div class = "col-auto" >
< button type = "button" ng-click = "deleteChoice()" class = "btn btn-sm btn-danger" > < span class = "glyphicon glyphicon-trash" aria-hidden = "true" > < / span > < / button >
< / div >
2018-06-24 16:12:26 +00:00
< / div >
2018-12-05 06:31:49 +00:00
< div class = "form-group row" >
< div class = "col-auto" >
< button type = "button" ng-click = "addChoice()" class = "btn btn-primary" > < span class = "glyphicon glyphicon-plus" aria-hidden = "true" > < / span > Ajouter un choix< / button >
< / div >
< div class = "col-auto" >
< button type = "submit" class = "btn btn-success" > < span class = "glyphicon glyphicon-ok" aria-hidden = "true" > < / span > < / button >
< / div >
2018-06-24 16:12:26 +00:00
< / div >
2020-01-23 13:23:02 +00:00
< div ng-controller = "ExerciceMCQDepsController" ng-init = "init(q)" >
Dépendances :
< ul ng-if = "deps.length > 0" >
< dependancy ng-repeat = "dep in deps" dep = "dep" > < / dependancy >
< / ul >
< span ng-if = "deps.length == 0" > sans< / span >
< / div >
2018-12-05 06:31:49 +00:00
< / form >
< / div >
2018-06-24 16:12:26 +00:00
< / div >
< / div >
2018-11-18 20:27:35 +00:00
2018-12-05 06:31:49 +00:00
< div class = "card border-warning" ng-controller = "ExerciceTagsController" >
< div class = "card-header bg-warning text-light" type = "button" data-toggle = "collapse" data-target = "#collapseTags" aria-expanded = "true" aria-controls = "collapseTags" >
< h4 class = "m-0" > < small class = "glyphicon glyphicon-chevron-right" aria-hidden = "true" > < / small > Tags< / h4 >
2018-11-18 21:44:23 +00:00
< / div >
2018-12-05 06:31:49 +00:00
< div class = "collapse" id = "collapseTags" aria-labelledby = "headingTags" data-parent = "#accordionExercice" >
< div class = "list-group" >
< div class = "btn-toolbar bg-warning justify-content-end" role = "toolbar" >
< div class = "btn-group" role = "group" >
< button type = "button" ng-click = "addTag()" class = "btn btn-sm btn-primary" > < span class = "glyphicon glyphicon-plus" aria-hidden = "true" > < / span > Ajouter< / button >
< button type = "button" ng-click = "saveTags()" class = "btn btn-sm btn-success" > < span class = "glyphicon glyphicon-ok" aria-hidden = "true" > < / span > Sauvegarder< / button >
< / div >
2018-11-21 00:35:10 +00:00
< / div >
2018-12-05 06:31:49 +00:00
< form ng-submit = "saveTags()" class = "list-group-item bg-light text-dark" >
< div class = "row form-group" ng-repeat = "(k, tag) in tags track by $index" >
< input type = "text" ng-model = "tags[k]" class = "col form-control form-control-sm" placeholder = "#tag" >
< button type = "button" ng-click = "deleteTag()" class = "btn btn-sm btn-danger col-auto" > < span class = "glyphicon glyphicon-remove" aria-hidden = "true" > < / span > < / button >
< / div >
< / form >
2018-11-21 00:35:10 +00:00
< / div >
2018-11-18 21:44:23 +00:00
< / div >
< / div >
2024-03-17 10:20:38 +00:00
< div class = "mt-2" style = "overflow-y: scroll; height: 450px" id = "exercicehistory" ng-controller = "ExerciceHistoryController" >
2024-03-17 09:19:35 +00:00
< div class = "d-flex justify-content-between align-items-start" >
< h3 > Historique< / h3 >
< div class = "btn-group" role = "group" >
2024-03-17 10:20:38 +00:00
< button type = "button" class = "btn btn-sm btn-dark" data-toggle = "modal" data-target = "#appendHistoryModal" ng-show = "logged" > < span class = "glyphicon glyphicon-plus" aria-hidden = "true" > < / span > < / button >
< button type = "button" class = "btn btn-sm btn-primary" ng-click = "refreshHistory()" > < span class = "glyphicon glyphicon-refresh" aria-hidden = "true" > < / span > < / button >
2024-03-17 09:19:35 +00:00
< / div >
< / div >
2019-07-12 17:17:17 +00:00
< table class = "table table-hover table-striped table-bordered bg-primary text-light" >
2019-02-03 21:30:29 +00:00
< tbody >
< tr ng-repeat = "row in history" ng-class = "{'bg-ffound': row.kind == 'flag_found', 'bg-mfound': row.kind == 'mcq_found', 'bg-wchoices': row.kind == 'wchoices', 'bg-success': row.kind == 'solved', 'bg-info': row.kind == 'hint', 'bg-warning': row.kind == 'tries'}" >
< td >
2019-02-03 21:40:44 +00:00
< nobr title = "{{ row.time }}" > {{ row.time | date:"mediumTime" }}< / nobr > < br > {{ row.kind }} < span ng-if = "row.kind != 'flag_found' && row.kind != 'tries' && row.kind != 'mcq_found'" > x{{ row.coefficient }}< / span >
2019-02-03 21:30:29 +00:00
< / td >
< td >
< span ng-if = "row.team_id" >
< a href = "teams/{{ row.team_id }}" > {{ row.team_name }}< / a >
< / span >
< span ng-if = "row.secondary_title" >
:
< a href = "exercices/{{ row.primary }}#key-{{ row.secondary }}" ng-if = "row.kind == 'flag_found' || row.kind == 'wchoices'" > {{ row.secondary_title }}< / a >
< a href = "exercices/{{ row.primary }}#quizz-{{ row.secondary }}" ng-if = "row.kind == 'mcq_found'" > {{ row.secondary_title }}< / a >
< a href = "exercices/{{ row.primary }}#hint-{{ row.secondary }}" ng-if = "row.kind == 'hint'" > {{ row.secondary_title }}< / a >
< / span >
< span ng-if = "!row.secondary_title && row.secondary && row.kind != 'solved'" > : {{ row.secondary }}< / span >
< / td >
2024-03-17 10:20:38 +00:00
< td style = "vertical-align: middle; padding: 0; background-color: {{ row.team_color }}" ng-show = "logged" >
2019-07-12 17:17:17 +00:00
< button type = "button" data-toggle = "modal" data-target = "#updHistory" ng-if = "row.kind != 'flag_found' && row.kind != 'tries' && row.kind != 'mcq_found'" data-idteam = "{{ row.team_id }}" data-kind = "{{ row.kind }}" data-time = "{{ row.time }}" data-secondary = "{{ row.secondary }}" data-coeff = "{{ row.coefficient }}" class = "float-right btn btn-sm btn-info" > < span class = "glyphicon glyphicon-edit" aria-hidden = "true" > < / span > < / button >
2019-02-03 21:30:29 +00:00
< button type = "button" ng-click = "delHistory(row)" class = "float-right btn btn-sm btn-danger" > < span class = "glyphicon glyphicon-remove" aria-hidden = "true" > < / span > < / button >
< / td >
< / tr >
< / tbody >
< / table >
2019-07-12 17:17:17 +00:00
< div class = "modal fade" id = "updHistory" tabindex = "-1" role = "dialog" >
< div class = "modal-dialog" role = "document" >
< div class = "modal-content bg-light" >
< div class = "modal-header" >
< h5 class = "modal-title" > Édition de l'historique< / h5 >
< button type = "button" class = "close" data-dismiss = "modal" aria-label = "Close" >
< span aria-hidden = "true" > × < / span >
< / button >
< / div >
< div class = "modal-body" >
< form ng-submit = "updHistory()" >
< div class = "form-group" >
< label for = "historycoeff" > Coefficient< / label >
< input class = "form-control" id = "historycoeff" >
< / div >
< / form >
< / div >
< div class = "modal-footer" >
< button type = "button" class = "btn btn-secondary" data-dismiss = "modal" > Annuler< / button >
< button type = "button" class = "btn btn-primary" ng-click = "updHistory()" > Mettre à jour< / button >
< / div >
< / div >
< / div >
< / div >
2019-02-03 21:30:29 +00:00
< / div >
2016-12-26 00:23:31 +00:00
< / div >
< / div >
2019-07-12 17:17:17 +00:00
< script >
$('#updHistory').on('shown.bs.modal', function (event) {
var button = $(event.relatedTarget);
var modal = $(this);
modal.data('idteam', button.data('idteam'));
modal.data('kind', button.data('kind'));
modal.data('time', button.data('time'));
modal.data('secondary', button.data('secondary'));
modal.data('coeff', button.data('coeff'));
$('#historycoeff').val(button.data('coeff'));
$('#historycoeff').focus();
});
< / script >
2024-03-17 09:19:35 +00:00
< div class = "modal fade" id = "appendHistoryModal" tabindex = "-1" role = "dialog" >
< div class = "modal-dialog" role = "document" >
< div class = "modal-content bg-light" >
< div class = "modal-header" >
< h5 class = "modal-title" > Ajout d'une entrée dans l'historique< / h5 >
< button type = "button" class = "close" data-dismiss = "modal" aria-label = "Close" >
< span aria-hidden = "true" > × < / span >
< / button >
< / div >
< form ng-submit = "historyAppend()" >
< div class = "modal-body" >
< div class = "form-group row" >
< label for = "labelflag" class = "col-md-3 col-form-label" > Exercice< / label >
< div class = "col-md-9" >
< input type = "text" readonly class = "form-control-plaintext" value = "{{ exercice.title }}" >
< / div >
< / div >
< div class = "form-group row" >
< label for = "tteam" class = "col-md-3 col-form-label" > Équipe< / label >
< div class = "col-md-9" ng-controller = "TeamsListController" >
< select class = "custom-select custom-select-sm" id = "tteam" ng-model = "selectedTeam" ng-options = "t.id as t.name for t in teams" > < / select >
< / div >
< / div >
< div class = "form-group row" >
< label for = "tteam" class = "col-md-3 col-form-label" > Type d'événement< / label >
< div class = "col-md-9" >
< select class = "custom-select custom-select-sm" id = "historyEvent" ng-model = "selectedEvent" >
< option value = "tries" > Tentative< / option >
< option value = "hint" > Indice dévoilé< / option >
< option value = "wchoices" > Liste de choix affichée< / option >
< option value = "flag_found" > Flag trouvé< / option >
< option value = "mcq_found" > QCM validé< / option >
< option value = "solved" > Exercice terminé< / option >
< / select >
< / div >
< / div >
< div class = "form-group row" ng-if = "selectedEvent == 'hint'" >
< label for = "tteam" class = "col-md-3 col-form-label" > Indice< / label >
< div class = "col-md-9" ng-controller = "ExerciceHintsController" >
< select class = "custom-select custom-select-sm" id = "historySecondaryHint" ng-model = "selectedSecondaryHint" ng-options = "h.id as h.title for h in hints" > < / select >
< / div >
< / div >
< div class = "form-group row" ng-if = "selectedEvent == 'wchoices' || selectedEvent == 'flag_found'" >
< label for = "tteam" class = "col-md-3 col-form-label" > Flag< / label >
< div class = "col-md-9" ng-controller = "ExerciceFlagsController" >
< select class = "custom-select custom-select-sm" id = "historySecondaryFlag" ng-model = "selectedSecondaryFlag" ng-options = "f.id as f.label for f in flags" > < / select >
< / div >
< / div >
< div class = "form-group row" ng-if = "selectedEvent == 'mcq_found'" >
< label for = "tteam" class = "col-md-3 col-form-label" > QCM< / label >
< div class = "col-md-9" ng-controller = "ExerciceMCQFlagsController" >
< select class = "custom-select custom-select-sm" id = "historySecondaryQuiz" ng-model = "selectedSecondaryFlag" ng-options = "q.id as q.title for q in quiz" > < / select >
< / div >
< / div >
< div class = "modal-footer" >
< button type = "button" class = "btn btn-secondary" data-dismiss = "modal" > Annuler< / button >
< button type = "submit" class = "btn btn-primary" > Enregistrer< / button >
< / div >
< / div >
< / form >
< / div >
< / div >
< / div >
< script >
$('#appendHistoryModal').on('shown.bs.modal', function (event) {
$('#tteam').trigger('focus');
});
< / script >