GitHub PullRequestReviewCommentEvent at 2014-10-04 18:57:33
Repository: edx-platform
Actor: jrbl
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/Stanford-Online/edx-platform/pulls/comments/18430956","id":18430956,"diff_hunk":"@@ -0,0 +1,93 @@\n+# -*- coding: utf-8 -*-\n+\"\"\"\n+Checks logic for displaying reset button\n+\"\"\"\n+from .helpers import UniqueCourseTest\n+from .helpers import load_data_str\n+from ..pages.studio.auto_auth import AutoAuthPage\n+from ..pages.lms.courseware import CoursewarePage\n+from ..pages.lms.reset_problem import ResetProblemPage\n+from ..fixtures.course import CourseFixture, XBlockFixtureDesc\n+\n+#Bad, but imports are too messy\n+#Look at common/lib/xmodule/xmodule/capa_base_constants.py\n+# for source of truth\n+RANDOMIZATION_ALWAYS = 'always'\n+RANDOMIZATION_NEVER = 'never'\n+\n+class ResetProblemTest(UniqueCourseTest):\n+    USERNAME = \"STAFF_TESTER\"\n+    EMAIL = \"johndoe@example.com\"\n+    METADATA = \"\"\n+    def setUp(self):\n+        super(ResetProblemTest, self).setUp()\n+\n+        self.XQUEUE_GRADE_RESPONSE = None\n+\n+        self.courseware_page = CoursewarePage(self.browser, self.course_id)\n+\n+        # Install a course with sections/problems, tabs, updates, and handouts\n+        course_fix = CourseFixture(\n+            self.course_info['org'], self.course_info['number'],\n+            self.course_info['run'], self.course_info['display_name']\n+        )\n+\n+\n+\n+        course_fix.add_children(\n+            XBlockFixtureDesc('chapter', 'Test Section').add_children(\n+                XBlockFixtureDesc('sequential', 'Test Subsection').add_children(\n+                    XBlockFixtureDesc('problem', 'Test Random Problem', data=load_data_str('randomized_problem.xml'),\n+                                       metadata=self.METADATA)\n+                )\n+            )\n+        ).install()\n+\n+        # Auto-auth register for the course.\n+        AutoAuthPage(self.browser, username=self.USERNAME, email=self.EMAIL,\n+                     course_id=self.course_id, staff=False).visit()\n+\n+\n+\n+\n+class ShowResetButtonResetFalseRandomizeSubmitted(ResetProblemTest):","path":"common/test/acceptance/tests/test_problem_reset.py","position":53,"original_position":53,"commit_id":"cf15f25b7df4370dc1de0a7527108f3ad11aab67","original_commit_id":"cf15f25b7df4370dc1de0a7527108f3ad11aab67","user":{"login":"jrbl","id":105487,"avatar_url":"https://avatars.githubusercontent.com/u/105487?v=2","gravatar_id":"","url":"https://api.github.com/users/jrbl","html_url":"https://github.com/jrbl","followers_url":"https://api.github.com/users/jrbl/followers","following_url":"https://api.github.com/users/jrbl/following{/other_user}","gists_url":"https://api.github.com/users/jrbl/gists{/gist_id}","starred_url":"https://api.github.com/users/jrbl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrbl/subscriptions","organizations_url":"https://api.github.com/users/jrbl/orgs","repos_url":"https://api.github.com/users/jrbl/repos","events_url":"https://api.github.com/users/jrbl/events{/privacy}","received_events_url":"https://api.github.com/users/jrbl/received_events","type":"User","site_admin":false},"body":"I'd rather have a bunch of uniquely named test methods with punchy docstrings than a bunch of uniquely named test classes without.","created_at":"2014-10-04T18:57:33Z","updated_at":"2014-10-04T18:57:33Z","html_url":"https://github.com/Stanford-Online/edx-platform/pull/130#discussion_r18430956","pull_request_url":"https://api.github.com/repos/Stanford-Online/edx-platform/pulls/130","_links":{"self":{"href":"https://api.github.com/repos/Stanford-Online/edx-platform/pulls/comments/18430956"},"html":{"href":"https://github.com/Stanford-Online/edx-platform/pull/130#discussion_r18430956"},"pull_request":{"href":"https://api.github.com/repos/Stanford-Online/edx-platform/pulls/130"}}},"pull_request":{"url":"https://api.github.com/repos/Stanford-Online/edx-platform/pulls/130","id":22238020,"html_url":"https://github.com/Stanford-Online/edx-platform/pull/130","diff_url":"https://github.com/Stanford-Online/edx-platform/pull/130.diff","patch_url":"https://github.com/Stanford-Online/edx-platform/pull/130.patch","issue_url":"https://api.github.com/repos/Stanford-Online/edx-platform/issues/130","number":130,"state":"open","locked":false,"title":"Support and tests for adding a reset button to units","user":{"login":"caijim","id":461386,"avatar_url":"https://avatars.githubusercontent.com/u/461386?v=2","gravatar_id":"","url":"https://api.github.com/users/caijim","html_url":"https://github.com/caijim","followers_url":"https://api.github.com/users/caijim/followers","following_url":"https://api.github.com/users/caijim/following{/other_user}","gists_url":"https://api.github.com/users/caijim/gists{/gist_id}","starred_url":"https://api.github.com/users/caijim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caijim/subscriptions","organizations_url":"https://api.github.com/users/caijim/orgs","repos_url":"https://api.github.com/users/caijim/repos","events_url":"https://api.github.com/users/caijim/events{/privacy}","received_events_url":"https://api.github.com/users/caijim/received_events","type":"User","site_admin":false},"body":"@jbau @jrbl  to review please\r\n\r\nDecouples reset from randomization while still preserving backward compatibility. Users will be able to effectively clear their input for answere questions that they have not submitted and instructors are able to set course-wide and problem-specific settings.\r\n\r\nImplementation is in common/lib/xmodule/xmodule/capa_base.py  \r\nRefactored out common constants in common/lib/xmodule/xmodule/capa_base_constants.py\r\nUnit tests in common/lib/xmodule/xmodule/tests/test_capa_module.py\r\nUI acceptance tests in common/test/acceptance/tests/test_problem_reset.py ","created_at":"2014-10-04T00:54:27Z","updated_at":"2014-10-04T18:57:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7ef1295c7141009425348f814f6c3b6f49c190d6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Stanford-Online/edx-platform/pulls/130/commits","review_comments_url":"https://api.github.com/repos/Stanford-Online/edx-platform/pulls/130/comments","review_comment_url":"https://api.github.com/repos/Stanford-Online/edx-platform/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Stanford-Online/edx-platform/issues/130/comments","statuses_url":"https://api.github.com/repos/Stanford-Online/edx-platform/statuses/cf15f25b7df4370dc1de0a7527108f3ad11aab67","head":{"label":"Stanford-Online:caijim/resetbutton","ref":"caijim/resetbutton","sha":"cf15f25b7df4370dc1de0a7527108f3ad11aab67","user":{"login":"Stanford-Online","id":2159497,"avatar_url":"https://avatars.githubusercontent.com/u/2159497?v=2","gravatar_id":"","url":"https://api.github.com/users/Stanford-Online","html_url":"https://github.com/Stanford-Online","followers_url":"https://api.github.com/users/Stanford-Online/followers","following_url":"https://api.github.com/users/Stanford-Online/following{/other_user}","gists_url":"https://api.github.com/users/Stanford-Online/gists{/gist_id}","starred_url":"https://api.github.com/users/Stanford-Online/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stanford-Online/subscriptions","organizations_url":"https://api.github.com/users/Stanford-Online/orgs","repos_url":"https://api.github.com/users/Stanford-Online/repos","events_url":"https://api.github.com/users/Stanford-Online/events{/privacy}","received_events_url":"https://api.github.com/users/Stanford-Online/received_events","type":"Organization","site_admin":false},"repo":{"id":11616657,"name":"edx-platform","full_name":"Stanford-Online/edx-platform","owner":{"login":"Stanford-Online","id":2159497,"avatar_url":"https://avatars.githubusercontent.com/u/2159497?v=2","gravatar_id":"","url":"https://api.github.com/users/Stanford-Online","html_url":"https://github.com/Stanford-Online","followers_url":"https://api.github.com/users/Stanford-Online/followers","following_url":"https://api.github.com/users/Stanford-Online/following{/other_user}","gists_url":"https://api.github.com/users/Stanford-Online/gists{/gist_id}","starred_url":"https://api.github.com/users/Stanford-Online/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stanford-Online/subscriptions","organizations_url":"https://api.github.com/users/Stanford-Online/orgs","repos_url":"https://api.github.com/users/Stanford-Online/repos","events_url":"https://api.github.com/users/Stanford-Online/events{/privacy}","received_events_url":"https://api.github.com/users/Stanford-Online/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Stanford-Online/edx-platform","description":"the edX learning management system (LMS) and course authoring tool, Studio","fork":true,"url":"https://api.github.com/repos/Stanford-Online/edx-platform","forks_url":"https://api.github.com/repos/Stanford-Online/edx-platform/forks","keys_url":"https://api.github.com/repos/Stanford-Online/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Stanford-Online/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Stanford-Online/edx-platform/teams","hooks_url":"https://api.github.com/repos/Stanford-Online/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/Stanford-Online/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/Stanford-Online/edx-platform/events","assignees_url":"https://api.github.com/repos/Stanford-Online/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/Stanford-Online/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/Stanford-Online/edx-platform/tags","blobs_url":"https://api.github.com/repos/Stanford-Online/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Stanford-Online/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Stanford-Online/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/Stanford-Online/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Stanford-Online/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/Stanford-Online/edx-platform/languages","stargazers_url":"https://api.github.com/repos/Stanford-Online/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/Stanford-Online/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/Stanford-Online/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/Stanford-Online/edx-platform/subscription","commits_url":"https://api.github.com/repos/Stanford-Online/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/Stanford-Online/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/Stanford-Online/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/Stanford-Online/edx-platform/issues/comments/{number}","contents_url":"https://api.github.com/repos/Stanford-Online/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/Stanford-Online/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Stanford-Online/edx-platform/merges","archive_url":"https://api.github.com/repos/Stanford-Online/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Stanford-Online/edx-platform/downloads","issues_url":"https://api.github.com/repos/Stanford-Online/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/Stanford-Online/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/Stanford-Online/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/Stanford-Online/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Stanford-Online/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/Stanford-Online/edx-platform/releases{/id}","created_at":"2013-07-23T19:05:46Z","updated_at":"2014-09-18T23:55:40Z","pushed_at":"2014-10-04T00:49:35Z","git_url":"git://github.com/Stanford-Online/edx-platform.git","ssh_url":"git@github.com:Stanford-Online/edx-platform.git","clone_url":"https://github.com/Stanford-Online/edx-platform.git","svn_url":"https://github.com/Stanford-Online/edx-platform","homepage":"http://code.edx.org/","size":308632,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":45,"forks":3,"open_issues":45,"watchers":7,"default_branch":"master"}},"base":{"label":"Stanford-Online:master","ref":"master","sha":"034aa0351bf8b094f9367ba0a2a7fbd28d1b7f4d","user":{"login":"Stanford-Online","id":2159497,"avatar_url":"https://avatars.githubusercontent.com/u/2159497?v=2","gravatar_id":"","url":"https://api.github.com/users/Stanford-Online","html_url":"https://github.com/Stanford-Online","followers_url":"https://api.github.com/users/Stanford-Online/followers","following_url":"https://api.github.com/users/Stanford-Online/following{/other_user}","gists_url":"https://api.github.com/users/Stanford-Online/gists{/gist_id}","starred_url":"https://api.github.com/users/Stanford-Online/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stanford-Online/subscriptions","organizations_url":"https://api.github.com/users/Stanford-Online/orgs","repos_url":"https://api.github.com/users/Stanford-Online/repos","events_url":"https://api.github.com/users/Stanford-Online/events{/privacy}","received_events_url":"https://api.github.com/users/Stanford-Online/received_events","type":"Organization","site_admin":false},"repo":{"id":11616657,"name":"edx-platform","full_name":"Stanford-Online/edx-platform","owner":{"login":"Stanford-Online","id":2159497,"avatar_url":"https://avatars.githubusercontent.com/u/2159497?v=2","gravatar_id":"","url":"https://api.github.com/users/Stanford-Online","html_url":"https://github.com/Stanford-Online","followers_url":"https://api.github.com/users/Stanford-Online/followers","following_url":"https://api.github.com/users/Stanford-Online/following{/other_user}","gists_url":"https://api.github.com/users/Stanford-Online/gists{/gist_id}","starred_url":"https://api.github.com/users/Stanford-Online/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stanford-Online/subscriptions","organizations_url":"https://api.github.com/users/Stanford-Online/orgs","repos_url":"https://api.github.com/users/Stanford-Online/repos","events_url":"https://api.github.com/users/Stanford-Online/events{/privacy}","received_events_url":"https://api.github.com/users/Stanford-Online/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Stanford-Online/edx-platform","description":"the edX learning management system (LMS) and course authoring tool, Studio","fork":true,"url":"https://api.github.com/repos/Stanford-Online/edx-platform","forks_url":"https://api.github.com/repos/Stanford-Online/edx-platform/forks","keys_url":"https://api.github.com/repos/Stanford-Online/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Stanford-Online/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Stanford-Online/edx-platform/teams","hooks_url":"https://api.github.com/repos/Stanford-Online/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/Stanford-Online/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/Stanford-Online/edx-platform/events","assignees_url":"https://api.github.com/repos/Stanford-Online/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/Stanford-Online/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/Stanford-Online/edx-platform/tags","blobs_url":"https://api.github.com/repos/Stanford-Online/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Stanford-Online/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Stanford-Online/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/Stanford-Online/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Stanford-Online/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/Stanford-Online/edx-platform/languages","stargazers_url":"https://api.github.com/repos/Stanford-Online/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/Stanford-Online/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/Stanford-Online/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/Stanford-Online/edx-platform/subscription","commits_url":"https://api.github.com/repos/Stanford-Online/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/Stanford-Online/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/Stanford-Online/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/Stanford-Online/edx-platform/issues/comments/{number}","contents_url":"https://api.github.com/repos/Stanford-Online/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/Stanford-Online/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Stanford-Online/edx-platform/merges","archive_url":"https://api.github.com/repos/Stanford-Online/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Stanford-Online/edx-platform/downloads","issues_url":"https://api.github.com/repos/Stanford-Online/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/Stanford-Online/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/Stanford-Online/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/Stanford-Online/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Stanford-Online/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/Stanford-Online/edx-platform/releases{/id}","created_at":"2013-07-23T19:05:46Z","updated_at":"2014-09-18T23:55:40Z","pushed_at":"2014-10-04T00:49:35Z","git_url":"git://github.com/Stanford-Online/edx-platform.git","ssh_url":"git@github.com:Stanford-Online/edx-platform.git","clone_url":"https://github.com/Stanford-Online/edx-platform.git","svn_url":"https://github.com/Stanford-Online/edx-platform","homepage":"http://code.edx.org/","size":308632,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":45,"forks":3,"open_issues":45,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Stanford-Online/edx-platform/pulls/130"},"html":{"href":"https://github.com/Stanford-Online/edx-platform/pull/130"},"issue":{"href":"https://api.github.com/repos/Stanford-Online/edx-platform/issues/130"},"comments":{"href":"https://api.github.com/repos/Stanford-Online/edx-platform/issues/130/comments"},"review_comments":{"href":"https://api.github.com/repos/Stanford-Online/edx-platform/pulls/130/comments"},"review_comment":{"href":"https://api.github.com/repos/Stanford-Online/edx-platform/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Stanford-Online/edx-platform/pulls/130/commits"},"statuses":{"href":"https://api.github.com/repos/Stanford-Online/edx-platform/statuses/cf15f25b7df4370dc1de0a7527108f3ad11aab67"}}}}