{"action":"created","issue":{"url":"https://api.github.com/repos/serlo-org/athene2/issues/289","repository_url":"https://api.github.com/repos/serlo-org/athene2","labels_url":"https://api.github.com/repos/serlo-org/athene2/issues/289/labels{/name}","comments_url":"https://api.github.com/repos/serlo-org/athene2/issues/289/comments","events_url":"https://api.github.com/repos/serlo-org/athene2/issues/289/events","html_url":"https://github.com/serlo-org/athene2/pull/289","id":136906985,"number":289,"title":"WIP Multiple Choice / Single Choice exercises","user":{"login":"inyono","id":1508477,"avatar_url":"https://avatars.githubusercontent.com/u/1508477?v=3","gravatar_id":"","url":"https://api.github.com/users/inyono","html_url":"https://github.com/inyono","followers_url":"https://api.github.com/users/inyono/followers","following_url":"https://api.github.com/users/inyono/following{/other_user}","gists_url":"https://api.github.com/users/inyono/gists{/gist_id}","starred_url":"https://api.github.com/users/inyono/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inyono/subscriptions","organizations_url":"https://api.github.com/users/inyono/orgs","repos_url":"https://api.github.com/users/inyono/repos","events_url":"https://api.github.com/users/inyono/events{/privacy}","received_events_url":"https://api.github.com/users/inyono/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/serlo-org/athene2/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-27T11:01:50Z","updated_at":"2016-02-27T13:01:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/serlo-org/athene2/pulls/289","html_url":"https://github.com/serlo-org/athene2/pull/289","diff_url":"https://github.com/serlo-org/athene2/pull/289.diff","patch_url":"https://github.com/serlo-org/athene2/pull/289.patch"},"body":"First draft for the entity type for multiple choice / single choice exercises.\r\n\r\n## New type `choice-exercise`\r\n\r\nRepresents a multiple choice / single choice exercise. It consists of three fields:\r\n* `type` determines whether the exercise is MC or SC\r\n* `content` for the assignment itself\r\n* `changes` like other entities.\r\n\r\nMoreover, it may have to types of children:\r\n* one or more `choice-exercise-choice` that each represent a single choice\r\n* one `text-hint` that represents a hint like in other types of exercises\r\n\r\n## New type `choice-exercise-choise`\r\n\r\nRepresents a choice of a multiple choice / single choice exercise. It consists of three fields:\r\n* `correct` states whether this choice is a correct solution or a wrong choice\r\n* `content` for the content of the choice itself\r\n* `changes` like other entities.\r\n\r\nMoreover, it may have a `text-hint` child like in other types of exercises. We could use this for feedback and stuff. Maybe add a new type for this to make the difference to other hints clear.\r\n\r\nMissing stuff:\r\n* [ ] No forms yet (we have to decide whether we wait for the editor abstraction)\r\n* [ ] No templates yet (design pending)\r\n* [ ] Probably not everything right yet. E.g., the `choice-exercise-choice` should have a link to its parent (like `course-page`s do)\r\n\r\nFeedback welcome!"},"comment":{"url":"https://api.github.com/repos/serlo-org/athene2/issues/comments/189633788","html_url":"https://github.com/serlo-org/athene2/pull/289#issuecomment-189633788","issue_url":"https://api.github.com/repos/serlo-org/athene2/issues/289","id":189633788,"user":{"login":"arekkas","id":3372410,"avatar_url":"https://avatars.githubusercontent.com/u/3372410?v=3","gravatar_id":"","url":"https://api.github.com/users/arekkas","html_url":"https://github.com/arekkas","followers_url":"https://api.github.com/users/arekkas/followers","following_url":"https://api.github.com/users/arekkas/following{/other_user}","gists_url":"https://api.github.com/users/arekkas/gists{/gist_id}","starred_url":"https://api.github.com/users/arekkas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arekkas/subscriptions","organizations_url":"https://api.github.com/users/arekkas/orgs","repos_url":"https://api.github.com/users/arekkas/repos","events_url":"https://api.github.com/users/arekkas/events{/privacy}","received_events_url":"https://api.github.com/users/arekkas/received_events","type":"User","site_admin":false},"created_at":"2016-02-27T13:01:33Z","updated_at":"2016-02-27T13:01:33Z","body":"So what I would do is write a simple template (and a jquery extension (e.g. bound to class `text-exercise-choice`) which checks on click of a submit button if the checked boxes match the `data-correct-choice` is set / true.\r\n\r\nBut by saying that I realize that, because we need to generate the submit button only once, this needs a little bit more thought. My current idea would be, for example, to check in the text-exercise template if children of type text-exercise-choice exist and if yes, render a \"submit\" / \"check solution\" button"}}