{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/comments/40059669","id":40059669,"diff_hunk":"@@ -81,3 +86,154 @@ def test_dashboard_social_sharing_feature(self):\n         self.assertEqual(facebook_widget.attrs('target')[0], '_blank')\n         self.assertIn(facebook_url, facebook_widget.attrs('href')[0])\n         self.assertIn(facebook_url, facebook_widget.attrs('onclick')[0])\n+\n+\n+class LmsDashboardCourseDateTest(UniqueCourseTest):\n+    \"\"\" Test suite for the LMS Student Dashboard page \"\"\"\n+    def setUp(self):\n+        \"\"\"\n+        Initializes the components (page objects, courses, users) for this test suite\n+        \"\"\"\n+        # default username and password for test users\n+        self.username = \"test_{uuid}\".format(uuid=self.unique_id[0:6])\n+        self.email = \"{user}@example.com\".format(user=self.username)\n+\n+        # default values for course start and date,\n+        # we changes course start and end dates if test scenarios require\n+        # otherwise we leave it to the default values\n+        self.course_start_date = None\n+        self.course_end_date = None\n+\n+        # now datetime for usage in tests\n+        self.now = datetime.datetime.now()\n+\n+        # Some parameters are provided by the parent setUp() routine, such as the following:\n+        # self.course_id, self.course_info, self.unique_id\n+        super(LmsDashboardCourseDateTest, self).setUp()\n+\n+        # Load page objects for use by the tests\n+        self.dashboard_page = DashboardPage(self.browser)\n+\n+    def course_and_user_setup(self):\n+        \"\"\"\n+        Create a Course with start and end dates and then create a test user and enroll the user into the course,\n+        After the user is logged in and enrolled in the course, visit dashboard page.\n+        \"\"\"\n+        # install course fixtures with start and end dates\n+        self.install_course_fixture(\n+            self.course_info[\"org\"],\n+            self.course_info[\"number\"],\n+            self.course_info[\"run\"],\n+            self.course_info[\"display_name\"],\n+            start_date=self.course_start_date,\n+            end_date=self.course_end_date,\n+        )\n+\n+        # create a user and enroll them in the course above created\n+        self.create_user_and_enroll_them_with_course(\n+            username=self.username,\n+            email=self.email,\n+            course_id=self.course_id\n+        )\n+\n+        # Navigate the authenticated, enrolled user to the dashboard page and get testing!\n+        self.dashboard_page.visit()\n+\n+    def install_course_fixture(self, org, number, run, display_name, start_date=None, end_date=None, settings=None):\n+        \"\"\"\n+        Configure some aspects of the test course and install the settings into the course\n+        \"\"\"\n+\n+        course_fixture = CourseFixture(\n+            org=org,\n+            number=number,\n+            run=run,\n+            display_name=display_name,\n+            start_date=start_date,\n+            end_date=end_date,\n+            settings=settings,\n+        )\n+        course_fixture.install()\n+\n+    def create_user_and_enroll_them_with_course(self, username, email, course_id):\n+        \"\"\"\n+        Create the test user, register them for the course, and authenticate\n+        \"\"\"\n+\n+        auto_auth_page = AutoAuthPage(\n+            self.browser,\n+            username=username,\n+            email=email,\n+            course_id=course_id,\n+        )\n+        auto_auth_page.visit()\n+\n+    def test_ended_course_date(self):\n+        \"\"\"\n+        Validate the behavior of course dates on student dashboard, when course has ended\n+        \"\"\"\n+        self.course_start_date = datetime.datetime(1970, 1, 1)\n+        self.course_end_date = self.now - datetime.timedelta(days=90)\n+\n+        self.course_and_user_setup()\n+\n+        end_date = self.course_end_date.strftime(DEFAULT_SHORT_DATE_FORMAT)\n+        expected_course_date = \"Ended - {end_date}\".format(end_date=end_date)","path":"common/test/acceptance/tests/lms/test_lms_dashboard.py","position":113,"original_position":113,"commit_id":"22a7a63cfaa1484d97e900ba9156ad64bc08aea8","original_commit_id":"22a7a63cfaa1484d97e900ba9156ad64bc08aea8","user":{"login":"ziafazal","id":434995,"avatar_url":"https://avatars.githubusercontent.com/u/434995?v=3","gravatar_id":"","url":"https://api.github.com/users/ziafazal","html_url":"https://github.com/ziafazal","followers_url":"https://api.github.com/users/ziafazal/followers","following_url":"https://api.github.com/users/ziafazal/following{/other_user}","gists_url":"https://api.github.com/users/ziafazal/gists{/gist_id}","starred_url":"https://api.github.com/users/ziafazal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ziafazal/subscriptions","organizations_url":"https://api.github.com/users/ziafazal/orgs","repos_url":"https://api.github.com/users/ziafazal/repos","events_url":"https://api.github.com/users/ziafazal/events{/privacy}","received_events_url":"https://api.github.com/users/ziafazal/received_events","type":"User","site_admin":false},"body":"These expression should use same functions as used in student dashboard view i.e `course_overview.start_datetime_text` instead of duplicating them here.","created_at":"2015-09-22T07:45:08Z","updated_at":"2015-09-22T07:45:08Z","html_url":"https://github.com/edx/edx-platform/pull/9822#discussion_r40059669","pull_request_url":"https://api.github.com/repos/edx/edx-platform/pulls/9822","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments/40059669"},"html":{"href":"https://github.com/edx/edx-platform/pull/9822#discussion_r40059669"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/9822"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/9822","id":45400178,"html_url":"https://github.com/edx/edx-platform/pull/9822","diff_url":"https://github.com/edx/edx-platform/pull/9822.diff","patch_url":"https://github.com/edx/edx-platform/pull/9822.patch","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/9822","number":9822,"state":"open","locked":false,"title":"saleem-latif/SOL-565","user":{"login":"saleem-latif","id":7114956,"avatar_url":"https://avatars.githubusercontent.com/u/7114956?v=3","gravatar_id":"","url":"https://api.github.com/users/saleem-latif","html_url":"https://github.com/saleem-latif","followers_url":"https://api.github.com/users/saleem-latif/followers","following_url":"https://api.github.com/users/saleem-latif/following{/other_user}","gists_url":"https://api.github.com/users/saleem-latif/gists{/gist_id}","starred_url":"https://api.github.com/users/saleem-latif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saleem-latif/subscriptions","organizations_url":"https://api.github.com/users/saleem-latif/orgs","repos_url":"https://api.github.com/users/saleem-latif/repos","events_url":"https://api.github.com/users/saleem-latif/events{/privacy}","received_events_url":"https://api.github.com/users/saleem-latif/received_events","type":"User","site_admin":false},"body":"Hi @ziafazal , @asadiqbal08 ,\r\n\r\nKindly review this PR, it contains a solution for SOL-565.\r\n\r\nDescription of SOL-565:\r\n\r\nAs a student I'd like to understand exactly when a course is set to start, seeing UTC hour / date time specificity within 5 days of the start date.\r\n\r\n","created_at":"2015-09-18T12:22:41Z","updated_at":"2015-09-22T07:45:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2b7affca39e6cfc4f98333e8e76bb546eb3f998d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-platform/pulls/9822/commits","review_comments_url":"https://api.github.com/repos/edx/edx-platform/pulls/9822/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/9822/comments","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/22a7a63cfaa1484d97e900ba9156ad64bc08aea8","head":{"label":"edx:saleem-latif/SOL-565","ref":"saleem-latif/SOL-565","sha":"22a7a63cfaa1484d97e900ba9156ad64bc08aea8","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-09-22T06:45:16Z","pushed_at":"2015-09-22T07:39:10Z","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":2118049,"stargazers_count":2132,"watchers_count":2132,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1273,"mirror_url":null,"open_issues_count":152,"forks":1273,"open_issues":152,"watchers":2132,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"0a2cfbe31cdc9c7493a1710f8dc167212d9c753b","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-09-22T06:45:16Z","pushed_at":"2015-09-22T07:39:10Z","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":2118049,"stargazers_count":2132,"watchers_count":2132,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1273,"mirror_url":null,"open_issues_count":152,"forks":1273,"open_issues":152,"watchers":2132,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/9822"},"html":{"href":"https://github.com/edx/edx-platform/pull/9822"},"issue":{"href":"https://api.github.com/repos/edx/edx-platform/issues/9822"},"comments":{"href":"https://api.github.com/repos/edx/edx-platform/issues/9822/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/9822/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/9822/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-platform/statuses/22a7a63cfaa1484d97e900ba9156ad64bc08aea8"}}}}