{"action":"created","comment":{"url":"https://api.github.com/repos/FOSSEE/online_test/pulls/comments/77778653","id":77778653,"diff_hunk":"@@ -153,13 +153,15 @@ class QuizForm(forms.ModelForm):\n \n     def __init__(self, *args, **kwargs):\n         user = kwargs.pop('user')\n+        course_id = kwargs.pop('course')\n         super(QuizForm, self).__init__(*args, **kwargs)\n         self.fields['prerequisite'] = forms.ModelChoiceField(\n-                queryset=Quiz.objects.filter(course__creator=user))\n+                queryset=Quiz.objects.filter(course__creator=user, \n+                                             is_trial=False))\n         self.fields['prerequisite'].required = False\n         self.fields['course'] = forms.ModelChoiceField(\n-                queryset=Course.objects.filter(Q(creator=user)|\n-                    Q(teachers=user)).distinct())\n+                queryset=Course.objects.filter(id=course_id))\n+        self.fields['course'].initial = Course.objects.get(id=course_id)","path":"yaksh/forms.py","position":15,"original_position":15,"commit_id":"8b01d249b7ccdff9d75447a6b12eb96641e795e7","original_commit_id":"8b01d249b7ccdff9d75447a6b12eb96641e795e7","user":{"login":"prathamesh920","id":3014000,"avatar_url":"https://avatars.githubusercontent.com/u/3014000?v=3","gravatar_id":"","url":"https://api.github.com/users/prathamesh920","html_url":"https://github.com/prathamesh920","followers_url":"https://api.github.com/users/prathamesh920/followers","following_url":"https://api.github.com/users/prathamesh920/following{/other_user}","gists_url":"https://api.github.com/users/prathamesh920/gists{/gist_id}","starred_url":"https://api.github.com/users/prathamesh920/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prathamesh920/subscriptions","organizations_url":"https://api.github.com/users/prathamesh920/orgs","repos_url":"https://api.github.com/users/prathamesh920/repos","events_url":"https://api.github.com/users/prathamesh920/events{/privacy}","received_events_url":"https://api.github.com/users/prathamesh920/received_events","type":"User","site_admin":false},"body":"It would be better if we can lock the initial value, so that user does not change it.","created_at":"2016-09-07T08:22:41Z","updated_at":"2016-09-07T08:22:41Z","html_url":"https://github.com/FOSSEE/online_test/pull/132#discussion_r77778653","pull_request_url":"https://api.github.com/repos/FOSSEE/online_test/pulls/132","_links":{"self":{"href":"https://api.github.com/repos/FOSSEE/online_test/pulls/comments/77778653"},"html":{"href":"https://github.com/FOSSEE/online_test/pull/132#discussion_r77778653"},"pull_request":{"href":"https://api.github.com/repos/FOSSEE/online_test/pulls/132"}}},"pull_request":{"url":"https://api.github.com/repos/FOSSEE/online_test/pulls/132","id":84092077,"html_url":"https://github.com/FOSSEE/online_test/pull/132","diff_url":"https://github.com/FOSSEE/online_test/pull/132.diff","patch_url":"https://github.com/FOSSEE/online_test/pull/132.patch","issue_url":"https://api.github.com/repos/FOSSEE/online_test/issues/132","number":132,"state":"open","locked":false,"title":"added add quiz button to each course","user":{"login":"maheshgudi","id":10505209,"avatar_url":"https://avatars.githubusercontent.com/u/10505209?v=3","gravatar_id":"","url":"https://api.github.com/users/maheshgudi","html_url":"https://github.com/maheshgudi","followers_url":"https://api.github.com/users/maheshgudi/followers","following_url":"https://api.github.com/users/maheshgudi/following{/other_user}","gists_url":"https://api.github.com/users/maheshgudi/gists{/gist_id}","starred_url":"https://api.github.com/users/maheshgudi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maheshgudi/subscriptions","organizations_url":"https://api.github.com/users/maheshgudi/orgs","repos_url":"https://api.github.com/users/maheshgudi/repos","events_url":"https://api.github.com/users/maheshgudi/events{/privacy}","received_events_url":"https://api.github.com/users/maheshgudi/received_events","type":"User","site_admin":false},"body":"Added an add quiz button to each course. \r\n![screenshot from 2016-09-06 12 46 23](https://cloud.githubusercontent.com/assets/10505209/18269313/4617fe02-7445-11e6-9f7c-90fbea3fc435.png)\r\n","created_at":"2016-09-06T09:51:23Z","updated_at":"2016-09-07T08:22:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"59d617f52ad370bedb0d090b5a2d6e149cbe654c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/FOSSEE/online_test/pulls/132/commits","review_comments_url":"https://api.github.com/repos/FOSSEE/online_test/pulls/132/comments","review_comment_url":"https://api.github.com/repos/FOSSEE/online_test/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FOSSEE/online_test/issues/132/comments","statuses_url":"https://api.github.com/repos/FOSSEE/online_test/statuses/8b01d249b7ccdff9d75447a6b12eb96641e795e7","head":{"label":"maheshgudi:course_changes","ref":"course_changes","sha":"8b01d249b7ccdff9d75447a6b12eb96641e795e7","user":{"login":"maheshgudi","id":10505209,"avatar_url":"https://avatars.githubusercontent.com/u/10505209?v=3","gravatar_id":"","url":"https://api.github.com/users/maheshgudi","html_url":"https://github.com/maheshgudi","followers_url":"https://api.github.com/users/maheshgudi/followers","following_url":"https://api.github.com/users/maheshgudi/following{/other_user}","gists_url":"https://api.github.com/users/maheshgudi/gists{/gist_id}","starred_url":"https://api.github.com/users/maheshgudi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maheshgudi/subscriptions","organizations_url":"https://api.github.com/users/maheshgudi/orgs","repos_url":"https://api.github.com/users/maheshgudi/repos","events_url":"https://api.github.com/users/maheshgudi/events{/privacy}","received_events_url":"https://api.github.com/users/maheshgudi/received_events","type":"User","site_admin":false},"repo":{"id":58518440,"name":"online_test","full_name":"maheshgudi/online_test","owner":{"login":"maheshgudi","id":10505209,"avatar_url":"https://avatars.githubusercontent.com/u/10505209?v=3","gravatar_id":"","url":"https://api.github.com/users/maheshgudi","html_url":"https://github.com/maheshgudi","followers_url":"https://api.github.com/users/maheshgudi/followers","following_url":"https://api.github.com/users/maheshgudi/following{/other_user}","gists_url":"https://api.github.com/users/maheshgudi/gists{/gist_id}","starred_url":"https://api.github.com/users/maheshgudi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maheshgudi/subscriptions","organizations_url":"https://api.github.com/users/maheshgudi/orgs","repos_url":"https://api.github.com/users/maheshgudi/repos","events_url":"https://api.github.com/users/maheshgudi/events{/privacy}","received_events_url":"https://api.github.com/users/maheshgudi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maheshgudi/online_test","description":"Online quiz/exam taking application. ","fork":true,"url":"https://api.github.com/repos/maheshgudi/online_test","forks_url":"https://api.github.com/repos/maheshgudi/online_test/forks","keys_url":"https://api.github.com/repos/maheshgudi/online_test/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maheshgudi/online_test/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maheshgudi/online_test/teams","hooks_url":"https://api.github.com/repos/maheshgudi/online_test/hooks","issue_events_url":"https://api.github.com/repos/maheshgudi/online_test/issues/events{/number}","events_url":"https://api.github.com/repos/maheshgudi/online_test/events","assignees_url":"https://api.github.com/repos/maheshgudi/online_test/assignees{/user}","branches_url":"https://api.github.com/repos/maheshgudi/online_test/branches{/branch}","tags_url":"https://api.github.com/repos/maheshgudi/online_test/tags","blobs_url":"https://api.github.com/repos/maheshgudi/online_test/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maheshgudi/online_test/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maheshgudi/online_test/git/refs{/sha}","trees_url":"https://api.github.com/repos/maheshgudi/online_test/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maheshgudi/online_test/statuses/{sha}","languages_url":"https://api.github.com/repos/maheshgudi/online_test/languages","stargazers_url":"https://api.github.com/repos/maheshgudi/online_test/stargazers","contributors_url":"https://api.github.com/repos/maheshgudi/online_test/contributors","subscribers_url":"https://api.github.com/repos/maheshgudi/online_test/subscribers","subscription_url":"https://api.github.com/repos/maheshgudi/online_test/subscription","commits_url":"https://api.github.com/repos/maheshgudi/online_test/commits{/sha}","git_commits_url":"https://api.github.com/repos/maheshgudi/online_test/git/commits{/sha}","comments_url":"https://api.github.com/repos/maheshgudi/online_test/comments{/number}","issue_comment_url":"https://api.github.com/repos/maheshgudi/online_test/issues/comments{/number}","contents_url":"https://api.github.com/repos/maheshgudi/online_test/contents/{+path}","compare_url":"https://api.github.com/repos/maheshgudi/online_test/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maheshgudi/online_test/merges","archive_url":"https://api.github.com/repos/maheshgudi/online_test/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maheshgudi/online_test/downloads","issues_url":"https://api.github.com/repos/maheshgudi/online_test/issues{/number}","pulls_url":"https://api.github.com/repos/maheshgudi/online_test/pulls{/number}","milestones_url":"https://api.github.com/repos/maheshgudi/online_test/milestones{/number}","notifications_url":"https://api.github.com/repos/maheshgudi/online_test/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maheshgudi/online_test/labels{/name}","releases_url":"https://api.github.com/repos/maheshgudi/online_test/releases{/id}","deployments_url":"https://api.github.com/repos/maheshgudi/online_test/deployments","created_at":"2016-05-11T06:06:42Z","updated_at":"2016-05-11T06:06:43Z","pushed_at":"2016-09-07T06:11:56Z","git_url":"git://github.com/maheshgudi/online_test.git","ssh_url":"git@github.com:maheshgudi/online_test.git","clone_url":"https://github.com/maheshgudi/online_test.git","svn_url":"https://github.com/maheshgudi/online_test","homepage":"http://fossee.in","size":5007,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"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":"master"}},"base":{"label":"FOSSEE:master","ref":"master","sha":"01e08dd15b59ce353043d541c9be81592cda3fe0","user":{"login":"FOSSEE","id":703487,"avatar_url":"https://avatars.githubusercontent.com/u/703487?v=3","gravatar_id":"","url":"https://api.github.com/users/FOSSEE","html_url":"https://github.com/FOSSEE","followers_url":"https://api.github.com/users/FOSSEE/followers","following_url":"https://api.github.com/users/FOSSEE/following{/other_user}","gists_url":"https://api.github.com/users/FOSSEE/gists{/gist_id}","starred_url":"https://api.github.com/users/FOSSEE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FOSSEE/subscriptions","organizations_url":"https://api.github.com/users/FOSSEE/orgs","repos_url":"https://api.github.com/users/FOSSEE/repos","events_url":"https://api.github.com/users/FOSSEE/events{/privacy}","received_events_url":"https://api.github.com/users/FOSSEE/received_events","type":"Organization","site_admin":false},"repo":{"id":2734092,"name":"online_test","full_name":"FOSSEE/online_test","owner":{"login":"FOSSEE","id":703487,"avatar_url":"https://avatars.githubusercontent.com/u/703487?v=3","gravatar_id":"","url":"https://api.github.com/users/FOSSEE","html_url":"https://github.com/FOSSEE","followers_url":"https://api.github.com/users/FOSSEE/followers","following_url":"https://api.github.com/users/FOSSEE/following{/other_user}","gists_url":"https://api.github.com/users/FOSSEE/gists{/gist_id}","starred_url":"https://api.github.com/users/FOSSEE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FOSSEE/subscriptions","organizations_url":"https://api.github.com/users/FOSSEE/orgs","repos_url":"https://api.github.com/users/FOSSEE/repos","events_url":"https://api.github.com/users/FOSSEE/events{/privacy}","received_events_url":"https://api.github.com/users/FOSSEE/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FOSSEE/online_test","description":"Online quiz/exam taking application. ","fork":false,"url":"https://api.github.com/repos/FOSSEE/online_test","forks_url":"https://api.github.com/repos/FOSSEE/online_test/forks","keys_url":"https://api.github.com/repos/FOSSEE/online_test/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FOSSEE/online_test/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FOSSEE/online_test/teams","hooks_url":"https://api.github.com/repos/FOSSEE/online_test/hooks","issue_events_url":"https://api.github.com/repos/FOSSEE/online_test/issues/events{/number}","events_url":"https://api.github.com/repos/FOSSEE/online_test/events","assignees_url":"https://api.github.com/repos/FOSSEE/online_test/assignees{/user}","branches_url":"https://api.github.com/repos/FOSSEE/online_test/branches{/branch}","tags_url":"https://api.github.com/repos/FOSSEE/online_test/tags","blobs_url":"https://api.github.com/repos/FOSSEE/online_test/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FOSSEE/online_test/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FOSSEE/online_test/git/refs{/sha}","trees_url":"https://api.github.com/repos/FOSSEE/online_test/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FOSSEE/online_test/statuses/{sha}","languages_url":"https://api.github.com/repos/FOSSEE/online_test/languages","stargazers_url":"https://api.github.com/repos/FOSSEE/online_test/stargazers","contributors_url":"https://api.github.com/repos/FOSSEE/online_test/contributors","subscribers_url":"https://api.github.com/repos/FOSSEE/online_test/subscribers","subscription_url":"https://api.github.com/repos/FOSSEE/online_test/subscription","commits_url":"https://api.github.com/repos/FOSSEE/online_test/commits{/sha}","git_commits_url":"https://api.github.com/repos/FOSSEE/online_test/git/commits{/sha}","comments_url":"https://api.github.com/repos/FOSSEE/online_test/comments{/number}","issue_comment_url":"https://api.github.com/repos/FOSSEE/online_test/issues/comments{/number}","contents_url":"https://api.github.com/repos/FOSSEE/online_test/contents/{+path}","compare_url":"https://api.github.com/repos/FOSSEE/online_test/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FOSSEE/online_test/merges","archive_url":"https://api.github.com/repos/FOSSEE/online_test/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FOSSEE/online_test/downloads","issues_url":"https://api.github.com/repos/FOSSEE/online_test/issues{/number}","pulls_url":"https://api.github.com/repos/FOSSEE/online_test/pulls{/number}","milestones_url":"https://api.github.com/repos/FOSSEE/online_test/milestones{/number}","notifications_url":"https://api.github.com/repos/FOSSEE/online_test/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FOSSEE/online_test/labels{/name}","releases_url":"https://api.github.com/repos/FOSSEE/online_test/releases{/id}","deployments_url":"https://api.github.com/repos/FOSSEE/online_test/deployments","created_at":"2011-11-08T14:02:17Z","updated_at":"2016-09-04T13:51:52Z","pushed_at":"2016-09-06T13:30:54Z","git_url":"git://github.com/FOSSEE/online_test.git","ssh_url":"git@github.com:FOSSEE/online_test.git","clone_url":"https://github.com/FOSSEE/online_test.git","svn_url":"https://github.com/FOSSEE/online_test","homepage":"http://fossee.in","size":5322,"stargazers_count":29,"watchers_count":29,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":18,"forks":29,"open_issues":18,"watchers":29,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FOSSEE/online_test/pulls/132"},"html":{"href":"https://github.com/FOSSEE/online_test/pull/132"},"issue":{"href":"https://api.github.com/repos/FOSSEE/online_test/issues/132"},"comments":{"href":"https://api.github.com/repos/FOSSEE/online_test/issues/132/comments"},"review_comments":{"href":"https://api.github.com/repos/FOSSEE/online_test/pulls/132/comments"},"review_comment":{"href":"https://api.github.com/repos/FOSSEE/online_test/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FOSSEE/online_test/pulls/132/commits"},"statuses":{"href":"https://api.github.com/repos/FOSSEE/online_test/statuses/8b01d249b7ccdff9d75447a6b12eb96641e795e7"}}}}
{"actor":{"display_login":"prathamesh920"}}