{"action":"created","issue":{"url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/2205","labels_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/2205/labels{/name}","comments_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/2205/comments","events_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/2205/events","html_url":"https://github.com/zestedesavoir/zds-site/issues/2205","id":56343005,"number":2205,"title":"Du code mort et faux à supprimer dans les tutoriels","user":{"login":"firm1","id":6066015,"avatar_url":"https://avatars.githubusercontent.com/u/6066015?v=3","gravatar_id":"","url":"https://api.github.com/users/firm1","html_url":"https://github.com/firm1","followers_url":"https://api.github.com/users/firm1/followers","following_url":"https://api.github.com/users/firm1/following{/other_user}","gists_url":"https://api.github.com/users/firm1/gists{/gist_id}","starred_url":"https://api.github.com/users/firm1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firm1/subscriptions","organizations_url":"https://api.github.com/users/firm1/orgs","repos_url":"https://api.github.com/users/firm1/repos","events_url":"https://api.github.com/users/firm1/events{/privacy}","received_events_url":"https://api.github.com/users/firm1/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/zestedesavoir/zds-site/labels/BUG","name":"BUG","color":"e11d21"},{"url":"https://api.github.com/repos/zestedesavoir/zds-site/labels/Facile","name":"Facile","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-03T07:20:53Z","updated_at":"2015-02-03T07:32:41Z","closed_at":null,"body":"Fonction incriminée 1 : [view_tutorial](https://github.com/zestedesavoir/zds-site/blob/dev/zds/tutorial/views.py#L796)\r\nFonction incriminée 2 : [export_tutorial_to_md](https://github.com/zestedesavoir/zds-site/blob/f3851a4cf4260c8022dc077f096950e00d1f3da1/zds/utils/tutorials.py#L116)\r\n\r\nIl s'agit dans les deux cas, de la ligne `chapter[\"position_in_tutorial\"] = cpt_c * cpt_p` à supprimer.\r\n\r\nElle est fausse car ici `cpt_c` représente le numéro du chapitre et `cpt_p` le numéro de la partie : \r\n\r\nSi on considère l'exemple suivant : \r\n\r\n```\r\np1\r\n\tc1.1 : 1\r\n\tc1.2 : 2\r\n\tc1.3 : 3\r\np2\r\n\tc2.1 : 4\r\n\tc2.2 : 5\r\n\tc2.3 : 6\r\n\tc2.4 : 7\r\np3\r\n\tc2.5 : 8\r\n\tc2.6 : 9\r\n\tc2.7 : 10\r\n\tc2.8 : 11\r\n```\r\n\r\non se rend bien compte le chapitre c2.1 à la position 4 dans le tutoriel, alors que d'après le code, le chapitre 2.1 à la position `2x1 = 2` dans le tutoriel.\r\n\r\nLe code étant inutilisé dans les templates, on peut le supprimer"},"comment":{"url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/comments/72606632","html_url":"https://github.com/zestedesavoir/zds-site/issues/2205#issuecomment-72606632","issue_url":"https://api.github.com/repos/zestedesavoir/zds-site/issues/2205","id":72606632,"user":{"login":"Eskimon","id":761168,"avatar_url":"https://avatars.githubusercontent.com/u/761168?v=3","gravatar_id":"","url":"https://api.github.com/users/Eskimon","html_url":"https://github.com/Eskimon","followers_url":"https://api.github.com/users/Eskimon/followers","following_url":"https://api.github.com/users/Eskimon/following{/other_user}","gists_url":"https://api.github.com/users/Eskimon/gists{/gist_id}","starred_url":"https://api.github.com/users/Eskimon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eskimon/subscriptions","organizations_url":"https://api.github.com/users/Eskimon/orgs","repos_url":"https://api.github.com/users/Eskimon/repos","events_url":"https://api.github.com/users/Eskimon/events{/privacy}","received_events_url":"https://api.github.com/users/Eskimon/received_events","type":"User","site_admin":false},"created_at":"2015-02-03T07:32:41Z","updated_at":"2015-02-03T07:32:41Z","body":"Est-ce que la ZEP-12 ne va pas s'en occuper ?"}}