{"action":"created","comment":{"url":"https://api.github.com/repos/oppia/oppia/pulls/comments/41109271","id":41109271,"diff_hunk":"@@ -172,3 +188,99 @@ def get_thread_analytics(exploration_id):\n     \"\"\"\n     return feedback_jobs.FeedbackAnalyticsAggregator.get_thread_analytics(\n         exploration_id)\n+\n+\n+def create_suggestion(exploration_id, author_id, exploration_version,\n+                      state_name, suggestion_content):\n+    \"\"\"Creates a new SuggestionModel object and the corresponding\n+    FeedbackThreadModel object.\"\"\"\n+\n+    thread_id = _create_models_for_thread_and_first_message(\n+        exploration_id, state_name, author_id, \n+        DEFAULT_SUGGESTION_THREAD_SUBJECT, EMPTY_TEXT, True)","path":"core/domain/feedback_services.py","position":63,"original_position":63,"commit_id":"f4dd5285bb00641fd9a086f47892a13eca488ad6","original_commit_id":"f4dd5285bb00641fd9a086f47892a13eca488ad6","user":{"login":"seanlip","id":10575562,"avatar_url":"https://avatars.githubusercontent.com/u/10575562?v=3","gravatar_id":"","url":"https://api.github.com/users/seanlip","html_url":"https://github.com/seanlip","followers_url":"https://api.github.com/users/seanlip/followers","following_url":"https://api.github.com/users/seanlip/following{/other_user}","gists_url":"https://api.github.com/users/seanlip/gists{/gist_id}","starred_url":"https://api.github.com/users/seanlip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanlip/subscriptions","organizations_url":"https://api.github.com/users/seanlip/orgs","repos_url":"https://api.github.com/users/seanlip/repos","events_url":"https://api.github.com/users/seanlip/events{/privacy}","received_events_url":"https://api.github.com/users/seanlip/received_events","type":"User","site_admin":false},"body":"Note for the future: if you're passing args which already have default values, include the name of the arg. E.g.\r\n\r\n    ..., EMPTY_TEXT, has_suggestion=True)\r\n\r\n(Though this may be obsolete here because I suggested above that has_suggestion doesn't really need to be a default arg.)","created_at":"2015-10-05T03:53:23Z","updated_at":"2015-10-05T03:53:23Z","html_url":"https://github.com/oppia/oppia/pull/998#discussion_r41109271","pull_request_url":"https://api.github.com/repos/oppia/oppia/pulls/998","_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments/41109271"},"html":{"href":"https://github.com/oppia/oppia/pull/998#discussion_r41109271"},"pull_request":{"href":"https://api.github.com/repos/oppia/oppia/pulls/998"}}},"pull_request":{"url":"https://api.github.com/repos/oppia/oppia/pulls/998","id":46317919,"html_url":"https://github.com/oppia/oppia/pull/998","diff_url":"https://github.com/oppia/oppia/pull/998.diff","patch_url":"https://github.com/oppia/oppia/pull/998.patch","issue_url":"https://api.github.com/repos/oppia/oppia/issues/998","number":998,"state":"open","locked":false,"title":"Services for learner suggestions, #892 .","user":{"login":"sbhowmik89","id":8260362,"avatar_url":"https://avatars.githubusercontent.com/u/8260362?v=3","gravatar_id":"","url":"https://api.github.com/users/sbhowmik89","html_url":"https://github.com/sbhowmik89","followers_url":"https://api.github.com/users/sbhowmik89/followers","following_url":"https://api.github.com/users/sbhowmik89/following{/other_user}","gists_url":"https://api.github.com/users/sbhowmik89/gists{/gist_id}","starred_url":"https://api.github.com/users/sbhowmik89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbhowmik89/subscriptions","organizations_url":"https://api.github.com/users/sbhowmik89/orgs","repos_url":"https://api.github.com/users/sbhowmik89/repos","events_url":"https://api.github.com/users/sbhowmik89/events{/privacy}","received_events_url":"https://api.github.com/users/sbhowmik89/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-29T19:02:41Z","updated_at":"2015-10-05T03:53:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"478c447576d8af18732ce1c5267a320e9677e000","assignee":{"login":"seanlip","id":10575562,"avatar_url":"https://avatars.githubusercontent.com/u/10575562?v=3","gravatar_id":"","url":"https://api.github.com/users/seanlip","html_url":"https://github.com/seanlip","followers_url":"https://api.github.com/users/seanlip/followers","following_url":"https://api.github.com/users/seanlip/following{/other_user}","gists_url":"https://api.github.com/users/seanlip/gists{/gist_id}","starred_url":"https://api.github.com/users/seanlip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanlip/subscriptions","organizations_url":"https://api.github.com/users/seanlip/orgs","repos_url":"https://api.github.com/users/seanlip/repos","events_url":"https://api.github.com/users/seanlip/events{/privacy}","received_events_url":"https://api.github.com/users/seanlip/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/oppia/oppia/pulls/998/commits","review_comments_url":"https://api.github.com/repos/oppia/oppia/pulls/998/comments","review_comment_url":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oppia/oppia/issues/998/comments","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/f4dd5285bb00641fd9a086f47892a13eca488ad6","head":{"label":"sbhowmik89:suggestionservices","ref":"suggestionservices","sha":"f4dd5285bb00641fd9a086f47892a13eca488ad6","user":{"login":"sbhowmik89","id":8260362,"avatar_url":"https://avatars.githubusercontent.com/u/8260362?v=3","gravatar_id":"","url":"https://api.github.com/users/sbhowmik89","html_url":"https://github.com/sbhowmik89","followers_url":"https://api.github.com/users/sbhowmik89/followers","following_url":"https://api.github.com/users/sbhowmik89/following{/other_user}","gists_url":"https://api.github.com/users/sbhowmik89/gists{/gist_id}","starred_url":"https://api.github.com/users/sbhowmik89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbhowmik89/subscriptions","organizations_url":"https://api.github.com/users/sbhowmik89/orgs","repos_url":"https://api.github.com/users/sbhowmik89/repos","events_url":"https://api.github.com/users/sbhowmik89/events{/privacy}","received_events_url":"https://api.github.com/users/sbhowmik89/received_events","type":"User","site_admin":false},"repo":{"id":42437530,"name":"oppia","full_name":"sbhowmik89/oppia","owner":{"login":"sbhowmik89","id":8260362,"avatar_url":"https://avatars.githubusercontent.com/u/8260362?v=3","gravatar_id":"","url":"https://api.github.com/users/sbhowmik89","html_url":"https://github.com/sbhowmik89","followers_url":"https://api.github.com/users/sbhowmik89/followers","following_url":"https://api.github.com/users/sbhowmik89/following{/other_user}","gists_url":"https://api.github.com/users/sbhowmik89/gists{/gist_id}","starred_url":"https://api.github.com/users/sbhowmik89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbhowmik89/subscriptions","organizations_url":"https://api.github.com/users/sbhowmik89/orgs","repos_url":"https://api.github.com/users/sbhowmik89/repos","events_url":"https://api.github.com/users/sbhowmik89/events{/privacy}","received_events_url":"https://api.github.com/users/sbhowmik89/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sbhowmik89/oppia","description":"Tool for creating interactive tutors.","fork":true,"url":"https://api.github.com/repos/sbhowmik89/oppia","forks_url":"https://api.github.com/repos/sbhowmik89/oppia/forks","keys_url":"https://api.github.com/repos/sbhowmik89/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sbhowmik89/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sbhowmik89/oppia/teams","hooks_url":"https://api.github.com/repos/sbhowmik89/oppia/hooks","issue_events_url":"https://api.github.com/repos/sbhowmik89/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/sbhowmik89/oppia/events","assignees_url":"https://api.github.com/repos/sbhowmik89/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/sbhowmik89/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/sbhowmik89/oppia/tags","blobs_url":"https://api.github.com/repos/sbhowmik89/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sbhowmik89/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sbhowmik89/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/sbhowmik89/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sbhowmik89/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/sbhowmik89/oppia/languages","stargazers_url":"https://api.github.com/repos/sbhowmik89/oppia/stargazers","contributors_url":"https://api.github.com/repos/sbhowmik89/oppia/contributors","subscribers_url":"https://api.github.com/repos/sbhowmik89/oppia/subscribers","subscription_url":"https://api.github.com/repos/sbhowmik89/oppia/subscription","commits_url":"https://api.github.com/repos/sbhowmik89/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/sbhowmik89/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/sbhowmik89/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/sbhowmik89/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/sbhowmik89/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/sbhowmik89/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sbhowmik89/oppia/merges","archive_url":"https://api.github.com/repos/sbhowmik89/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sbhowmik89/oppia/downloads","issues_url":"https://api.github.com/repos/sbhowmik89/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/sbhowmik89/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/sbhowmik89/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/sbhowmik89/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sbhowmik89/oppia/labels{/name}","releases_url":"https://api.github.com/repos/sbhowmik89/oppia/releases{/id}","created_at":"2015-09-14T08:48:41Z","updated_at":"2015-09-14T08:48:43Z","pushed_at":"2015-10-02T23:36:22Z","git_url":"git://github.com/sbhowmik89/oppia.git","ssh_url":"git@github.com:sbhowmik89/oppia.git","clone_url":"https://github.com/sbhowmik89/oppia.git","svn_url":"https://github.com/sbhowmik89/oppia","homepage":"https://www.oppia.org","size":37032,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"oppia:suggestions","ref":"suggestions","sha":"289c44e5cc9631359b819ba5be1a565736019d92","user":{"login":"oppia","id":11620230,"avatar_url":"https://avatars.githubusercontent.com/u/11620230?v=3","gravatar_id":"","url":"https://api.github.com/users/oppia","html_url":"https://github.com/oppia","followers_url":"https://api.github.com/users/oppia/followers","following_url":"https://api.github.com/users/oppia/following{/other_user}","gists_url":"https://api.github.com/users/oppia/gists{/gist_id}","starred_url":"https://api.github.com/users/oppia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oppia/subscriptions","organizations_url":"https://api.github.com/users/oppia/orgs","repos_url":"https://api.github.com/users/oppia/repos","events_url":"https://api.github.com/users/oppia/events{/privacy}","received_events_url":"https://api.github.com/users/oppia/received_events","type":"Organization","site_admin":false},"repo":{"id":40687563,"name":"oppia","full_name":"oppia/oppia","owner":{"login":"oppia","id":11620230,"avatar_url":"https://avatars.githubusercontent.com/u/11620230?v=3","gravatar_id":"","url":"https://api.github.com/users/oppia","html_url":"https://github.com/oppia","followers_url":"https://api.github.com/users/oppia/followers","following_url":"https://api.github.com/users/oppia/following{/other_user}","gists_url":"https://api.github.com/users/oppia/gists{/gist_id}","starred_url":"https://api.github.com/users/oppia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oppia/subscriptions","organizations_url":"https://api.github.com/users/oppia/orgs","repos_url":"https://api.github.com/users/oppia/repos","events_url":"https://api.github.com/users/oppia/events{/privacy}","received_events_url":"https://api.github.com/users/oppia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/oppia/oppia","description":"Tool for collaboratively building interactive tutors.","fork":false,"url":"https://api.github.com/repos/oppia/oppia","forks_url":"https://api.github.com/repos/oppia/oppia/forks","keys_url":"https://api.github.com/repos/oppia/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oppia/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oppia/oppia/teams","hooks_url":"https://api.github.com/repos/oppia/oppia/hooks","issue_events_url":"https://api.github.com/repos/oppia/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/oppia/oppia/events","assignees_url":"https://api.github.com/repos/oppia/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/oppia/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/oppia/oppia/tags","blobs_url":"https://api.github.com/repos/oppia/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oppia/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oppia/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/oppia/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/oppia/oppia/languages","stargazers_url":"https://api.github.com/repos/oppia/oppia/stargazers","contributors_url":"https://api.github.com/repos/oppia/oppia/contributors","subscribers_url":"https://api.github.com/repos/oppia/oppia/subscribers","subscription_url":"https://api.github.com/repos/oppia/oppia/subscription","commits_url":"https://api.github.com/repos/oppia/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/oppia/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/oppia/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/oppia/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/oppia/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/oppia/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oppia/oppia/merges","archive_url":"https://api.github.com/repos/oppia/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oppia/oppia/downloads","issues_url":"https://api.github.com/repos/oppia/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/oppia/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/oppia/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/oppia/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oppia/oppia/labels{/name}","releases_url":"https://api.github.com/repos/oppia/oppia/releases{/id}","created_at":"2015-08-14T00:16:14Z","updated_at":"2015-10-03T22:14:51Z","pushed_at":"2015-10-05T03:21:58Z","git_url":"git://github.com/oppia/oppia.git","ssh_url":"git@github.com:oppia/oppia.git","clone_url":"https://github.com/oppia/oppia.git","svn_url":"https://github.com/oppia/oppia","homepage":"https://www.oppia.org","size":43656,"stargazers_count":42,"watchers_count":42,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":51,"mirror_url":null,"open_issues_count":175,"forks":51,"open_issues":175,"watchers":42,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/998"},"html":{"href":"https://github.com/oppia/oppia/pull/998"},"issue":{"href":"https://api.github.com/repos/oppia/oppia/issues/998"},"comments":{"href":"https://api.github.com/repos/oppia/oppia/issues/998/comments"},"review_comments":{"href":"https://api.github.com/repos/oppia/oppia/pulls/998/comments"},"review_comment":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oppia/oppia/pulls/998/commits"},"statuses":{"href":"https://api.github.com/repos/oppia/oppia/statuses/f4dd5285bb00641fd9a086f47892a13eca488ad6"}}}}