{"action":"created","comment":{"url":"https://api.github.com/repos/UH-StudentServices/hul-survey/pulls/comments/107459073","pull_request_review_id":28410501,"id":107459073,"diff_hunk":"@@ -44,6 +48,31 @@ export default class Survey extends React.Component {\n     });\n   }\n \n+  handleChange(questionId, questionResponse) {\n+    this.setState(prevState => ({\n+      questionResponses: prevState.questionResponses.set(questionId,\n+        { questionId, questionResponse })\n+    }));\n+  }\n+\n+  handleSubmit(event) {\n+    const surveyResponse = { questionResponses: [] };\n+\n+    this.state.questionResponses.forEach(value => surveyResponse.questionResponses.push(value));\n+\n+    fetch(`${CONFIG.API_URL}/api/surveys/1/responses`, {  // eslint-disable-line no-undef","path":"client/src/components/Survey/index.jsx","position":30,"original_position":30,"commit_id":"671cc1064e09453e933564200e3d5b960f2d87b8","original_commit_id":"671cc1064e09453e933564200e3d5b960f2d87b8","user":{"login":"hheiskanen","id":6654979,"avatar_url":"https://avatars3.githubusercontent.com/u/6654979?v=3","gravatar_id":"","url":"https://api.github.com/users/hheiskanen","html_url":"https://github.com/hheiskanen","followers_url":"https://api.github.com/users/hheiskanen/followers","following_url":"https://api.github.com/users/hheiskanen/following{/other_user}","gists_url":"https://api.github.com/users/hheiskanen/gists{/gist_id}","starred_url":"https://api.github.com/users/hheiskanen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hheiskanen/subscriptions","organizations_url":"https://api.github.com/users/hheiskanen/orgs","repos_url":"https://api.github.com/users/hheiskanen/repos","events_url":"https://api.github.com/users/hheiskanen/events{/privacy}","received_events_url":"https://api.github.com/users/hheiskanen/received_events","type":"User","site_admin":false},"body":"Ei saa kovakoodata surveyn id:tä polkuun.","created_at":"2017-03-22T16:14:26Z","updated_at":"2017-03-22T16:17:09Z","html_url":"https://github.com/UH-StudentServices/hul-survey/pull/13#discussion_r107459073","pull_request_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/UH-StudentServices/hul-survey/pulls/comments/107459073"},"html":{"href":"https://github.com/UH-StudentServices/hul-survey/pull/13#discussion_r107459073"},"pull_request":{"href":"https://api.github.com/repos/UH-StudentServices/hul-survey/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/UH-StudentServices/hul-survey/pulls/13","id":111763130,"html_url":"https://github.com/UH-StudentServices/hul-survey/pull/13","diff_url":"https://github.com/UH-StudentServices/hul-survey/pull/13.diff","patch_url":"https://github.com/UH-StudentServices/hul-survey/pull/13.patch","issue_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/issues/13","number":13,"state":"open","locked":false,"title":"HUL-76 Save survey response to the backend","user":{"login":"jiivonen","id":2620356,"avatar_url":"https://avatars2.githubusercontent.com/u/2620356?v=3","gravatar_id":"","url":"https://api.github.com/users/jiivonen","html_url":"https://github.com/jiivonen","followers_url":"https://api.github.com/users/jiivonen/followers","following_url":"https://api.github.com/users/jiivonen/following{/other_user}","gists_url":"https://api.github.com/users/jiivonen/gists{/gist_id}","starred_url":"https://api.github.com/users/jiivonen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiivonen/subscriptions","organizations_url":"https://api.github.com/users/jiivonen/orgs","repos_url":"https://api.github.com/users/jiivonen/repos","events_url":"https://api.github.com/users/jiivonen/events{/privacy}","received_events_url":"https://api.github.com/users/jiivonen/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-03-21T12:07:53Z","updated_at":"2017-03-22T16:17:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d3d8d9ebf01b2d7411b9fbed5c62ce628706fe1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/pulls/13/commits","review_comments_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/pulls/13/comments","review_comment_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/pulls/comments{/number}","comments_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/issues/13/comments","statuses_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/statuses/671cc1064e09453e933564200e3d5b960f2d87b8","head":{"label":"UH-StudentServices:hul76-send-survey-response","ref":"hul76-send-survey-response","sha":"671cc1064e09453e933564200e3d5b960f2d87b8","user":{"login":"UH-StudentServices","id":11271527,"avatar_url":"https://avatars2.githubusercontent.com/u/11271527?v=3","gravatar_id":"","url":"https://api.github.com/users/UH-StudentServices","html_url":"https://github.com/UH-StudentServices","followers_url":"https://api.github.com/users/UH-StudentServices/followers","following_url":"https://api.github.com/users/UH-StudentServices/following{/other_user}","gists_url":"https://api.github.com/users/UH-StudentServices/gists{/gist_id}","starred_url":"https://api.github.com/users/UH-StudentServices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UH-StudentServices/subscriptions","organizations_url":"https://api.github.com/users/UH-StudentServices/orgs","repos_url":"https://api.github.com/users/UH-StudentServices/repos","events_url":"https://api.github.com/users/UH-StudentServices/events{/privacy}","received_events_url":"https://api.github.com/users/UH-StudentServices/received_events","type":"Organization","site_admin":false},"repo":{"id":81943977,"name":"hul-survey","full_name":"UH-StudentServices/hul-survey","owner":{"login":"UH-StudentServices","id":11271527,"avatar_url":"https://avatars2.githubusercontent.com/u/11271527?v=3","gravatar_id":"","url":"https://api.github.com/users/UH-StudentServices","html_url":"https://github.com/UH-StudentServices","followers_url":"https://api.github.com/users/UH-StudentServices/followers","following_url":"https://api.github.com/users/UH-StudentServices/following{/other_user}","gists_url":"https://api.github.com/users/UH-StudentServices/gists{/gist_id}","starred_url":"https://api.github.com/users/UH-StudentServices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UH-StudentServices/subscriptions","organizations_url":"https://api.github.com/users/UH-StudentServices/orgs","repos_url":"https://api.github.com/users/UH-StudentServices/repos","events_url":"https://api.github.com/users/UH-StudentServices/events{/privacy}","received_events_url":"https://api.github.com/users/UH-StudentServices/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/UH-StudentServices/hul-survey","description":"This repository contains the source code for the back-end component of the student survey and feedback features of the HowULearn system (initially only HowUStudy feature set).","fork":false,"url":"https://api.github.com/repos/UH-StudentServices/hul-survey","forks_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/forks","keys_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/teams","hooks_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/hooks","issue_events_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/issues/events{/number}","events_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/events","assignees_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/assignees{/user}","branches_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/branches{/branch}","tags_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/tags","blobs_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/git/refs{/sha}","trees_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/statuses/{sha}","languages_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/languages","stargazers_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/stargazers","contributors_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/contributors","subscribers_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/subscribers","subscription_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/subscription","commits_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/commits{/sha}","git_commits_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/git/commits{/sha}","comments_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/comments{/number}","issue_comment_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/issues/comments{/number}","contents_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/contents/{+path}","compare_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/merges","archive_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/downloads","issues_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/issues{/number}","pulls_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/pulls{/number}","milestones_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/milestones{/number}","notifications_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/labels{/name}","releases_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/releases{/id}","deployments_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/deployments","created_at":"2017-02-14T12:40:52Z","updated_at":"2017-02-21T09:03:36Z","pushed_at":"2017-03-22T14:58:32Z","git_url":"git://github.com/UH-StudentServices/hul-survey.git","ssh_url":"git@github.com:UH-StudentServices/hul-survey.git","clone_url":"https://github.com/UH-StudentServices/hul-survey.git","svn_url":"https://github.com/UH-StudentServices/hul-survey","homepage":"","size":512,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"base":{"label":"UH-StudentServices:develop","ref":"develop","sha":"2f84a5d33cca3328e220a40d0b832c932ff5cf50","user":{"login":"UH-StudentServices","id":11271527,"avatar_url":"https://avatars2.githubusercontent.com/u/11271527?v=3","gravatar_id":"","url":"https://api.github.com/users/UH-StudentServices","html_url":"https://github.com/UH-StudentServices","followers_url":"https://api.github.com/users/UH-StudentServices/followers","following_url":"https://api.github.com/users/UH-StudentServices/following{/other_user}","gists_url":"https://api.github.com/users/UH-StudentServices/gists{/gist_id}","starred_url":"https://api.github.com/users/UH-StudentServices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UH-StudentServices/subscriptions","organizations_url":"https://api.github.com/users/UH-StudentServices/orgs","repos_url":"https://api.github.com/users/UH-StudentServices/repos","events_url":"https://api.github.com/users/UH-StudentServices/events{/privacy}","received_events_url":"https://api.github.com/users/UH-StudentServices/received_events","type":"Organization","site_admin":false},"repo":{"id":81943977,"name":"hul-survey","full_name":"UH-StudentServices/hul-survey","owner":{"login":"UH-StudentServices","id":11271527,"avatar_url":"https://avatars2.githubusercontent.com/u/11271527?v=3","gravatar_id":"","url":"https://api.github.com/users/UH-StudentServices","html_url":"https://github.com/UH-StudentServices","followers_url":"https://api.github.com/users/UH-StudentServices/followers","following_url":"https://api.github.com/users/UH-StudentServices/following{/other_user}","gists_url":"https://api.github.com/users/UH-StudentServices/gists{/gist_id}","starred_url":"https://api.github.com/users/UH-StudentServices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UH-StudentServices/subscriptions","organizations_url":"https://api.github.com/users/UH-StudentServices/orgs","repos_url":"https://api.github.com/users/UH-StudentServices/repos","events_url":"https://api.github.com/users/UH-StudentServices/events{/privacy}","received_events_url":"https://api.github.com/users/UH-StudentServices/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/UH-StudentServices/hul-survey","description":"This repository contains the source code for the back-end component of the student survey and feedback features of the HowULearn system (initially only HowUStudy feature set).","fork":false,"url":"https://api.github.com/repos/UH-StudentServices/hul-survey","forks_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/forks","keys_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/teams","hooks_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/hooks","issue_events_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/issues/events{/number}","events_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/events","assignees_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/assignees{/user}","branches_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/branches{/branch}","tags_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/tags","blobs_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/git/refs{/sha}","trees_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/statuses/{sha}","languages_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/languages","stargazers_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/stargazers","contributors_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/contributors","subscribers_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/subscribers","subscription_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/subscription","commits_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/commits{/sha}","git_commits_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/git/commits{/sha}","comments_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/comments{/number}","issue_comment_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/issues/comments{/number}","contents_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/contents/{+path}","compare_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/merges","archive_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/downloads","issues_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/issues{/number}","pulls_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/pulls{/number}","milestones_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/milestones{/number}","notifications_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/labels{/name}","releases_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/releases{/id}","deployments_url":"https://api.github.com/repos/UH-StudentServices/hul-survey/deployments","created_at":"2017-02-14T12:40:52Z","updated_at":"2017-02-21T09:03:36Z","pushed_at":"2017-03-22T14:58:32Z","git_url":"git://github.com/UH-StudentServices/hul-survey.git","ssh_url":"git@github.com:UH-StudentServices/hul-survey.git","clone_url":"https://github.com/UH-StudentServices/hul-survey.git","svn_url":"https://github.com/UH-StudentServices/hul-survey","homepage":"","size":512,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/UH-StudentServices/hul-survey/pulls/13"},"html":{"href":"https://github.com/UH-StudentServices/hul-survey/pull/13"},"issue":{"href":"https://api.github.com/repos/UH-StudentServices/hul-survey/issues/13"},"comments":{"href":"https://api.github.com/repos/UH-StudentServices/hul-survey/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/UH-StudentServices/hul-survey/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/UH-StudentServices/hul-survey/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/UH-StudentServices/hul-survey/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/UH-StudentServices/hul-survey/statuses/671cc1064e09453e933564200e3d5b960f2d87b8"}}}}
{"actor":{"display_login":"hheiskanen"}}