{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/comments/47965595","id":47965595,"diff_hunk":"@@ -265,6 +266,39 @@ def get_from_id(cls, course_id):\n             course_overview = None\n         return course_overview or cls.load_from_module_store(course_id)\n \n+    def get_course_status(self, cert_status):","path":"openedx/core/djangoapps/content/course_overviews/models.py","position":12,"original_position":12,"commit_id":"130df1cdd347ef1964199e231b8e3e9408b337e4","original_commit_id":"130df1cdd347ef1964199e231b8e3e9408b337e4","user":{"login":"nasthagiri","id":6772826,"avatar_url":"https://avatars.githubusercontent.com/u/6772826?v=3","gravatar_id":"","url":"https://api.github.com/users/nasthagiri","html_url":"https://github.com/nasthagiri","followers_url":"https://api.github.com/users/nasthagiri/followers","following_url":"https://api.github.com/users/nasthagiri/following{/other_user}","gists_url":"https://api.github.com/users/nasthagiri/gists{/gist_id}","starred_url":"https://api.github.com/users/nasthagiri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nasthagiri/subscriptions","organizations_url":"https://api.github.com/users/nasthagiri/orgs","repos_url":"https://api.github.com/users/nasthagiri/repos","events_url":"https://api.github.com/users/nasthagiri/events{/privacy}","received_events_url":"https://api.github.com/users/nasthagiri/received_events","type":"User","site_admin":false},"body":"Is this method `get_course_status` semantically specific to certificates?  Currently, it does seem that way.  If so, I'd recommend moving it to a certificate-specific library (along with 'may_certify').  Or, at the least, renaming it to something like 'get_certificate_status`.\r\n\r\nMy inclination is to keep only the course data model in the course_overviews.models module.  All other business logic (in this case, specific to certificates/status), should be at a higher layer.","created_at":"2015-12-17T21:45:40Z","updated_at":"2015-12-17T21:45:40Z","html_url":"https://github.com/edx/edx-platform/pull/10597#discussion_r47965595","pull_request_url":"https://api.github.com/repos/edx/edx-platform/pulls/10597","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments/47965595"},"html":{"href":"https://github.com/edx/edx-platform/pull/10597#discussion_r47965595"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/10597"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/10597","id":50506396,"html_url":"https://github.com/edx/edx-platform/pull/10597","diff_url":"https://github.com/edx/edx-platform/pull/10597.diff","patch_url":"https://github.com/edx/edx-platform/pull/10597.patch","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/10597","number":10597,"state":"open","locked":false,"title":"Ecom-2815 Organize courses on Dashboard based on course dates","user":{"login":"afeef","id":1297612,"avatar_url":"https://avatars.githubusercontent.com/u/1297612?v=3","gravatar_id":"","url":"https://api.github.com/users/afeef","html_url":"https://github.com/afeef","followers_url":"https://api.github.com/users/afeef/followers","following_url":"https://api.github.com/users/afeef/following{/other_user}","gists_url":"https://api.github.com/users/afeef/gists{/gist_id}","starred_url":"https://api.github.com/users/afeef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afeef/subscriptions","organizations_url":"https://api.github.com/users/afeef/orgs","repos_url":"https://api.github.com/users/afeef/repos","events_url":"https://api.github.com/users/afeef/events{/privacy}","received_events_url":"https://api.github.com/users/afeef/received_events","type":"User","site_admin":false},"body":"[ECOM-2602](https://openedx.atlassian.net/browse/ECOM-2602) - Organize courses on Dashboard based on course dates\r\n\r\n- [x] Display tabs for ```current``` and ```archived``` courses\r\n- [x] Create a dashboard factory in backbone\r\n- [x] Create thin backbone views to display the courses\r\n- [x] Create a backbone router to switch among the tabs and go directly to them through the browser url\r\n- [x] Filter ```course_enrollments``` for ```active``` and ```completed``` courses\r\n- [ ] Write backbone views spec/tests and python unit tests\r\n- [x] Fix the failing tests\r\n- [x] Include the script removed from ```lms/templates/dashboard/_dashboard_course_listing.html``` in some relevant place (need to figure out)\r\n- [x] fine tune the styles\r\n- [ ] a11y review \r\n- [ ] remove blue focus after (non-keyboard) click of a dashboard tab. (see teams app for JS example) \r\n- [x] review text for empty state of Archived tab, suggestions / changes from @srpearce \r\n\r\n\r\n**WIP** : @awais786 @ahsan-ul-haq @zubair-arbi @tasawernawaz @clintonb @AlasdairSwan \r\n\r\n<img width=\"925\" alt=\"screen shot 2015-11-25 at 11 26 54 am\" src=\"https://cloud.githubusercontent.com/assets/1297612/11390010/8c1dcb4e-9367-11e5-9119-5b9ca13b775d.png\">\r\n\r\n","created_at":"2015-11-12T12:44:56Z","updated_at":"2015-12-17T21:45:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fcc172cc9fdcaa80c0fc7cd2428c5075afe9b9f0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-platform/pulls/10597/commits","review_comments_url":"https://api.github.com/repos/edx/edx-platform/pulls/10597/comments","review_comment_url":"https://api.github.com/repos/edx/edx-platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/edx-platform/issues/10597/comments","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/130df1cdd347ef1964199e231b8e3e9408b337e4","head":{"label":"edx:afeef/story/ECOM-2815-organize-courses-on-student-dashboard","ref":"afeef/story/ECOM-2815-organize-courses-on-student-dashboard","sha":"130df1cdd347ef1964199e231b8e3e9408b337e4","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":10391073,"name":"edx-platform","full_name":"edx/edx-platform","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-platform","description":"The Open edX platform, the software that powers edX!","fork":false,"url":"https://api.github.com/repos/edx/edx-platform","forks_url":"https://api.github.com/repos/edx/edx-platform/forks","keys_url":"https://api.github.com/repos/edx/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-platform/teams","hooks_url":"https://api.github.com/repos/edx/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-platform/events","assignees_url":"https://api.github.com/repos/edx/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-platform/tags","blobs_url":"https://api.github.com/repos/edx/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-platform/languages","stargazers_url":"https://api.github.com/repos/edx/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-platform/subscription","commits_url":"https://api.github.com/repos/edx/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-platform/merges","archive_url":"https://api.github.com/repos/edx/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-platform/downloads","issues_url":"https://api.github.com/repos/edx/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-platform/releases{/id}","created_at":"2013-05-30T20:20:38Z","updated_at":"2015-12-17T17:08:16Z","pushed_at":"2015-12-17T21:30:13Z","git_url":"git://github.com/edx/edx-platform.git","ssh_url":"git@github.com:edx/edx-platform.git","clone_url":"https://github.com/edx/edx-platform.git","svn_url":"https://github.com/edx/edx-platform","homepage":"http://open.edx.org/","size":634112,"stargazers_count":2312,"watchers_count":2312,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1400,"mirror_url":null,"open_issues_count":136,"forks":1400,"open_issues":136,"watchers":2312,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"abb8484ec22e167604e0b10ae2dd1639856aaab8","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":10391073,"name":"edx-platform","full_name":"edx/edx-platform","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-platform","description":"The Open edX platform, the software that powers edX!","fork":false,"url":"https://api.github.com/repos/edx/edx-platform","forks_url":"https://api.github.com/repos/edx/edx-platform/forks","keys_url":"https://api.github.com/repos/edx/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-platform/teams","hooks_url":"https://api.github.com/repos/edx/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-platform/events","assignees_url":"https://api.github.com/repos/edx/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-platform/tags","blobs_url":"https://api.github.com/repos/edx/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-platform/languages","stargazers_url":"https://api.github.com/repos/edx/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-platform/subscription","commits_url":"https://api.github.com/repos/edx/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-platform/merges","archive_url":"https://api.github.com/repos/edx/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-platform/downloads","issues_url":"https://api.github.com/repos/edx/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-platform/releases{/id}","created_at":"2013-05-30T20:20:38Z","updated_at":"2015-12-17T17:08:16Z","pushed_at":"2015-12-17T21:30:13Z","git_url":"git://github.com/edx/edx-platform.git","ssh_url":"git@github.com:edx/edx-platform.git","clone_url":"https://github.com/edx/edx-platform.git","svn_url":"https://github.com/edx/edx-platform","homepage":"http://open.edx.org/","size":634112,"stargazers_count":2312,"watchers_count":2312,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1400,"mirror_url":null,"open_issues_count":136,"forks":1400,"open_issues":136,"watchers":2312,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/10597"},"html":{"href":"https://github.com/edx/edx-platform/pull/10597"},"issue":{"href":"https://api.github.com/repos/edx/edx-platform/issues/10597"},"comments":{"href":"https://api.github.com/repos/edx/edx-platform/issues/10597/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/10597/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/10597/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-platform/statuses/130df1cdd347ef1964199e231b8e3e9408b337e4"}}}}