{"action":"created","comment":{"url":"https://api.github.com/repos/jelmnainen/exerking-front/pulls/comments/59190492","id":59190492,"diff_hunk":"@@ -0,0 +1,148 @@\n+import React, { Component, PropTypes } from 'react';\n+\n+export default class ExercisesEditPage extends Component {\n+\n+  constructor() {\n+    super();\n+    this.onSubmit = this.onSubmit.bind(this);\n+  }\n+\n+  componentWillMount() {\n+    this.props.fetchExercise(this.props.params.id);\n+  }\n+\n+  componentWillUnmount() {\n+    this.props.onPageLeave();\n+  }\n+\n+  onSubmit(e) {\n+    e.preventDefault();\n+    const { title, text, category, batch, fileUpload } = this.refs;\n+    const { exercise, handleSubmit } = this.props;\n+\n+    handleSubmit(\n+      exercise.get('id'),\n+      title.value,\n+      text.value,\n+      category.value,\n+      batch.value,\n+      fileUpload.checked\n+    );\n+  }\n+\n+  renderOptionItems(set, chosenMember, refName) {\n+    return (\n+      <div className=\"field\">\n+        <select className=\"ui dropdown\" ref={refName}>\n+          <option value={set.get('id')}>\n+              {chosenMember.get('title')}\n+          </option>\n+          {set\n+            .valueSeq()\n+            .filter(member => member.get('id') !== chosenMember.get('id'))\n+            .map(member =>\n+              <option key={member.get('id')} value={member.get('id')}>\n+                {member.get('title')}\n+              </option>\n+            )\n+          }\n+        </select>\n+      </div>","path":"src/components/ExercisesEditPage.jsx","position":50,"original_position":50,"commit_id":"39855a05675f3c13b9238758e4b1470559824aa6","original_commit_id":"39855a05675f3c13b9238758e4b1470559824aa6","user":{"login":"nfrolov","id":920905,"avatar_url":"https://avatars.githubusercontent.com/u/920905?v=3","gravatar_id":"","url":"https://api.github.com/users/nfrolov","html_url":"https://github.com/nfrolov","followers_url":"https://api.github.com/users/nfrolov/followers","following_url":"https://api.github.com/users/nfrolov/following{/other_user}","gists_url":"https://api.github.com/users/nfrolov/gists{/gist_id}","starred_url":"https://api.github.com/users/nfrolov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nfrolov/subscriptions","organizations_url":"https://api.github.com/users/nfrolov/orgs","repos_url":"https://api.github.com/users/nfrolov/repos","events_url":"https://api.github.com/users/nfrolov/events{/privacy}","received_events_url":"https://api.github.com/users/nfrolov/received_events","type":"User","site_admin":false},"body":"Possible error messages are not printed. (batch is required)","created_at":"2016-04-11T11:40:01Z","updated_at":"2016-04-11T11:40:01Z","html_url":"https://github.com/jelmnainen/exerking-front/pull/57#discussion_r59190492","pull_request_url":"https://api.github.com/repos/jelmnainen/exerking-front/pulls/57","_links":{"self":{"href":"https://api.github.com/repos/jelmnainen/exerking-front/pulls/comments/59190492"},"html":{"href":"https://github.com/jelmnainen/exerking-front/pull/57#discussion_r59190492"},"pull_request":{"href":"https://api.github.com/repos/jelmnainen/exerking-front/pulls/57"}}},"pull_request":{"url":"https://api.github.com/repos/jelmnainen/exerking-front/pulls/57","id":65977316,"html_url":"https://github.com/jelmnainen/exerking-front/pull/57","diff_url":"https://github.com/jelmnainen/exerking-front/pull/57.diff","patch_url":"https://github.com/jelmnainen/exerking-front/pull/57.patch","issue_url":"https://api.github.com/repos/jelmnainen/exerking-front/issues/57","number":57,"state":"open","locked":false,"title":"enable modifying exercises","user":{"login":"jelmnainen","id":5445441,"avatar_url":"https://avatars.githubusercontent.com/u/5445441?v=3","gravatar_id":"","url":"https://api.github.com/users/jelmnainen","html_url":"https://github.com/jelmnainen","followers_url":"https://api.github.com/users/jelmnainen/followers","following_url":"https://api.github.com/users/jelmnainen/following{/other_user}","gists_url":"https://api.github.com/users/jelmnainen/gists{/gist_id}","starred_url":"https://api.github.com/users/jelmnainen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jelmnainen/subscriptions","organizations_url":"https://api.github.com/users/jelmnainen/orgs","repos_url":"https://api.github.com/users/jelmnainen/repos","events_url":"https://api.github.com/users/jelmnainen/events{/privacy}","received_events_url":"https://api.github.com/users/jelmnainen/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-11T11:21:08Z","updated_at":"2016-04-11T11:40:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5c4852cd2e080d698c37248d67fabeec08870247","assignee":{"login":"nfrolov","id":920905,"avatar_url":"https://avatars.githubusercontent.com/u/920905?v=3","gravatar_id":"","url":"https://api.github.com/users/nfrolov","html_url":"https://github.com/nfrolov","followers_url":"https://api.github.com/users/nfrolov/followers","following_url":"https://api.github.com/users/nfrolov/following{/other_user}","gists_url":"https://api.github.com/users/nfrolov/gists{/gist_id}","starred_url":"https://api.github.com/users/nfrolov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nfrolov/subscriptions","organizations_url":"https://api.github.com/users/nfrolov/orgs","repos_url":"https://api.github.com/users/nfrolov/repos","events_url":"https://api.github.com/users/nfrolov/events{/privacy}","received_events_url":"https://api.github.com/users/nfrolov/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/jelmnainen/exerking-front/pulls/57/commits","review_comments_url":"https://api.github.com/repos/jelmnainen/exerking-front/pulls/57/comments","review_comment_url":"https://api.github.com/repos/jelmnainen/exerking-front/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jelmnainen/exerking-front/issues/57/comments","statuses_url":"https://api.github.com/repos/jelmnainen/exerking-front/statuses/39855a05675f3c13b9238758e4b1470559824aa6","head":{"label":"jelmnainen:modify-exercises","ref":"modify-exercises","sha":"39855a05675f3c13b9238758e4b1470559824aa6","user":{"login":"jelmnainen","id":5445441,"avatar_url":"https://avatars.githubusercontent.com/u/5445441?v=3","gravatar_id":"","url":"https://api.github.com/users/jelmnainen","html_url":"https://github.com/jelmnainen","followers_url":"https://api.github.com/users/jelmnainen/followers","following_url":"https://api.github.com/users/jelmnainen/following{/other_user}","gists_url":"https://api.github.com/users/jelmnainen/gists{/gist_id}","starred_url":"https://api.github.com/users/jelmnainen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jelmnainen/subscriptions","organizations_url":"https://api.github.com/users/jelmnainen/orgs","repos_url":"https://api.github.com/users/jelmnainen/repos","events_url":"https://api.github.com/users/jelmnainen/events{/privacy}","received_events_url":"https://api.github.com/users/jelmnainen/received_events","type":"User","site_admin":false},"repo":{"id":49961467,"name":"exerking-front","full_name":"jelmnainen/exerking-front","owner":{"login":"jelmnainen","id":5445441,"avatar_url":"https://avatars.githubusercontent.com/u/5445441?v=3","gravatar_id":"","url":"https://api.github.com/users/jelmnainen","html_url":"https://github.com/jelmnainen","followers_url":"https://api.github.com/users/jelmnainen/followers","following_url":"https://api.github.com/users/jelmnainen/following{/other_user}","gists_url":"https://api.github.com/users/jelmnainen/gists{/gist_id}","starred_url":"https://api.github.com/users/jelmnainen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jelmnainen/subscriptions","organizations_url":"https://api.github.com/users/jelmnainen/orgs","repos_url":"https://api.github.com/users/jelmnainen/repos","events_url":"https://api.github.com/users/jelmnainen/events{/privacy}","received_events_url":"https://api.github.com/users/jelmnainen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jelmnainen/exerking-front","description":"An exercise marking system","fork":false,"url":"https://api.github.com/repos/jelmnainen/exerking-front","forks_url":"https://api.github.com/repos/jelmnainen/exerking-front/forks","keys_url":"https://api.github.com/repos/jelmnainen/exerking-front/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jelmnainen/exerking-front/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jelmnainen/exerking-front/teams","hooks_url":"https://api.github.com/repos/jelmnainen/exerking-front/hooks","issue_events_url":"https://api.github.com/repos/jelmnainen/exerking-front/issues/events{/number}","events_url":"https://api.github.com/repos/jelmnainen/exerking-front/events","assignees_url":"https://api.github.com/repos/jelmnainen/exerking-front/assignees{/user}","branches_url":"https://api.github.com/repos/jelmnainen/exerking-front/branches{/branch}","tags_url":"https://api.github.com/repos/jelmnainen/exerking-front/tags","blobs_url":"https://api.github.com/repos/jelmnainen/exerking-front/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jelmnainen/exerking-front/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jelmnainen/exerking-front/git/refs{/sha}","trees_url":"https://api.github.com/repos/jelmnainen/exerking-front/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jelmnainen/exerking-front/statuses/{sha}","languages_url":"https://api.github.com/repos/jelmnainen/exerking-front/languages","stargazers_url":"https://api.github.com/repos/jelmnainen/exerking-front/stargazers","contributors_url":"https://api.github.com/repos/jelmnainen/exerking-front/contributors","subscribers_url":"https://api.github.com/repos/jelmnainen/exerking-front/subscribers","subscription_url":"https://api.github.com/repos/jelmnainen/exerking-front/subscription","commits_url":"https://api.github.com/repos/jelmnainen/exerking-front/commits{/sha}","git_commits_url":"https://api.github.com/repos/jelmnainen/exerking-front/git/commits{/sha}","comments_url":"https://api.github.com/repos/jelmnainen/exerking-front/comments{/number}","issue_comment_url":"https://api.github.com/repos/jelmnainen/exerking-front/issues/comments{/number}","contents_url":"https://api.github.com/repos/jelmnainen/exerking-front/contents/{+path}","compare_url":"https://api.github.com/repos/jelmnainen/exerking-front/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jelmnainen/exerking-front/merges","archive_url":"https://api.github.com/repos/jelmnainen/exerking-front/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jelmnainen/exerking-front/downloads","issues_url":"https://api.github.com/repos/jelmnainen/exerking-front/issues{/number}","pulls_url":"https://api.github.com/repos/jelmnainen/exerking-front/pulls{/number}","milestones_url":"https://api.github.com/repos/jelmnainen/exerking-front/milestones{/number}","notifications_url":"https://api.github.com/repos/jelmnainen/exerking-front/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jelmnainen/exerking-front/labels{/name}","releases_url":"https://api.github.com/repos/jelmnainen/exerking-front/releases{/id}","deployments_url":"https://api.github.com/repos/jelmnainen/exerking-front/deployments","created_at":"2016-01-19T15:20:04Z","updated_at":"2016-01-20T14:56:38Z","pushed_at":"2016-04-11T11:21:09Z","git_url":"git://github.com/jelmnainen/exerking-front.git","ssh_url":"git@github.com:jelmnainen/exerking-front.git","clone_url":"https://github.com/jelmnainen/exerking-front.git","svn_url":"https://github.com/jelmnainen/exerking-front","homepage":null,"size":168,"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":"master"}},"base":{"label":"jelmnainen:master","ref":"master","sha":"804f90b88b03481c809c9452e992d3deb8489875","user":{"login":"jelmnainen","id":5445441,"avatar_url":"https://avatars.githubusercontent.com/u/5445441?v=3","gravatar_id":"","url":"https://api.github.com/users/jelmnainen","html_url":"https://github.com/jelmnainen","followers_url":"https://api.github.com/users/jelmnainen/followers","following_url":"https://api.github.com/users/jelmnainen/following{/other_user}","gists_url":"https://api.github.com/users/jelmnainen/gists{/gist_id}","starred_url":"https://api.github.com/users/jelmnainen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jelmnainen/subscriptions","organizations_url":"https://api.github.com/users/jelmnainen/orgs","repos_url":"https://api.github.com/users/jelmnainen/repos","events_url":"https://api.github.com/users/jelmnainen/events{/privacy}","received_events_url":"https://api.github.com/users/jelmnainen/received_events","type":"User","site_admin":false},"repo":{"id":49961467,"name":"exerking-front","full_name":"jelmnainen/exerking-front","owner":{"login":"jelmnainen","id":5445441,"avatar_url":"https://avatars.githubusercontent.com/u/5445441?v=3","gravatar_id":"","url":"https://api.github.com/users/jelmnainen","html_url":"https://github.com/jelmnainen","followers_url":"https://api.github.com/users/jelmnainen/followers","following_url":"https://api.github.com/users/jelmnainen/following{/other_user}","gists_url":"https://api.github.com/users/jelmnainen/gists{/gist_id}","starred_url":"https://api.github.com/users/jelmnainen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jelmnainen/subscriptions","organizations_url":"https://api.github.com/users/jelmnainen/orgs","repos_url":"https://api.github.com/users/jelmnainen/repos","events_url":"https://api.github.com/users/jelmnainen/events{/privacy}","received_events_url":"https://api.github.com/users/jelmnainen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jelmnainen/exerking-front","description":"An exercise marking system","fork":false,"url":"https://api.github.com/repos/jelmnainen/exerking-front","forks_url":"https://api.github.com/repos/jelmnainen/exerking-front/forks","keys_url":"https://api.github.com/repos/jelmnainen/exerking-front/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jelmnainen/exerking-front/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jelmnainen/exerking-front/teams","hooks_url":"https://api.github.com/repos/jelmnainen/exerking-front/hooks","issue_events_url":"https://api.github.com/repos/jelmnainen/exerking-front/issues/events{/number}","events_url":"https://api.github.com/repos/jelmnainen/exerking-front/events","assignees_url":"https://api.github.com/repos/jelmnainen/exerking-front/assignees{/user}","branches_url":"https://api.github.com/repos/jelmnainen/exerking-front/branches{/branch}","tags_url":"https://api.github.com/repos/jelmnainen/exerking-front/tags","blobs_url":"https://api.github.com/repos/jelmnainen/exerking-front/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jelmnainen/exerking-front/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jelmnainen/exerking-front/git/refs{/sha}","trees_url":"https://api.github.com/repos/jelmnainen/exerking-front/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jelmnainen/exerking-front/statuses/{sha}","languages_url":"https://api.github.com/repos/jelmnainen/exerking-front/languages","stargazers_url":"https://api.github.com/repos/jelmnainen/exerking-front/stargazers","contributors_url":"https://api.github.com/repos/jelmnainen/exerking-front/contributors","subscribers_url":"https://api.github.com/repos/jelmnainen/exerking-front/subscribers","subscription_url":"https://api.github.com/repos/jelmnainen/exerking-front/subscription","commits_url":"https://api.github.com/repos/jelmnainen/exerking-front/commits{/sha}","git_commits_url":"https://api.github.com/repos/jelmnainen/exerking-front/git/commits{/sha}","comments_url":"https://api.github.com/repos/jelmnainen/exerking-front/comments{/number}","issue_comment_url":"https://api.github.com/repos/jelmnainen/exerking-front/issues/comments{/number}","contents_url":"https://api.github.com/repos/jelmnainen/exerking-front/contents/{+path}","compare_url":"https://api.github.com/repos/jelmnainen/exerking-front/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jelmnainen/exerking-front/merges","archive_url":"https://api.github.com/repos/jelmnainen/exerking-front/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jelmnainen/exerking-front/downloads","issues_url":"https://api.github.com/repos/jelmnainen/exerking-front/issues{/number}","pulls_url":"https://api.github.com/repos/jelmnainen/exerking-front/pulls{/number}","milestones_url":"https://api.github.com/repos/jelmnainen/exerking-front/milestones{/number}","notifications_url":"https://api.github.com/repos/jelmnainen/exerking-front/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jelmnainen/exerking-front/labels{/name}","releases_url":"https://api.github.com/repos/jelmnainen/exerking-front/releases{/id}","deployments_url":"https://api.github.com/repos/jelmnainen/exerking-front/deployments","created_at":"2016-01-19T15:20:04Z","updated_at":"2016-01-20T14:56:38Z","pushed_at":"2016-04-11T11:21:09Z","git_url":"git://github.com/jelmnainen/exerking-front.git","ssh_url":"git@github.com:jelmnainen/exerking-front.git","clone_url":"https://github.com/jelmnainen/exerking-front.git","svn_url":"https://github.com/jelmnainen/exerking-front","homepage":null,"size":168,"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":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jelmnainen/exerking-front/pulls/57"},"html":{"href":"https://github.com/jelmnainen/exerking-front/pull/57"},"issue":{"href":"https://api.github.com/repos/jelmnainen/exerking-front/issues/57"},"comments":{"href":"https://api.github.com/repos/jelmnainen/exerking-front/issues/57/comments"},"review_comments":{"href":"https://api.github.com/repos/jelmnainen/exerking-front/pulls/57/comments"},"review_comment":{"href":"https://api.github.com/repos/jelmnainen/exerking-front/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jelmnainen/exerking-front/pulls/57/commits"},"statuses":{"href":"https://api.github.com/repos/jelmnainen/exerking-front/statuses/39855a05675f3c13b9238758e4b1470559824aa6"}}}}