{"action":"created","comment":{"url":"https://api.github.com/repos/oppia/oppia/pulls/comments/81478871","pull_request_review_id":2456539,"id":81478871,"diff_hunk":"@@ -187,6 +188,62 @@ def test_library_handler_for_created_explorations(self):\n         }, response_dict['activity_list'][0])\n \n \n+class LibraryGroupPageTest(test_utils.GenericTestBase):\n+\n+    def test_library_group_pages(self):\n+        \"\"\"Test access to the top rated and recently published pages.\"\"\"\n+        response = self.testapp.get(feconf.LIBRARY_TOP_RATED_URL)\n+        self.assertEqual(response.status_int, 200)\n+\n+        response = self.testapp.get(feconf.LIBRARY_RECENTLY_PUBLISHED_URL)\n+        self.assertEqual(response.status_int, 200)\n+\n+    def test_handler_for_library_group_pages(self):\n+        \"\"\"Test library handler for top rated and recently published pages.\"\"\"\n+        response_dict = self.get_json(\n+            feconf.LIBRARY_GROUP_DATA_URL,\n+            {'group_name': feconf.LIBRARY_GROUP_RECENTLY_PUBLISHED})\n+        self.assertDictContainsSubset({\n+            'is_admin': False,\n+            'is_moderator': False,\n+            'is_super_admin': False,\n+            'activity_list': [],\n+            'preferred_language_codes': ['en'],\n+            'profile_picture_data_url': None,\n+        }, response_dict)\n+\n+        # Load a public demo exploration.\n+        exp_services.load_demo('0')\n+\n+        response_dict = self.get_json(\n+            feconf.LIBRARY_GROUP_DATA_URL,\n+            {'group_name': feconf.LIBRARY_GROUP_RECENTLY_PUBLISHED})\n+        self.assertDictContainsSubset({","path":"core/controllers/library_test.py","position":42,"original_position":42,"commit_id":"180e58e1ab1d8d9e187e62866b9d8e484287d606","original_commit_id":"180e58e1ab1d8d9e187e62866b9d8e484287d606","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":"That's fine; just add another check that the activity_list has length 1.","created_at":"2016-10-02T21:53:54Z","updated_at":"2016-10-02T21:53:54Z","html_url":"https://github.com/oppia/oppia/pull/2507#discussion_r81478871","pull_request_url":"https://api.github.com/repos/oppia/oppia/pulls/2507","_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments/81478871"},"html":{"href":"https://github.com/oppia/oppia/pull/2507#discussion_r81478871"},"pull_request":{"href":"https://api.github.com/repos/oppia/oppia/pulls/2507"}}},"pull_request":{"url":"https://api.github.com/repos/oppia/oppia/pulls/2507","id":86463725,"html_url":"https://github.com/oppia/oppia/pull/2507","diff_url":"https://github.com/oppia/oppia/pull/2507.diff","patch_url":"https://github.com/oppia/oppia/pull/2507.patch","issue_url":"https://api.github.com/repos/oppia/oppia/issues/2507","number":2507,"state":"open","locked":false,"title":"Fix #2223: explorations now appear sorted in Top Rated and Recently Published pages ","user":{"login":"Arunabh98","id":13691317,"avatar_url":"https://avatars.githubusercontent.com/u/13691317?v=3","gravatar_id":"","url":"https://api.github.com/users/Arunabh98","html_url":"https://github.com/Arunabh98","followers_url":"https://api.github.com/users/Arunabh98/followers","following_url":"https://api.github.com/users/Arunabh98/following{/other_user}","gists_url":"https://api.github.com/users/Arunabh98/gists{/gist_id}","starred_url":"https://api.github.com/users/Arunabh98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arunabh98/subscriptions","organizations_url":"https://api.github.com/users/Arunabh98/orgs","repos_url":"https://api.github.com/users/Arunabh98/repos","events_url":"https://api.github.com/users/Arunabh98/events{/privacy}","received_events_url":"https://api.github.com/users/Arunabh98/received_events","type":"User","site_admin":false},"body":"After discussion in #2223 we decided to fetch the explorations for top rated and recently published pages by database query. Also I did not have to create a additional handler to take care of these two cases. Instead I extended the functionality of the current handler to take care of these two cases. I extended the url schema so that we can take care of these two cases without changing the urls of the current pages. I also changed the database query function so that we can fetch a variable number of explorations which is necessary as we have to show different number of explorations in the main library page and those two pages. Made some changes to LibraryPage handler in library.py to account for changes in urls and pass title from the backend itself.\r\n\r\n@seanlip ","created_at":"2016-09-23T07:09:43Z","updated_at":"2016-10-02T21:53:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"08210faf6ceaf8baf228fc9fc28e057301b47b83","assignee":{"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},"assignees":[{"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}],"milestone":null,"commits_url":"https://api.github.com/repos/oppia/oppia/pulls/2507/commits","review_comments_url":"https://api.github.com/repos/oppia/oppia/pulls/2507/comments","review_comment_url":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oppia/oppia/issues/2507/comments","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/180e58e1ab1d8d9e187e62866b9d8e484287d606","head":{"label":"Arunabh98:search-results-sort","ref":"search-results-sort","sha":"180e58e1ab1d8d9e187e62866b9d8e484287d606","user":{"login":"Arunabh98","id":13691317,"avatar_url":"https://avatars.githubusercontent.com/u/13691317?v=3","gravatar_id":"","url":"https://api.github.com/users/Arunabh98","html_url":"https://github.com/Arunabh98","followers_url":"https://api.github.com/users/Arunabh98/followers","following_url":"https://api.github.com/users/Arunabh98/following{/other_user}","gists_url":"https://api.github.com/users/Arunabh98/gists{/gist_id}","starred_url":"https://api.github.com/users/Arunabh98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arunabh98/subscriptions","organizations_url":"https://api.github.com/users/Arunabh98/orgs","repos_url":"https://api.github.com/users/Arunabh98/repos","events_url":"https://api.github.com/users/Arunabh98/events{/privacy}","received_events_url":"https://api.github.com/users/Arunabh98/received_events","type":"User","site_admin":false},"repo":{"id":63477087,"name":"oppia","full_name":"Arunabh98/oppia","owner":{"login":"Arunabh98","id":13691317,"avatar_url":"https://avatars.githubusercontent.com/u/13691317?v=3","gravatar_id":"","url":"https://api.github.com/users/Arunabh98","html_url":"https://github.com/Arunabh98","followers_url":"https://api.github.com/users/Arunabh98/followers","following_url":"https://api.github.com/users/Arunabh98/following{/other_user}","gists_url":"https://api.github.com/users/Arunabh98/gists{/gist_id}","starred_url":"https://api.github.com/users/Arunabh98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arunabh98/subscriptions","organizations_url":"https://api.github.com/users/Arunabh98/orgs","repos_url":"https://api.github.com/users/Arunabh98/repos","events_url":"https://api.github.com/users/Arunabh98/events{/privacy}","received_events_url":"https://api.github.com/users/Arunabh98/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Arunabh98/oppia","description":"Tool for collaboratively building interactive lessons.","fork":true,"url":"https://api.github.com/repos/Arunabh98/oppia","forks_url":"https://api.github.com/repos/Arunabh98/oppia/forks","keys_url":"https://api.github.com/repos/Arunabh98/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Arunabh98/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Arunabh98/oppia/teams","hooks_url":"https://api.github.com/repos/Arunabh98/oppia/hooks","issue_events_url":"https://api.github.com/repos/Arunabh98/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/Arunabh98/oppia/events","assignees_url":"https://api.github.com/repos/Arunabh98/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/Arunabh98/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/Arunabh98/oppia/tags","blobs_url":"https://api.github.com/repos/Arunabh98/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Arunabh98/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Arunabh98/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/Arunabh98/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Arunabh98/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/Arunabh98/oppia/languages","stargazers_url":"https://api.github.com/repos/Arunabh98/oppia/stargazers","contributors_url":"https://api.github.com/repos/Arunabh98/oppia/contributors","subscribers_url":"https://api.github.com/repos/Arunabh98/oppia/subscribers","subscription_url":"https://api.github.com/repos/Arunabh98/oppia/subscription","commits_url":"https://api.github.com/repos/Arunabh98/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/Arunabh98/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/Arunabh98/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/Arunabh98/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/Arunabh98/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/Arunabh98/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Arunabh98/oppia/merges","archive_url":"https://api.github.com/repos/Arunabh98/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Arunabh98/oppia/downloads","issues_url":"https://api.github.com/repos/Arunabh98/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/Arunabh98/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/Arunabh98/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/Arunabh98/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Arunabh98/oppia/labels{/name}","releases_url":"https://api.github.com/repos/Arunabh98/oppia/releases{/id}","deployments_url":"https://api.github.com/repos/Arunabh98/oppia/deployments","created_at":"2016-07-16T10:05:00Z","updated_at":"2016-07-16T10:05:04Z","pushed_at":"2016-10-02T03:14:38Z","git_url":"git://github.com/Arunabh98/oppia.git","ssh_url":"git@github.com:Arunabh98/oppia.git","clone_url":"https://github.com/Arunabh98/oppia.git","svn_url":"https://github.com/Arunabh98/oppia","homepage":"https://www.oppia.org","size":47489,"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":"e9aa0e7d31ff55ebbdf22cda71fe165b6658b3c6","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 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":"2016-10-02T12:21:45Z","pushed_at":"2016-10-02T21:35:02Z","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":89881,"stargazers_count":167,"watchers_count":167,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":252,"mirror_url":null,"open_issues_count":340,"forks":252,"open_issues":340,"watchers":167,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/2507"},"html":{"href":"https://github.com/oppia/oppia/pull/2507"},"issue":{"href":"https://api.github.com/repos/oppia/oppia/issues/2507"},"comments":{"href":"https://api.github.com/repos/oppia/oppia/issues/2507/comments"},"review_comments":{"href":"https://api.github.com/repos/oppia/oppia/pulls/2507/comments"},"review_comment":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oppia/oppia/pulls/2507/commits"},"statuses":{"href":"https://api.github.com/repos/oppia/oppia/statuses/180e58e1ab1d8d9e187e62866b9d8e484287d606"}}}}
{"actor":{"display_login":"seanlip"}}