{"action":"created","issue":{"url":"https://api.github.com/repos/Minigugus/CodinSchool/issues/29","repository_url":"https://api.github.com/repos/Minigugus/CodinSchool","labels_url":"https://api.github.com/repos/Minigugus/CodinSchool/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/Minigugus/CodinSchool/issues/29/comments","events_url":"https://api.github.com/repos/Minigugus/CodinSchool/issues/29/events","html_url":"https://github.com/Minigugus/CodinSchool/issues/29","id":419591492,"node_id":"MDU6SXNzdWU0MTk1OTE0OTI=","number":29,"title":"Champs \"Code de départ\" dans un exercice","user":{"login":"rigwild","id":26366184,"node_id":"MDQ6VXNlcjI2MzY2MTg0","avatar_url":"https://avatars3.githubusercontent.com/u/26366184?v=4","gravatar_id":"","url":"https://api.github.com/users/rigwild","html_url":"https://github.com/rigwild","followers_url":"https://api.github.com/users/rigwild/followers","following_url":"https://api.github.com/users/rigwild/following{/other_user}","gists_url":"https://api.github.com/users/rigwild/gists{/gist_id}","starred_url":"https://api.github.com/users/rigwild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rigwild/subscriptions","organizations_url":"https://api.github.com/users/rigwild/orgs","repos_url":"https://api.github.com/users/rigwild/repos","events_url":"https://api.github.com/users/rigwild/events{/privacy}","received_events_url":"https://api.github.com/users/rigwild/received_events","type":"User","site_admin":false},"labels":[{"id":1058633192,"node_id":"MDU6TGFiZWwxMDU4NjMzMTky","url":"https://api.github.com/repos/Minigugus/CodinSchool/labels/enhancement","name":"enhancement","color":"a2eeef","default":true},{"id":1058633196,"node_id":"MDU6TGFiZWwxMDU4NjMzMTk2","url":"https://api.github.com/repos/Minigugus/CodinSchool/labels/question","name":"question","color":"d876e3","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-03-11T17:25:11Z","updated_at":"2019-03-17T11:41:21Z","closed_at":null,"author_association":"COLLABORATOR","body":"## Proposition\r\nLa partie exercice n'est pas terminée. Cependant, je pense qu'il pourrait être intéressant de rajouter un champs `codeDeDepart` donnant la possibilité au rédacteur d'exercice de donner un morceau de code tout prêt.\r\n\r\n## Problème\r\n - Comment gérer si plusieurs langages sont autorisés pour un même exercice ?\r\n - Un code par défaut pour chaque langage doit donc être prévu si le rédacteur ne souhaite pas en fournir ?\r\n\r\n## Solution proposée\r\nAjouter un champs `codeDeDepart` de type JSON en base de données, retournant un objet du type suivant :\r\n```json\r\n{\r\n  \"JavaScript\": \"console.log('Hello world')\",\r\n  \"PHP\": \"<?php echo 'Hello world'; ?>\"\r\n}\r\n```\r\nConcernant les codes par défaut des langages, nous pouvons les stocker en dur côté client pour ne pas surcharger la base de données de données fixes.\r\n"},"comment":{"url":"https://api.github.com/repos/Minigugus/CodinSchool/issues/comments/473657402","html_url":"https://github.com/Minigugus/CodinSchool/issues/29#issuecomment-473657402","issue_url":"https://api.github.com/repos/Minigugus/CodinSchool/issues/29","id":473657402,"node_id":"MDEyOklzc3VlQ29tbWVudDQ3MzY1NzQwMg==","user":{"login":"Minigugus","id":43109623,"node_id":"MDQ6VXNlcjQzMTA5NjIz","avatar_url":"https://avatars2.githubusercontent.com/u/43109623?v=4","gravatar_id":"","url":"https://api.github.com/users/Minigugus","html_url":"https://github.com/Minigugus","followers_url":"https://api.github.com/users/Minigugus/followers","following_url":"https://api.github.com/users/Minigugus/following{/other_user}","gists_url":"https://api.github.com/users/Minigugus/gists{/gist_id}","starred_url":"https://api.github.com/users/Minigugus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Minigugus/subscriptions","organizations_url":"https://api.github.com/users/Minigugus/orgs","repos_url":"https://api.github.com/users/Minigugus/repos","events_url":"https://api.github.com/users/Minigugus/events{/privacy}","received_events_url":"https://api.github.com/users/Minigugus/received_events","type":"User","site_admin":false},"created_at":"2019-03-17T11:41:21Z","updated_at":"2019-03-17T11:41:21Z","author_association":"OWNER","body":"Cela me semble une bonne idée. En attendant l'ajout de cette fonctionnalité, tu peux effectivement stocker les codes de base côté client.\r\n\r\nExemple en C :\r\n```c\r\n#include <stdio.h>\r\n\r\nint main()\r\n{\r\n  // Votre code ici.\r\n  return 0;\r\n}\r\n```"}}
{"actor":{"display_login":"Minigugus"}}