{"action":"created","comment":{"url":"https://api.github.com/repos/mitodl/micromasters/pulls/comments/58117246","id":58117246,"diff_hunk":"@@ -17,15 +17,40 @@ def __str__(self):\n \n class Course(models.Model):\n     \"\"\"\n-    An individual course within a Program, e.g. \"Supply Chain 101\"\n+    A logical representation of a course, such as \"Supply Chain Management\n+    101\". This won't have associated dates or any specific information about a\n+    given course instance (aka course run), but rather only the things that are\n+    general across multiple course runs.\n+    \"\"\"\n+    program = models.ForeignKey(Program)\n+\n+    # These fields will likely make their way into the CMS at some point.\n+    title = models.CharField(max_length=255)\n+    thumbnail = models.ImageField(null=True, blank=True)\n+    description = models.TextField(blank=True, null=True)\n+    prerequisites = models.TextField(blank=True, null=True)\n+\n+    def __str__(self):\n+        return self.title\n+\n+\n+class CourseRun(models.Model):\n+    \"\"\"\n+    An individual run of a course within a Program, e.g. \"Supply Chain 101\n+    - Summer 2017\". This is different than the logical notion of a course, but\n+      rather a specific instance of that course being taught.\n     \"\"\"\n     title = models.CharField(max_length=255)\n     edx_course_key = models.CharField(max_length=255, blank=True, null=True)","path":"courses/models.py","position":29,"original_position":29,"commit_id":"a378cf802d4a3fb80d2d7e581e70f08c78cfea26","original_commit_id":"a378cf802d4a3fb80d2d7e581e70f08c78cfea26","user":{"login":"pdpinch","id":430126,"avatar_url":"https://avatars.githubusercontent.com/u/430126?v=3","gravatar_id":"","url":"https://api.github.com/users/pdpinch","html_url":"https://github.com/pdpinch","followers_url":"https://api.github.com/users/pdpinch/followers","following_url":"https://api.github.com/users/pdpinch/following{/other_user}","gists_url":"https://api.github.com/users/pdpinch/gists{/gist_id}","starred_url":"https://api.github.com/users/pdpinch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdpinch/subscriptions","organizations_url":"https://api.github.com/users/pdpinch/orgs","repos_url":"https://api.github.com/users/pdpinch/repos","events_url":"https://api.github.com/users/pdpinch/events{/privacy}","received_events_url":"https://api.github.com/users/pdpinch/received_events","type":"User","site_admin":false},"body":"I'm debating whether some help text may be useful here. \r\n\r\n`Can be null, a deprecated course key or a split mongo course key. Intended for course keys on edx.org`","created_at":"2016-03-31T19:54:50Z","updated_at":"2016-03-31T19:54:50Z","html_url":"https://github.com/mitodl/micromasters/pull/129#discussion_r58117246","pull_request_url":"https://api.github.com/repos/mitodl/micromasters/pulls/129","_links":{"self":{"href":"https://api.github.com/repos/mitodl/micromasters/pulls/comments/58117246"},"html":{"href":"https://github.com/mitodl/micromasters/pull/129#discussion_r58117246"},"pull_request":{"href":"https://api.github.com/repos/mitodl/micromasters/pulls/129"}}},"pull_request":{"url":"https://api.github.com/repos/mitodl/micromasters/pulls/129","id":64836339,"html_url":"https://github.com/mitodl/micromasters/pull/129","diff_url":"https://github.com/mitodl/micromasters/pull/129.diff","patch_url":"https://github.com/mitodl/micromasters/pull/129.patch","issue_url":"https://api.github.com/repos/mitodl/micromasters/issues/129","number":129,"state":"closed","locked":false,"title":"Course runs","user":{"login":"justinabrahms","id":3853,"avatar_url":"https://avatars.githubusercontent.com/u/3853?v=3","gravatar_id":"","url":"https://api.github.com/users/justinabrahms","html_url":"https://github.com/justinabrahms","followers_url":"https://api.github.com/users/justinabrahms/followers","following_url":"https://api.github.com/users/justinabrahms/following{/other_user}","gists_url":"https://api.github.com/users/justinabrahms/gists{/gist_id}","starred_url":"https://api.github.com/users/justinabrahms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinabrahms/subscriptions","organizations_url":"https://api.github.com/users/justinabrahms/orgs","repos_url":"https://api.github.com/users/justinabrahms/repos","events_url":"https://api.github.com/users/justinabrahms/events{/privacy}","received_events_url":"https://api.github.com/users/justinabrahms/received_events","type":"User","site_admin":false},"body":"#### What are the relevant tickets?\r\nFixes #124 \r\n\r\n#### What's this PR do?\r\nMoves the old `Course` model to `CourseRun` and introduces a logical parent for it, called `Course`. `Course` denotes a course which isn't bound by a specific start/end date.\r\n\r\n#### Where should the reviewer start?\r\nmodels.py\r\n\r\n#### How should this be manually tested?\r\nShould be functionally identical, save a new admin.\r\n\r\n#### Any background context you want to provide?\r\nWe need a way to track multiple courses runs. These will be manually entered, because edx course ids aren't deterministic.\r\n\r\n#### Screenshots (if appropriate)\r\n\r\n![course-admin](https://cloud.githubusercontent.com/assets/3853/14186385/22a66b64-f74c-11e5-85da-99e05a3fe2be.png)\r\n\r\n#### What GIF best describes this PR or how it makes you feel?\r\n![](http://s.mlkshk-cdn.com/r/181SN.gif)","created_at":"2016-03-31T18:29:03Z","updated_at":"2016-03-31T19:54:50Z","closed_at":"2016-03-31T19:43:54Z","merged_at":"2016-03-31T19:43:54Z","merge_commit_sha":"b5be698796f67b2fadcf2d6efbb8040d843d0c28","assignee":{"login":"giocalitri","id":1005204,"avatar_url":"https://avatars.githubusercontent.com/u/1005204?v=3","gravatar_id":"","url":"https://api.github.com/users/giocalitri","html_url":"https://github.com/giocalitri","followers_url":"https://api.github.com/users/giocalitri/followers","following_url":"https://api.github.com/users/giocalitri/following{/other_user}","gists_url":"https://api.github.com/users/giocalitri/gists{/gist_id}","starred_url":"https://api.github.com/users/giocalitri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giocalitri/subscriptions","organizations_url":"https://api.github.com/users/giocalitri/orgs","repos_url":"https://api.github.com/users/giocalitri/repos","events_url":"https://api.github.com/users/giocalitri/events{/privacy}","received_events_url":"https://api.github.com/users/giocalitri/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/mitodl/micromasters/pulls/129/commits","review_comments_url":"https://api.github.com/repos/mitodl/micromasters/pulls/129/comments","review_comment_url":"https://api.github.com/repos/mitodl/micromasters/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mitodl/micromasters/issues/129/comments","statuses_url":"https://api.github.com/repos/mitodl/micromasters/statuses/a378cf802d4a3fb80d2d7e581e70f08c78cfea26","head":{"label":"mitodl:course-runs","ref":"course-runs","sha":"a378cf802d4a3fb80d2d7e581e70f08c78cfea26","user":{"login":"mitodl","id":7918516,"avatar_url":"https://avatars.githubusercontent.com/u/7918516?v=3","gravatar_id":"","url":"https://api.github.com/users/mitodl","html_url":"https://github.com/mitodl","followers_url":"https://api.github.com/users/mitodl/followers","following_url":"https://api.github.com/users/mitodl/following{/other_user}","gists_url":"https://api.github.com/users/mitodl/gists{/gist_id}","starred_url":"https://api.github.com/users/mitodl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitodl/subscriptions","organizations_url":"https://api.github.com/users/mitodl/orgs","repos_url":"https://api.github.com/users/mitodl/repos","events_url":"https://api.github.com/users/mitodl/events{/privacy}","received_events_url":"https://api.github.com/users/mitodl/received_events","type":"Organization","site_admin":false},"repo":{"id":52919185,"name":"micromasters","full_name":"mitodl/micromasters","owner":{"login":"mitodl","id":7918516,"avatar_url":"https://avatars.githubusercontent.com/u/7918516?v=3","gravatar_id":"","url":"https://api.github.com/users/mitodl","html_url":"https://github.com/mitodl","followers_url":"https://api.github.com/users/mitodl/followers","following_url":"https://api.github.com/users/mitodl/following{/other_user}","gists_url":"https://api.github.com/users/mitodl/gists{/gist_id}","starred_url":"https://api.github.com/users/mitodl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitodl/subscriptions","organizations_url":"https://api.github.com/users/mitodl/orgs","repos_url":"https://api.github.com/users/mitodl/repos","events_url":"https://api.github.com/users/mitodl/events{/privacy}","received_events_url":"https://api.github.com/users/mitodl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mitodl/micromasters","description":"Portal for learners and course teams to access MITx micromasters programs: https://goo.gl/tsUTSO","fork":false,"url":"https://api.github.com/repos/mitodl/micromasters","forks_url":"https://api.github.com/repos/mitodl/micromasters/forks","keys_url":"https://api.github.com/repos/mitodl/micromasters/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mitodl/micromasters/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mitodl/micromasters/teams","hooks_url":"https://api.github.com/repos/mitodl/micromasters/hooks","issue_events_url":"https://api.github.com/repos/mitodl/micromasters/issues/events{/number}","events_url":"https://api.github.com/repos/mitodl/micromasters/events","assignees_url":"https://api.github.com/repos/mitodl/micromasters/assignees{/user}","branches_url":"https://api.github.com/repos/mitodl/micromasters/branches{/branch}","tags_url":"https://api.github.com/repos/mitodl/micromasters/tags","blobs_url":"https://api.github.com/repos/mitodl/micromasters/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mitodl/micromasters/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mitodl/micromasters/git/refs{/sha}","trees_url":"https://api.github.com/repos/mitodl/micromasters/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mitodl/micromasters/statuses/{sha}","languages_url":"https://api.github.com/repos/mitodl/micromasters/languages","stargazers_url":"https://api.github.com/repos/mitodl/micromasters/stargazers","contributors_url":"https://api.github.com/repos/mitodl/micromasters/contributors","subscribers_url":"https://api.github.com/repos/mitodl/micromasters/subscribers","subscription_url":"https://api.github.com/repos/mitodl/micromasters/subscription","commits_url":"https://api.github.com/repos/mitodl/micromasters/commits{/sha}","git_commits_url":"https://api.github.com/repos/mitodl/micromasters/git/commits{/sha}","comments_url":"https://api.github.com/repos/mitodl/micromasters/comments{/number}","issue_comment_url":"https://api.github.com/repos/mitodl/micromasters/issues/comments{/number}","contents_url":"https://api.github.com/repos/mitodl/micromasters/contents/{+path}","compare_url":"https://api.github.com/repos/mitodl/micromasters/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mitodl/micromasters/merges","archive_url":"https://api.github.com/repos/mitodl/micromasters/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mitodl/micromasters/downloads","issues_url":"https://api.github.com/repos/mitodl/micromasters/issues{/number}","pulls_url":"https://api.github.com/repos/mitodl/micromasters/pulls{/number}","milestones_url":"https://api.github.com/repos/mitodl/micromasters/milestones{/number}","notifications_url":"https://api.github.com/repos/mitodl/micromasters/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mitodl/micromasters/labels{/name}","releases_url":"https://api.github.com/repos/mitodl/micromasters/releases{/id}","deployments_url":"https://api.github.com/repos/mitodl/micromasters/deployments","created_at":"2016-03-01T23:53:17Z","updated_at":"2016-03-25T01:03:13Z","pushed_at":"2016-03-31T19:43:58Z","git_url":"git://github.com/mitodl/micromasters.git","ssh_url":"git@github.com:mitodl/micromasters.git","clone_url":"https://github.com/mitodl/micromasters.git","svn_url":"https://github.com/mitodl/micromasters","homepage":"","size":116,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":40,"forks":0,"open_issues":40,"watchers":1,"default_branch":"master"}},"base":{"label":"mitodl:master","ref":"master","sha":"2bb0e918f19e7673d7daeadf4066070733a6bcb1","user":{"login":"mitodl","id":7918516,"avatar_url":"https://avatars.githubusercontent.com/u/7918516?v=3","gravatar_id":"","url":"https://api.github.com/users/mitodl","html_url":"https://github.com/mitodl","followers_url":"https://api.github.com/users/mitodl/followers","following_url":"https://api.github.com/users/mitodl/following{/other_user}","gists_url":"https://api.github.com/users/mitodl/gists{/gist_id}","starred_url":"https://api.github.com/users/mitodl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitodl/subscriptions","organizations_url":"https://api.github.com/users/mitodl/orgs","repos_url":"https://api.github.com/users/mitodl/repos","events_url":"https://api.github.com/users/mitodl/events{/privacy}","received_events_url":"https://api.github.com/users/mitodl/received_events","type":"Organization","site_admin":false},"repo":{"id":52919185,"name":"micromasters","full_name":"mitodl/micromasters","owner":{"login":"mitodl","id":7918516,"avatar_url":"https://avatars.githubusercontent.com/u/7918516?v=3","gravatar_id":"","url":"https://api.github.com/users/mitodl","html_url":"https://github.com/mitodl","followers_url":"https://api.github.com/users/mitodl/followers","following_url":"https://api.github.com/users/mitodl/following{/other_user}","gists_url":"https://api.github.com/users/mitodl/gists{/gist_id}","starred_url":"https://api.github.com/users/mitodl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitodl/subscriptions","organizations_url":"https://api.github.com/users/mitodl/orgs","repos_url":"https://api.github.com/users/mitodl/repos","events_url":"https://api.github.com/users/mitodl/events{/privacy}","received_events_url":"https://api.github.com/users/mitodl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mitodl/micromasters","description":"Portal for learners and course teams to access MITx micromasters programs: https://goo.gl/tsUTSO","fork":false,"url":"https://api.github.com/repos/mitodl/micromasters","forks_url":"https://api.github.com/repos/mitodl/micromasters/forks","keys_url":"https://api.github.com/repos/mitodl/micromasters/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mitodl/micromasters/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mitodl/micromasters/teams","hooks_url":"https://api.github.com/repos/mitodl/micromasters/hooks","issue_events_url":"https://api.github.com/repos/mitodl/micromasters/issues/events{/number}","events_url":"https://api.github.com/repos/mitodl/micromasters/events","assignees_url":"https://api.github.com/repos/mitodl/micromasters/assignees{/user}","branches_url":"https://api.github.com/repos/mitodl/micromasters/branches{/branch}","tags_url":"https://api.github.com/repos/mitodl/micromasters/tags","blobs_url":"https://api.github.com/repos/mitodl/micromasters/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mitodl/micromasters/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mitodl/micromasters/git/refs{/sha}","trees_url":"https://api.github.com/repos/mitodl/micromasters/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mitodl/micromasters/statuses/{sha}","languages_url":"https://api.github.com/repos/mitodl/micromasters/languages","stargazers_url":"https://api.github.com/repos/mitodl/micromasters/stargazers","contributors_url":"https://api.github.com/repos/mitodl/micromasters/contributors","subscribers_url":"https://api.github.com/repos/mitodl/micromasters/subscribers","subscription_url":"https://api.github.com/repos/mitodl/micromasters/subscription","commits_url":"https://api.github.com/repos/mitodl/micromasters/commits{/sha}","git_commits_url":"https://api.github.com/repos/mitodl/micromasters/git/commits{/sha}","comments_url":"https://api.github.com/repos/mitodl/micromasters/comments{/number}","issue_comment_url":"https://api.github.com/repos/mitodl/micromasters/issues/comments{/number}","contents_url":"https://api.github.com/repos/mitodl/micromasters/contents/{+path}","compare_url":"https://api.github.com/repos/mitodl/micromasters/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mitodl/micromasters/merges","archive_url":"https://api.github.com/repos/mitodl/micromasters/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mitodl/micromasters/downloads","issues_url":"https://api.github.com/repos/mitodl/micromasters/issues{/number}","pulls_url":"https://api.github.com/repos/mitodl/micromasters/pulls{/number}","milestones_url":"https://api.github.com/repos/mitodl/micromasters/milestones{/number}","notifications_url":"https://api.github.com/repos/mitodl/micromasters/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mitodl/micromasters/labels{/name}","releases_url":"https://api.github.com/repos/mitodl/micromasters/releases{/id}","deployments_url":"https://api.github.com/repos/mitodl/micromasters/deployments","created_at":"2016-03-01T23:53:17Z","updated_at":"2016-03-25T01:03:13Z","pushed_at":"2016-03-31T19:43:58Z","git_url":"git://github.com/mitodl/micromasters.git","ssh_url":"git@github.com:mitodl/micromasters.git","clone_url":"https://github.com/mitodl/micromasters.git","svn_url":"https://github.com/mitodl/micromasters","homepage":"","size":116,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":40,"forks":0,"open_issues":40,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mitodl/micromasters/pulls/129"},"html":{"href":"https://github.com/mitodl/micromasters/pull/129"},"issue":{"href":"https://api.github.com/repos/mitodl/micromasters/issues/129"},"comments":{"href":"https://api.github.com/repos/mitodl/micromasters/issues/129/comments"},"review_comments":{"href":"https://api.github.com/repos/mitodl/micromasters/pulls/129/comments"},"review_comment":{"href":"https://api.github.com/repos/mitodl/micromasters/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mitodl/micromasters/pulls/129/commits"},"statuses":{"href":"https://api.github.com/repos/mitodl/micromasters/statuses/a378cf802d4a3fb80d2d7e581e70f08c78cfea26"}}}}