{"action":"created","comment":{"url":"https://api.github.com/repos/easygenerator/new-simple/pulls/comments/235784536","pull_request_review_id":177723989,"id":235784536,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTc4NDUzNg==","diff_hunk":"@@ -0,0 +1,50 @@\n+import { getQuestion } from 'store/questions/selectors';\n+\n+export const getUserAnswers = (state, questionId) => {\n+  const question = getQuestion(state, questionId);\n+  if (question.type === 'dragAndDropText') {\n+    return question.dropspots.map(dropspot => ({\n+      id: dropspot.id,\n+      text: dropspot.text,\n+      x: dropspot.x,\n+      y: dropspot.y\n+    }));\n+  }\n+};\n+\n+export const getBackground = (state, questionId) => {\n+  const question = getQuestion(state, questionId);\n+  return question.background;\n+};\n+\n+export const getUserResponse = (state, questionId) => {\n+  const question = getQuestion(state, questionId);\n+  return question.response;\n+};\n+\n+export const getScore = question => {\n+  let userAnswers = [];\n+  let originalAnswers = question.dropspots.map(answer => ({\n+    id: answer.id,\n+    text: answer.text\n+  }));\n+\n+  if (question.response.length && !question.response[0].items.length) {\n+    question.response.forEach(list => {\n+      if (list.id !== 'no-selected-elements') {","path":"src/store/questions/dragAndDropText/selectors.js","position":34,"original_position":34,"commit_id":"4d5e4b16a46ddc3da9fd7f0c2c0f99202900cca6","original_commit_id":"4d5e4b16a46ddc3da9fd7f0c2c0f99202900cca6","user":{"login":"oleksandrbulakh","id":21334486,"node_id":"MDQ6VXNlcjIxMzM0NDg2","avatar_url":"https://avatars1.githubusercontent.com/u/21334486?v=4","gravatar_id":"","url":"https://api.github.com/users/oleksandrbulakh","html_url":"https://github.com/oleksandrbulakh","followers_url":"https://api.github.com/users/oleksandrbulakh/followers","following_url":"https://api.github.com/users/oleksandrbulakh/following{/other_user}","gists_url":"https://api.github.com/users/oleksandrbulakh/gists{/gist_id}","starred_url":"https://api.github.com/users/oleksandrbulakh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oleksandrbulakh/subscriptions","organizations_url":"https://api.github.com/users/oleksandrbulakh/orgs","repos_url":"https://api.github.com/users/oleksandrbulakh/repos","events_url":"https://api.github.com/users/oleksandrbulakh/events{/privacy}","received_events_url":"https://api.github.com/users/oleksandrbulakh/received_events","type":"User","site_admin":false},"body":"use constants instead of 'no-selected-elements'","created_at":"2018-11-22T16:45:52Z","updated_at":"2018-11-22T16:49:53Z","html_url":"https://github.com/easygenerator/new-simple/pull/37#discussion_r235784536","pull_request_url":"https://api.github.com/repos/easygenerator/new-simple/pulls/37","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/easygenerator/new-simple/pulls/comments/235784536"},"html":{"href":"https://github.com/easygenerator/new-simple/pull/37#discussion_r235784536"},"pull_request":{"href":"https://api.github.com/repos/easygenerator/new-simple/pulls/37"}}},"pull_request":{"url":"https://api.github.com/repos/easygenerator/new-simple/pulls/37","id":232971616,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyOTcxNjE2","html_url":"https://github.com/easygenerator/new-simple/pull/37","diff_url":"https://github.com/easygenerator/new-simple/pull/37.diff","patch_url":"https://github.com/easygenerator/new-simple/pull/37.patch","issue_url":"https://api.github.com/repos/easygenerator/new-simple/issues/37","number":37,"state":"open","locked":false,"title":"Feature/dnd text question type","user":{"login":"IhorBakirov","id":7105996,"node_id":"MDQ6VXNlcjcxMDU5OTY=","avatar_url":"https://avatars1.githubusercontent.com/u/7105996?v=4","gravatar_id":"","url":"https://api.github.com/users/IhorBakirov","html_url":"https://github.com/IhorBakirov","followers_url":"https://api.github.com/users/IhorBakirov/followers","following_url":"https://api.github.com/users/IhorBakirov/following{/other_user}","gists_url":"https://api.github.com/users/IhorBakirov/gists{/gist_id}","starred_url":"https://api.github.com/users/IhorBakirov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IhorBakirov/subscriptions","organizations_url":"https://api.github.com/users/IhorBakirov/orgs","repos_url":"https://api.github.com/users/IhorBakirov/repos","events_url":"https://api.github.com/users/IhorBakirov/events{/privacy}","received_events_url":"https://api.github.com/users/IhorBakirov/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-22T13:00:29Z","updated_at":"2018-11-22T16:49:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b989455c1d5973dd676f760f86d79919ee177d2e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/easygenerator/new-simple/pulls/37/commits","review_comments_url":"https://api.github.com/repos/easygenerator/new-simple/pulls/37/comments","review_comment_url":"https://api.github.com/repos/easygenerator/new-simple/pulls/comments{/number}","comments_url":"https://api.github.com/repos/easygenerator/new-simple/issues/37/comments","statuses_url":"https://api.github.com/repos/easygenerator/new-simple/statuses/4d5e4b16a46ddc3da9fd7f0c2c0f99202900cca6","head":{"label":"easygenerator:feature/dnd-text-question-type","ref":"feature/dnd-text-question-type","sha":"4d5e4b16a46ddc3da9fd7f0c2c0f99202900cca6","user":{"login":"easygenerator","id":8294182,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgyOTQxODI=","avatar_url":"https://avatars3.githubusercontent.com/u/8294182?v=4","gravatar_id":"","url":"https://api.github.com/users/easygenerator","html_url":"https://github.com/easygenerator","followers_url":"https://api.github.com/users/easygenerator/followers","following_url":"https://api.github.com/users/easygenerator/following{/other_user}","gists_url":"https://api.github.com/users/easygenerator/gists{/gist_id}","starred_url":"https://api.github.com/users/easygenerator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/easygenerator/subscriptions","organizations_url":"https://api.github.com/users/easygenerator/orgs","repos_url":"https://api.github.com/users/easygenerator/repos","events_url":"https://api.github.com/users/easygenerator/events{/privacy}","received_events_url":"https://api.github.com/users/easygenerator/received_events","type":"Organization","site_admin":false},"repo":{"id":114232380,"node_id":"MDEwOlJlcG9zaXRvcnkxMTQyMzIzODA=","name":"new-simple","full_name":"easygenerator/new-simple","private":false,"owner":{"login":"easygenerator","id":8294182,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgyOTQxODI=","avatar_url":"https://avatars3.githubusercontent.com/u/8294182?v=4","gravatar_id":"","url":"https://api.github.com/users/easygenerator","html_url":"https://github.com/easygenerator","followers_url":"https://api.github.com/users/easygenerator/followers","following_url":"https://api.github.com/users/easygenerator/following{/other_user}","gists_url":"https://api.github.com/users/easygenerator/gists{/gist_id}","starred_url":"https://api.github.com/users/easygenerator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/easygenerator/subscriptions","organizations_url":"https://api.github.com/users/easygenerator/orgs","repos_url":"https://api.github.com/users/easygenerator/repos","events_url":"https://api.github.com/users/easygenerator/events{/privacy}","received_events_url":"https://api.github.com/users/easygenerator/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/easygenerator/new-simple","description":null,"fork":false,"url":"https://api.github.com/repos/easygenerator/new-simple","forks_url":"https://api.github.com/repos/easygenerator/new-simple/forks","keys_url":"https://api.github.com/repos/easygenerator/new-simple/keys{/key_id}","collaborators_url":"https://api.github.com/repos/easygenerator/new-simple/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/easygenerator/new-simple/teams","hooks_url":"https://api.github.com/repos/easygenerator/new-simple/hooks","issue_events_url":"https://api.github.com/repos/easygenerator/new-simple/issues/events{/number}","events_url":"https://api.github.com/repos/easygenerator/new-simple/events","assignees_url":"https://api.github.com/repos/easygenerator/new-simple/assignees{/user}","branches_url":"https://api.github.com/repos/easygenerator/new-simple/branches{/branch}","tags_url":"https://api.github.com/repos/easygenerator/new-simple/tags","blobs_url":"https://api.github.com/repos/easygenerator/new-simple/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/easygenerator/new-simple/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/easygenerator/new-simple/git/refs{/sha}","trees_url":"https://api.github.com/repos/easygenerator/new-simple/git/trees{/sha}","statuses_url":"https://api.github.com/repos/easygenerator/new-simple/statuses/{sha}","languages_url":"https://api.github.com/repos/easygenerator/new-simple/languages","stargazers_url":"https://api.github.com/repos/easygenerator/new-simple/stargazers","contributors_url":"https://api.github.com/repos/easygenerator/new-simple/contributors","subscribers_url":"https://api.github.com/repos/easygenerator/new-simple/subscribers","subscription_url":"https://api.github.com/repos/easygenerator/new-simple/subscription","commits_url":"https://api.github.com/repos/easygenerator/new-simple/commits{/sha}","git_commits_url":"https://api.github.com/repos/easygenerator/new-simple/git/commits{/sha}","comments_url":"https://api.github.com/repos/easygenerator/new-simple/comments{/number}","issue_comment_url":"https://api.github.com/repos/easygenerator/new-simple/issues/comments{/number}","contents_url":"https://api.github.com/repos/easygenerator/new-simple/contents/{+path}","compare_url":"https://api.github.com/repos/easygenerator/new-simple/compare/{base}...{head}","merges_url":"https://api.github.com/repos/easygenerator/new-simple/merges","archive_url":"https://api.github.com/repos/easygenerator/new-simple/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/easygenerator/new-simple/downloads","issues_url":"https://api.github.com/repos/easygenerator/new-simple/issues{/number}","pulls_url":"https://api.github.com/repos/easygenerator/new-simple/pulls{/number}","milestones_url":"https://api.github.com/repos/easygenerator/new-simple/milestones{/number}","notifications_url":"https://api.github.com/repos/easygenerator/new-simple/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/easygenerator/new-simple/labels{/name}","releases_url":"https://api.github.com/repos/easygenerator/new-simple/releases{/id}","deployments_url":"https://api.github.com/repos/easygenerator/new-simple/deployments","created_at":"2017-12-14T09:48:56Z","updated_at":"2018-11-22T14:03:51Z","pushed_at":"2018-11-22T15:01:18Z","git_url":"git://github.com/easygenerator/new-simple.git","ssh_url":"git@github.com:easygenerator/new-simple.git","clone_url":"https://github.com/easygenerator/new-simple.git","svn_url":"https://github.com/easygenerator/new-simple","homepage":null,"size":4373,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"easygenerator:master","ref":"master","sha":"ae8b78e35cc648aa9e7ac28d17b9fabcec45402e","user":{"login":"easygenerator","id":8294182,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgyOTQxODI=","avatar_url":"https://avatars3.githubusercontent.com/u/8294182?v=4","gravatar_id":"","url":"https://api.github.com/users/easygenerator","html_url":"https://github.com/easygenerator","followers_url":"https://api.github.com/users/easygenerator/followers","following_url":"https://api.github.com/users/easygenerator/following{/other_user}","gists_url":"https://api.github.com/users/easygenerator/gists{/gist_id}","starred_url":"https://api.github.com/users/easygenerator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/easygenerator/subscriptions","organizations_url":"https://api.github.com/users/easygenerator/orgs","repos_url":"https://api.github.com/users/easygenerator/repos","events_url":"https://api.github.com/users/easygenerator/events{/privacy}","received_events_url":"https://api.github.com/users/easygenerator/received_events","type":"Organization","site_admin":false},"repo":{"id":114232380,"node_id":"MDEwOlJlcG9zaXRvcnkxMTQyMzIzODA=","name":"new-simple","full_name":"easygenerator/new-simple","private":false,"owner":{"login":"easygenerator","id":8294182,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgyOTQxODI=","avatar_url":"https://avatars3.githubusercontent.com/u/8294182?v=4","gravatar_id":"","url":"https://api.github.com/users/easygenerator","html_url":"https://github.com/easygenerator","followers_url":"https://api.github.com/users/easygenerator/followers","following_url":"https://api.github.com/users/easygenerator/following{/other_user}","gists_url":"https://api.github.com/users/easygenerator/gists{/gist_id}","starred_url":"https://api.github.com/users/easygenerator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/easygenerator/subscriptions","organizations_url":"https://api.github.com/users/easygenerator/orgs","repos_url":"https://api.github.com/users/easygenerator/repos","events_url":"https://api.github.com/users/easygenerator/events{/privacy}","received_events_url":"https://api.github.com/users/easygenerator/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/easygenerator/new-simple","description":null,"fork":false,"url":"https://api.github.com/repos/easygenerator/new-simple","forks_url":"https://api.github.com/repos/easygenerator/new-simple/forks","keys_url":"https://api.github.com/repos/easygenerator/new-simple/keys{/key_id}","collaborators_url":"https://api.github.com/repos/easygenerator/new-simple/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/easygenerator/new-simple/teams","hooks_url":"https://api.github.com/repos/easygenerator/new-simple/hooks","issue_events_url":"https://api.github.com/repos/easygenerator/new-simple/issues/events{/number}","events_url":"https://api.github.com/repos/easygenerator/new-simple/events","assignees_url":"https://api.github.com/repos/easygenerator/new-simple/assignees{/user}","branches_url":"https://api.github.com/repos/easygenerator/new-simple/branches{/branch}","tags_url":"https://api.github.com/repos/easygenerator/new-simple/tags","blobs_url":"https://api.github.com/repos/easygenerator/new-simple/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/easygenerator/new-simple/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/easygenerator/new-simple/git/refs{/sha}","trees_url":"https://api.github.com/repos/easygenerator/new-simple/git/trees{/sha}","statuses_url":"https://api.github.com/repos/easygenerator/new-simple/statuses/{sha}","languages_url":"https://api.github.com/repos/easygenerator/new-simple/languages","stargazers_url":"https://api.github.com/repos/easygenerator/new-simple/stargazers","contributors_url":"https://api.github.com/repos/easygenerator/new-simple/contributors","subscribers_url":"https://api.github.com/repos/easygenerator/new-simple/subscribers","subscription_url":"https://api.github.com/repos/easygenerator/new-simple/subscription","commits_url":"https://api.github.com/repos/easygenerator/new-simple/commits{/sha}","git_commits_url":"https://api.github.com/repos/easygenerator/new-simple/git/commits{/sha}","comments_url":"https://api.github.com/repos/easygenerator/new-simple/comments{/number}","issue_comment_url":"https://api.github.com/repos/easygenerator/new-simple/issues/comments{/number}","contents_url":"https://api.github.com/repos/easygenerator/new-simple/contents/{+path}","compare_url":"https://api.github.com/repos/easygenerator/new-simple/compare/{base}...{head}","merges_url":"https://api.github.com/repos/easygenerator/new-simple/merges","archive_url":"https://api.github.com/repos/easygenerator/new-simple/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/easygenerator/new-simple/downloads","issues_url":"https://api.github.com/repos/easygenerator/new-simple/issues{/number}","pulls_url":"https://api.github.com/repos/easygenerator/new-simple/pulls{/number}","milestones_url":"https://api.github.com/repos/easygenerator/new-simple/milestones{/number}","notifications_url":"https://api.github.com/repos/easygenerator/new-simple/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/easygenerator/new-simple/labels{/name}","releases_url":"https://api.github.com/repos/easygenerator/new-simple/releases{/id}","deployments_url":"https://api.github.com/repos/easygenerator/new-simple/deployments","created_at":"2017-12-14T09:48:56Z","updated_at":"2018-11-22T14:03:51Z","pushed_at":"2018-11-22T15:01:18Z","git_url":"git://github.com/easygenerator/new-simple.git","ssh_url":"git@github.com:easygenerator/new-simple.git","clone_url":"https://github.com/easygenerator/new-simple.git","svn_url":"https://github.com/easygenerator/new-simple","homepage":null,"size":4373,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/easygenerator/new-simple/pulls/37"},"html":{"href":"https://github.com/easygenerator/new-simple/pull/37"},"issue":{"href":"https://api.github.com/repos/easygenerator/new-simple/issues/37"},"comments":{"href":"https://api.github.com/repos/easygenerator/new-simple/issues/37/comments"},"review_comments":{"href":"https://api.github.com/repos/easygenerator/new-simple/pulls/37/comments"},"review_comment":{"href":"https://api.github.com/repos/easygenerator/new-simple/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/easygenerator/new-simple/pulls/37/commits"},"statuses":{"href":"https://api.github.com/repos/easygenerator/new-simple/statuses/4d5e4b16a46ddc3da9fd7f0c2c0f99202900cca6"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"oleksandrbulakh"}}