{"action":"created","comment":{"url":"https://api.github.com/repos/oppia/oppia/pulls/comments/194212518","pull_request_review_id":127350526,"id":194212518,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDIxMjUxOA==","diff_hunk":"@@ -643,3 +643,63 @@ class UserBulkEmailsModel(base_models.BaseModel):\n     # IDs of all BulkEmailModels that correspond to bulk emails sent to this\n     # user.\n     sent_email_model_ids = ndb.StringProperty(indexed=True, repeated=True)\n+\n+\n+class UserSkillMasteryModel(base_models.BaseModel):\n+    \"\"\"Model for storing a user's degree of mastery of a skill in Oppia.\n+\n+    This model stores the degree of mastery of each skill for a given user.\n+\n+    The id for this model is of form '{{USER_ID}}:{{SKILL_ID}}'\n+    \"\"\"\n+\n+    # The model id for the user and the skill.\n+    id = ndb.StringProperty(required=True)\n+    # The user id of the user.\n+    user_id = ndb.StringProperty(required=True, indexed=True)\n+    # The skill id for which the degree of mastery is stored.\n+    skill_id = ndb.StringProperty(required=True, indexed=True)\n+    # The degree of mastery of the user in the skill.\n+    degree_of_mastery = ndb.FloatProperty(required=True, indexed=True)\n+\n+    @classmethod\n+    def construct_model_id(cls, user_id, skill_id):\n+        \"\"\"Returns model id corresponding to user and skill.\n+\n+        Args:\n+            user_id: str. The user ID of the user.\n+            skill_id: str. The unique id of the skill.\n+\n+        Returns:\n+            str. The model id corresponding to user and skill.\n+        \"\"\"\n+        return '%s.%s' % (user_id, skill_id)\n+\n+    @classmethod\n+    def get(cls, model_id):\n+        \"\"\"Returns all skill mastery models of a user and a skill.\n+\n+        Args:\n+            model_id: str. The model id of the user and the skill.\n+\n+        Returns:\n+            list. All skill mastery models where user_id belongs to the\n+                entered user are returned as a list where each element\n+                is one skill mastery model.\n+        \"\"\"\n+        return cls.query(cls.id == model_id).fetch()\n+\n+    @classmethod\n+    def get_multi(cls, model_ids):\n+        \"\"\"Returns all skill mastery models of a different model ids.","path":"core/storage/user/gae_models.py","position":52,"original_position":52,"commit_id":"00635f815eda7b7eb634218a2ecdb08e39014404","original_commit_id":"00635f815eda7b7eb634218a2ecdb08e39014404","user":{"login":"seanlip","id":10575562,"node_id":"MDQ6VXNlcjEwNTc1NTYy","avatar_url":"https://avatars0.githubusercontent.com/u/10575562?v=4","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":"of a different --> for the given","created_at":"2018-06-09T03:15:41Z","updated_at":"2018-06-09T03:16:37Z","html_url":"https://github.com/oppia/oppia/pull/4997#discussion_r194212518","pull_request_url":"https://api.github.com/repos/oppia/oppia/pulls/4997","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments/194212518"},"html":{"href":"https://github.com/oppia/oppia/pull/4997#discussion_r194212518"},"pull_request":{"href":"https://api.github.com/repos/oppia/oppia/pulls/4997"}}},"pull_request":{"url":"https://api.github.com/repos/oppia/oppia/pulls/4997","id":191308409,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxMzA4NDA5","html_url":"https://github.com/oppia/oppia/pull/4997","diff_url":"https://github.com/oppia/oppia/pull/4997.diff","patch_url":"https://github.com/oppia/oppia/pull/4997.patch","issue_url":"https://api.github.com/repos/oppia/oppia/issues/4997","number":4997,"state":"open","locked":false,"title":"Added skills mastery model","user":{"login":"WickedBrat","id":20617436,"node_id":"MDQ6VXNlcjIwNjE3NDM2","avatar_url":"https://avatars3.githubusercontent.com/u/20617436?v=4","gravatar_id":"","url":"https://api.github.com/users/WickedBrat","html_url":"https://github.com/WickedBrat","followers_url":"https://api.github.com/users/WickedBrat/followers","following_url":"https://api.github.com/users/WickedBrat/following{/other_user}","gists_url":"https://api.github.com/users/WickedBrat/gists{/gist_id}","starred_url":"https://api.github.com/users/WickedBrat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WickedBrat/subscriptions","organizations_url":"https://api.github.com/users/WickedBrat/orgs","repos_url":"https://api.github.com/users/WickedBrat/repos","events_url":"https://api.github.com/users/WickedBrat/events{/privacy}","received_events_url":"https://api.github.com/users/WickedBrat/received_events","type":"User","site_admin":false},"body":"This PR adds skill mastery model with 3 querying methods i.e. get, get_multi and get_all","created_at":"2018-05-30T01:14:00Z","updated_at":"2018-06-09T03:16:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"942c0d528e0a1e67fe65b7cf46b6b48206f0c7db","assignee":{"login":"aks681","id":22347970,"node_id":"MDQ6VXNlcjIyMzQ3OTcw","avatar_url":"https://avatars3.githubusercontent.com/u/22347970?v=4","gravatar_id":"","url":"https://api.github.com/users/aks681","html_url":"https://github.com/aks681","followers_url":"https://api.github.com/users/aks681/followers","following_url":"https://api.github.com/users/aks681/following{/other_user}","gists_url":"https://api.github.com/users/aks681/gists{/gist_id}","starred_url":"https://api.github.com/users/aks681/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aks681/subscriptions","organizations_url":"https://api.github.com/users/aks681/orgs","repos_url":"https://api.github.com/users/aks681/repos","events_url":"https://api.github.com/users/aks681/events{/privacy}","received_events_url":"https://api.github.com/users/aks681/received_events","type":"User","site_admin":false},"assignees":[{"login":"aks681","id":22347970,"node_id":"MDQ6VXNlcjIyMzQ3OTcw","avatar_url":"https://avatars3.githubusercontent.com/u/22347970?v=4","gravatar_id":"","url":"https://api.github.com/users/aks681","html_url":"https://github.com/aks681","followers_url":"https://api.github.com/users/aks681/followers","following_url":"https://api.github.com/users/aks681/following{/other_user}","gists_url":"https://api.github.com/users/aks681/gists{/gist_id}","starred_url":"https://api.github.com/users/aks681/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aks681/subscriptions","organizations_url":"https://api.github.com/users/aks681/orgs","repos_url":"https://api.github.com/users/aks681/repos","events_url":"https://api.github.com/users/aks681/events{/privacy}","received_events_url":"https://api.github.com/users/aks681/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/oppia/oppia/pulls/4997/commits","review_comments_url":"https://api.github.com/repos/oppia/oppia/pulls/4997/comments","review_comment_url":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oppia/oppia/issues/4997/comments","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/00635f815eda7b7eb634218a2ecdb08e39014404","head":{"label":"WickedBrat:skills-mastery-model","ref":"skills-mastery-model","sha":"00635f815eda7b7eb634218a2ecdb08e39014404","user":{"login":"WickedBrat","id":20617436,"node_id":"MDQ6VXNlcjIwNjE3NDM2","avatar_url":"https://avatars3.githubusercontent.com/u/20617436?v=4","gravatar_id":"","url":"https://api.github.com/users/WickedBrat","html_url":"https://github.com/WickedBrat","followers_url":"https://api.github.com/users/WickedBrat/followers","following_url":"https://api.github.com/users/WickedBrat/following{/other_user}","gists_url":"https://api.github.com/users/WickedBrat/gists{/gist_id}","starred_url":"https://api.github.com/users/WickedBrat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WickedBrat/subscriptions","organizations_url":"https://api.github.com/users/WickedBrat/orgs","repos_url":"https://api.github.com/users/WickedBrat/repos","events_url":"https://api.github.com/users/WickedBrat/events{/privacy}","received_events_url":"https://api.github.com/users/WickedBrat/received_events","type":"User","site_admin":false},"repo":{"id":115219204,"node_id":"MDEwOlJlcG9zaXRvcnkxMTUyMTkyMDQ=","name":"oppia","full_name":"WickedBrat/oppia","owner":{"login":"WickedBrat","id":20617436,"node_id":"MDQ6VXNlcjIwNjE3NDM2","avatar_url":"https://avatars3.githubusercontent.com/u/20617436?v=4","gravatar_id":"","url":"https://api.github.com/users/WickedBrat","html_url":"https://github.com/WickedBrat","followers_url":"https://api.github.com/users/WickedBrat/followers","following_url":"https://api.github.com/users/WickedBrat/following{/other_user}","gists_url":"https://api.github.com/users/WickedBrat/gists{/gist_id}","starred_url":"https://api.github.com/users/WickedBrat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WickedBrat/subscriptions","organizations_url":"https://api.github.com/users/WickedBrat/orgs","repos_url":"https://api.github.com/users/WickedBrat/repos","events_url":"https://api.github.com/users/WickedBrat/events{/privacy}","received_events_url":"https://api.github.com/users/WickedBrat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/WickedBrat/oppia","description":"Tool for collaboratively building interactive lessons.","fork":true,"url":"https://api.github.com/repos/WickedBrat/oppia","forks_url":"https://api.github.com/repos/WickedBrat/oppia/forks","keys_url":"https://api.github.com/repos/WickedBrat/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WickedBrat/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WickedBrat/oppia/teams","hooks_url":"https://api.github.com/repos/WickedBrat/oppia/hooks","issue_events_url":"https://api.github.com/repos/WickedBrat/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/WickedBrat/oppia/events","assignees_url":"https://api.github.com/repos/WickedBrat/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/WickedBrat/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/WickedBrat/oppia/tags","blobs_url":"https://api.github.com/repos/WickedBrat/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WickedBrat/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WickedBrat/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/WickedBrat/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WickedBrat/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/WickedBrat/oppia/languages","stargazers_url":"https://api.github.com/repos/WickedBrat/oppia/stargazers","contributors_url":"https://api.github.com/repos/WickedBrat/oppia/contributors","subscribers_url":"https://api.github.com/repos/WickedBrat/oppia/subscribers","subscription_url":"https://api.github.com/repos/WickedBrat/oppia/subscription","commits_url":"https://api.github.com/repos/WickedBrat/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/WickedBrat/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/WickedBrat/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/WickedBrat/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/WickedBrat/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/WickedBrat/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WickedBrat/oppia/merges","archive_url":"https://api.github.com/repos/WickedBrat/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WickedBrat/oppia/downloads","issues_url":"https://api.github.com/repos/WickedBrat/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/WickedBrat/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/WickedBrat/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/WickedBrat/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WickedBrat/oppia/labels{/name}","releases_url":"https://api.github.com/repos/WickedBrat/oppia/releases{/id}","deployments_url":"https://api.github.com/repos/WickedBrat/oppia/deployments","created_at":"2017-12-23T20:09:30Z","updated_at":"2018-05-26T23:26:45Z","pushed_at":"2018-06-08T08:12:08Z","git_url":"git://github.com/WickedBrat/oppia.git","ssh_url":"git@github.com:WickedBrat/oppia.git","clone_url":"https://github.com/WickedBrat/oppia.git","svn_url":"https://github.com/WickedBrat/oppia","homepage":"https://www.oppia.org","size":103426,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"oppia:develop","ref":"develop","sha":"24700a7157470dd2155eef3fb2a260057210d39a","user":{"login":"oppia","id":11620230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNjIwMjMw","avatar_url":"https://avatars1.githubusercontent.com/u/11620230?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnk0MDY4NzU2Mw==","name":"oppia","full_name":"oppia/oppia","owner":{"login":"oppia","id":11620230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNjIwMjMw","avatar_url":"https://avatars1.githubusercontent.com/u/11620230?v=4","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 lessons.","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}","deployments_url":"https://api.github.com/repos/oppia/oppia/deployments","created_at":"2015-08-14T00:16:14Z","updated_at":"2018-06-08T21:53:24Z","pushed_at":"2018-06-09T02:29:47Z","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":103804,"stargazers_count":672,"watchers_count":672,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":643,"mirror_url":null,"archived":false,"open_issues_count":319,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":643,"open_issues":319,"watchers":672,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/4997"},"html":{"href":"https://github.com/oppia/oppia/pull/4997"},"issue":{"href":"https://api.github.com/repos/oppia/oppia/issues/4997"},"comments":{"href":"https://api.github.com/repos/oppia/oppia/issues/4997/comments"},"review_comments":{"href":"https://api.github.com/repos/oppia/oppia/pulls/4997/comments"},"review_comment":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oppia/oppia/pulls/4997/commits"},"statuses":{"href":"https://api.github.com/repos/oppia/oppia/statuses/00635f815eda7b7eb634218a2ecdb08e39014404"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"seanlip"}}