{"action":"created","comment":{"url":"https://api.github.com/repos/oppia/oppia/pulls/comments/45541142","id":45541142,"diff_hunk":"@@ -0,0 +1,142 @@\n+// Copyright 2015 The Oppia Authors. All Rights Reserved.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//      http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS-IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+/**\n+ * @fileoverview Classification service for answer groups.\n+ *\n+ * @author wxyxinyu@gmail.com (Xinyu Wu)\n+ */\n+\n+oppia.factory('answerClassificationService', [\n+    '$http', '$q', 'learnerParamsService', function(\n+      $http, $q, learnerParamsService) {\n+\n+  /**\n+   * Finds the first answer group with a rule that returns true. This should be\n+   * synced with classify() in reader.py.\n+   *\n+   * @param {*} answer The answer that the user has submitted.\n+   * @param {array} answerGroups The answer groups of the interaction. Each\n+   *     answer group contains rule_specs, which is a list of rules.\n+   * @param {object} defaultOutcome The default outcome of the interaction.\n+   * @param {function} interactionRulesService The service which contains the\n+   *     rules of that interaction.\n+   *\n+   * @return {object} An object representing the answer group with the\n+   *     following properties:\n+   * <ul>","path":"core/templates/dev/head/player/AnswerClassificationService.js","position":38,"original_position":38,"commit_id":"743684b111ee06b675cb297367262bee933573b5","original_commit_id":"743684b111ee06b675cb297367262bee933573b5","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":"Ooh, interesting -- what syntax is this? (I like it, but just curious about the lack of closing li tags and wondering about the second opening ul tag.","created_at":"2015-11-21T04:03:37Z","updated_at":"2015-11-21T04:03:37Z","html_url":"https://github.com/oppia/oppia/pull/1119#discussion_r45541142","pull_request_url":"https://api.github.com/repos/oppia/oppia/pulls/1119","_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments/45541142"},"html":{"href":"https://github.com/oppia/oppia/pull/1119#discussion_r45541142"},"pull_request":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1119"}}},"pull_request":{"url":"https://api.github.com/repos/oppia/oppia/pulls/1119","id":50347390,"html_url":"https://github.com/oppia/oppia/pull/1119","diff_url":"https://github.com/oppia/oppia/pull/1119.diff","patch_url":"https://github.com/oppia/oppia/pull/1119.patch","issue_url":"https://api.github.com/repos/oppia/oppia/issues/1119","number":1119,"state":"open","locked":false,"title":"Rules refactoring","user":{"login":"wxyxinyu","id":5061134,"avatar_url":"https://avatars.githubusercontent.com/u/5061134?v=3","gravatar_id":"","url":"https://api.github.com/users/wxyxinyu","html_url":"https://github.com/wxyxinyu","followers_url":"https://api.github.com/users/wxyxinyu/followers","following_url":"https://api.github.com/users/wxyxinyu/following{/other_user}","gists_url":"https://api.github.com/users/wxyxinyu/gists{/gist_id}","starred_url":"https://api.github.com/users/wxyxinyu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wxyxinyu/subscriptions","organizations_url":"https://api.github.com/users/wxyxinyu/orgs","repos_url":"https://api.github.com/users/wxyxinyu/repos","events_url":"https://api.github.com/users/wxyxinyu/events{/privacy}","received_events_url":"https://api.github.com/users/wxyxinyu/received_events","type":"User","site_admin":false},"body":"This commit adds frontend evaluation for NumericInput.","created_at":"2015-11-11T04:36:34Z","updated_at":"2015-11-21T04:03:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fa95fbd328c2e7028512584dc036ad90d80834c7","assignee":{"login":"BenHenning","id":12983742,"avatar_url":"https://avatars.githubusercontent.com/u/12983742?v=3","gravatar_id":"","url":"https://api.github.com/users/BenHenning","html_url":"https://github.com/BenHenning","followers_url":"https://api.github.com/users/BenHenning/followers","following_url":"https://api.github.com/users/BenHenning/following{/other_user}","gists_url":"https://api.github.com/users/BenHenning/gists{/gist_id}","starred_url":"https://api.github.com/users/BenHenning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenHenning/subscriptions","organizations_url":"https://api.github.com/users/BenHenning/orgs","repos_url":"https://api.github.com/users/BenHenning/repos","events_url":"https://api.github.com/users/BenHenning/events{/privacy}","received_events_url":"https://api.github.com/users/BenHenning/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/oppia/oppia/pulls/1119/commits","review_comments_url":"https://api.github.com/repos/oppia/oppia/pulls/1119/comments","review_comment_url":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oppia/oppia/issues/1119/comments","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/743684b111ee06b675cb297367262bee933573b5","head":{"label":"wxyxinyu:rules-refactoring","ref":"rules-refactoring","sha":"743684b111ee06b675cb297367262bee933573b5","user":{"login":"wxyxinyu","id":5061134,"avatar_url":"https://avatars.githubusercontent.com/u/5061134?v=3","gravatar_id":"","url":"https://api.github.com/users/wxyxinyu","html_url":"https://github.com/wxyxinyu","followers_url":"https://api.github.com/users/wxyxinyu/followers","following_url":"https://api.github.com/users/wxyxinyu/following{/other_user}","gists_url":"https://api.github.com/users/wxyxinyu/gists{/gist_id}","starred_url":"https://api.github.com/users/wxyxinyu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wxyxinyu/subscriptions","organizations_url":"https://api.github.com/users/wxyxinyu/orgs","repos_url":"https://api.github.com/users/wxyxinyu/repos","events_url":"https://api.github.com/users/wxyxinyu/events{/privacy}","received_events_url":"https://api.github.com/users/wxyxinyu/received_events","type":"User","site_admin":false},"repo":{"id":43987891,"name":"oppia","full_name":"wxyxinyu/oppia","owner":{"login":"wxyxinyu","id":5061134,"avatar_url":"https://avatars.githubusercontent.com/u/5061134?v=3","gravatar_id":"","url":"https://api.github.com/users/wxyxinyu","html_url":"https://github.com/wxyxinyu","followers_url":"https://api.github.com/users/wxyxinyu/followers","following_url":"https://api.github.com/users/wxyxinyu/following{/other_user}","gists_url":"https://api.github.com/users/wxyxinyu/gists{/gist_id}","starred_url":"https://api.github.com/users/wxyxinyu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wxyxinyu/subscriptions","organizations_url":"https://api.github.com/users/wxyxinyu/orgs","repos_url":"https://api.github.com/users/wxyxinyu/repos","events_url":"https://api.github.com/users/wxyxinyu/events{/privacy}","received_events_url":"https://api.github.com/users/wxyxinyu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wxyxinyu/oppia","description":"Tool for collaboratively building interactive tutors.","fork":true,"url":"https://api.github.com/repos/wxyxinyu/oppia","forks_url":"https://api.github.com/repos/wxyxinyu/oppia/forks","keys_url":"https://api.github.com/repos/wxyxinyu/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wxyxinyu/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wxyxinyu/oppia/teams","hooks_url":"https://api.github.com/repos/wxyxinyu/oppia/hooks","issue_events_url":"https://api.github.com/repos/wxyxinyu/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/wxyxinyu/oppia/events","assignees_url":"https://api.github.com/repos/wxyxinyu/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/wxyxinyu/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/wxyxinyu/oppia/tags","blobs_url":"https://api.github.com/repos/wxyxinyu/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wxyxinyu/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wxyxinyu/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/wxyxinyu/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wxyxinyu/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/wxyxinyu/oppia/languages","stargazers_url":"https://api.github.com/repos/wxyxinyu/oppia/stargazers","contributors_url":"https://api.github.com/repos/wxyxinyu/oppia/contributors","subscribers_url":"https://api.github.com/repos/wxyxinyu/oppia/subscribers","subscription_url":"https://api.github.com/repos/wxyxinyu/oppia/subscription","commits_url":"https://api.github.com/repos/wxyxinyu/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/wxyxinyu/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/wxyxinyu/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/wxyxinyu/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/wxyxinyu/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/wxyxinyu/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wxyxinyu/oppia/merges","archive_url":"https://api.github.com/repos/wxyxinyu/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wxyxinyu/oppia/downloads","issues_url":"https://api.github.com/repos/wxyxinyu/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/wxyxinyu/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/wxyxinyu/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/wxyxinyu/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wxyxinyu/oppia/labels{/name}","releases_url":"https://api.github.com/repos/wxyxinyu/oppia/releases{/id}","created_at":"2015-10-10T01:23:33Z","updated_at":"2015-10-10T01:23:38Z","pushed_at":"2015-11-21T00:34:35Z","git_url":"git://github.com/wxyxinyu/oppia.git","ssh_url":"git@github.com:wxyxinyu/oppia.git","clone_url":"https://github.com/wxyxinyu/oppia.git","svn_url":"https://github.com/wxyxinyu/oppia","homepage":"https://www.oppia.org","size":38159,"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:develop","ref":"develop","sha":"cb18af1733ad89c1daf5a9824afc55ac57b007ca","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-11-20T13:29:21Z","pushed_at":"2015-11-21T03:02:11Z","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":43660,"stargazers_count":57,"watchers_count":57,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":72,"mirror_url":null,"open_issues_count":221,"forks":72,"open_issues":221,"watchers":57,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1119"},"html":{"href":"https://github.com/oppia/oppia/pull/1119"},"issue":{"href":"https://api.github.com/repos/oppia/oppia/issues/1119"},"comments":{"href":"https://api.github.com/repos/oppia/oppia/issues/1119/comments"},"review_comments":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1119/comments"},"review_comment":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1119/commits"},"statuses":{"href":"https://api.github.com/repos/oppia/oppia/statuses/743684b111ee06b675cb297367262bee933573b5"}}}}