{"action":"created","comment":{"url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/pulls/comments/31247327","id":31247327,"diff_hunk":"@@ -290,3 +291,20 @@ def download_special(request, filename):\n     response['Content-Disposition'] = 'attachment; filename=' + filename\n     return response\n \n+def rejudge(request):\n+    pid = request.GET.get('pid')\n+    if pid:\n+        try:\n+            problem = Problem.objects.get(pk=pid)\n+            if not has_problem_ownership(request.user, problem) and \\\n+                    not request.user.has_admin_auth():\n+                logger.warning(\"%s has no permission to rejudge problem %d\"\n+                        % (request.user, problem.pk))\n+                raise PermissionDenied()\n+            rejudge_problem(problem)\n+            logger.info(\"problem %s rejudged\" % problem.pk)\n+        except Problem.DoesNotExist:\n+            print pid","path":"problem/views.py","position":34,"original_position":34,"commit_id":"9cfd99e2311e1ad6a8de5dc6d8a8c492abf9d8e8","original_commit_id":"9cfd99e2311e1ad6a8de5dc6d8a8c492abf9d8e8","user":{"login":"nickelcheng","id":10057984,"avatar_url":"https://avatars.githubusercontent.com/u/10057984?v=3","gravatar_id":"","url":"https://api.github.com/users/nickelcheng","html_url":"https://github.com/nickelcheng","followers_url":"https://api.github.com/users/nickelcheng/followers","following_url":"https://api.github.com/users/nickelcheng/following{/other_user}","gists_url":"https://api.github.com/users/nickelcheng/gists{/gist_id}","starred_url":"https://api.github.com/users/nickelcheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickelcheng/subscriptions","organizations_url":"https://api.github.com/users/nickelcheng/orgs","repos_url":"https://api.github.com/users/nickelcheng/repos","events_url":"https://api.github.com/users/nickelcheng/events{/privacy}","received_events_url":"https://api.github.com/users/nickelcheng/received_events","type":"User","site_admin":false},"body":"Please remove this.","created_at":"2015-05-28T15:46:21Z","updated_at":"2015-05-28T15:46:21Z","html_url":"https://github.com/bruce3557/NTHUOJ_web/pull/203#discussion_r31247327","pull_request_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/pulls/203","_links":{"self":{"href":"https://api.github.com/repos/bruce3557/NTHUOJ_web/pulls/comments/31247327"},"html":{"href":"https://github.com/bruce3557/NTHUOJ_web/pull/203#discussion_r31247327"},"pull_request":{"href":"https://api.github.com/repos/bruce3557/NTHUOJ_web/pulls/203"}}},"pull_request":{"url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/pulls/203","id":36386803,"html_url":"https://github.com/bruce3557/NTHUOJ_web/pull/203","diff_url":"https://github.com/bruce3557/NTHUOJ_web/pull/203.diff","patch_url":"https://github.com/bruce3557/NTHUOJ_web/pull/203.patch","issue_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/issues/203","number":203,"state":"open","locked":false,"title":"rejudge problem","user":{"login":"geniusgordon","id":8642924,"avatar_url":"https://avatars.githubusercontent.com/u/8642924?v=3","gravatar_id":"","url":"https://api.github.com/users/geniusgordon","html_url":"https://github.com/geniusgordon","followers_url":"https://api.github.com/users/geniusgordon/followers","following_url":"https://api.github.com/users/geniusgordon/following{/other_user}","gists_url":"https://api.github.com/users/geniusgordon/gists{/gist_id}","starred_url":"https://api.github.com/users/geniusgordon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geniusgordon/subscriptions","organizations_url":"https://api.github.com/users/geniusgordon/orgs","repos_url":"https://api.github.com/users/geniusgordon/repos","events_url":"https://api.github.com/users/geniusgordon/events{/privacy}","received_events_url":"https://api.github.com/users/geniusgordon/received_events","type":"User","site_admin":false},"body":"rejudge problem","created_at":"2015-05-28T09:22:59Z","updated_at":"2015-05-28T15:46:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aaa91bce69d2357e42e5d47cd338ea586a87da16","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/pulls/203/commits","review_comments_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/pulls/203/comments","review_comment_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/issues/203/comments","statuses_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/statuses/9cfd99e2311e1ad6a8de5dc6d8a8c492abf9d8e8","head":{"label":"geniusgordon:rejudge","ref":"rejudge","sha":"9cfd99e2311e1ad6a8de5dc6d8a8c492abf9d8e8","user":{"login":"geniusgordon","id":8642924,"avatar_url":"https://avatars.githubusercontent.com/u/8642924?v=3","gravatar_id":"","url":"https://api.github.com/users/geniusgordon","html_url":"https://github.com/geniusgordon","followers_url":"https://api.github.com/users/geniusgordon/followers","following_url":"https://api.github.com/users/geniusgordon/following{/other_user}","gists_url":"https://api.github.com/users/geniusgordon/gists{/gist_id}","starred_url":"https://api.github.com/users/geniusgordon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geniusgordon/subscriptions","organizations_url":"https://api.github.com/users/geniusgordon/orgs","repos_url":"https://api.github.com/users/geniusgordon/repos","events_url":"https://api.github.com/users/geniusgordon/events{/privacy}","received_events_url":"https://api.github.com/users/geniusgordon/received_events","type":"User","site_admin":false},"repo":{"id":27543948,"name":"NTHUOJ_web","full_name":"geniusgordon/NTHUOJ_web","owner":{"login":"geniusgordon","id":8642924,"avatar_url":"https://avatars.githubusercontent.com/u/8642924?v=3","gravatar_id":"","url":"https://api.github.com/users/geniusgordon","html_url":"https://github.com/geniusgordon","followers_url":"https://api.github.com/users/geniusgordon/followers","following_url":"https://api.github.com/users/geniusgordon/following{/other_user}","gists_url":"https://api.github.com/users/geniusgordon/gists{/gist_id}","starred_url":"https://api.github.com/users/geniusgordon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geniusgordon/subscriptions","organizations_url":"https://api.github.com/users/geniusgordon/orgs","repos_url":"https://api.github.com/users/geniusgordon/repos","events_url":"https://api.github.com/users/geniusgordon/events{/privacy}","received_events_url":"https://api.github.com/users/geniusgordon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/geniusgordon/NTHUOJ_web","description":"","fork":true,"url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web","forks_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/forks","keys_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/teams","hooks_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/hooks","issue_events_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/issues/events{/number}","events_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/events","assignees_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/assignees{/user}","branches_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/branches{/branch}","tags_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/tags","blobs_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/git/refs{/sha}","trees_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/statuses/{sha}","languages_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/languages","stargazers_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/stargazers","contributors_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/contributors","subscribers_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/subscribers","subscription_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/subscription","commits_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/commits{/sha}","git_commits_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/git/commits{/sha}","comments_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/comments{/number}","issue_comment_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/issues/comments{/number}","contents_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/contents/{+path}","compare_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/merges","archive_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/downloads","issues_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/issues{/number}","pulls_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/pulls{/number}","milestones_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/milestones{/number}","notifications_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/labels{/name}","releases_url":"https://api.github.com/repos/geniusgordon/NTHUOJ_web/releases{/id}","created_at":"2014-12-04T14:25:40Z","updated_at":"2014-12-03T06:37:03Z","pushed_at":"2015-05-28T14:56:37Z","git_url":"git://github.com/geniusgordon/NTHUOJ_web.git","ssh_url":"git@github.com:geniusgordon/NTHUOJ_web.git","clone_url":"https://github.com/geniusgordon/NTHUOJ_web.git","svn_url":"https://github.com/geniusgordon/NTHUOJ_web","homepage":null,"size":4546,"stargazers_count":0,"watchers_count":0,"language":null,"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":"bruce3557:dev","ref":"dev","sha":"63e35b923d3ee2fc78a21b55722e3e52f86e6b7e","user":{"login":"bruce3557","id":4061342,"avatar_url":"https://avatars.githubusercontent.com/u/4061342?v=3","gravatar_id":"","url":"https://api.github.com/users/bruce3557","html_url":"https://github.com/bruce3557","followers_url":"https://api.github.com/users/bruce3557/followers","following_url":"https://api.github.com/users/bruce3557/following{/other_user}","gists_url":"https://api.github.com/users/bruce3557/gists{/gist_id}","starred_url":"https://api.github.com/users/bruce3557/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bruce3557/subscriptions","organizations_url":"https://api.github.com/users/bruce3557/orgs","repos_url":"https://api.github.com/users/bruce3557/repos","events_url":"https://api.github.com/users/bruce3557/events{/privacy}","received_events_url":"https://api.github.com/users/bruce3557/received_events","type":"User","site_admin":false},"repo":{"id":27471538,"name":"NTHUOJ_web","full_name":"bruce3557/NTHUOJ_web","owner":{"login":"bruce3557","id":4061342,"avatar_url":"https://avatars.githubusercontent.com/u/4061342?v=3","gravatar_id":"","url":"https://api.github.com/users/bruce3557","html_url":"https://github.com/bruce3557","followers_url":"https://api.github.com/users/bruce3557/followers","following_url":"https://api.github.com/users/bruce3557/following{/other_user}","gists_url":"https://api.github.com/users/bruce3557/gists{/gist_id}","starred_url":"https://api.github.com/users/bruce3557/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bruce3557/subscriptions","organizations_url":"https://api.github.com/users/bruce3557/orgs","repos_url":"https://api.github.com/users/bruce3557/repos","events_url":"https://api.github.com/users/bruce3557/events{/privacy}","received_events_url":"https://api.github.com/users/bruce3557/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bruce3557/NTHUOJ_web","description":"","fork":false,"url":"https://api.github.com/repos/bruce3557/NTHUOJ_web","forks_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/forks","keys_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/teams","hooks_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/hooks","issue_events_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/issues/events{/number}","events_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/events","assignees_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/assignees{/user}","branches_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/branches{/branch}","tags_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/tags","blobs_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/git/refs{/sha}","trees_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/statuses/{sha}","languages_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/languages","stargazers_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/stargazers","contributors_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/contributors","subscribers_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/subscribers","subscription_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/subscription","commits_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/commits{/sha}","git_commits_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/git/commits{/sha}","comments_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/comments{/number}","issue_comment_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/issues/comments{/number}","contents_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/contents/{+path}","compare_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/merges","archive_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/downloads","issues_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/issues{/number}","pulls_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/pulls{/number}","milestones_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/milestones{/number}","notifications_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/labels{/name}","releases_url":"https://api.github.com/repos/bruce3557/NTHUOJ_web/releases{/id}","created_at":"2014-12-03T05:45:27Z","updated_at":"2015-05-07T06:09:16Z","pushed_at":"2015-05-28T15:17:49Z","git_url":"git://github.com/bruce3557/NTHUOJ_web.git","ssh_url":"git@github.com:bruce3557/NTHUOJ_web.git","clone_url":"https://github.com/bruce3557/NTHUOJ_web.git","svn_url":"https://github.com/bruce3557/NTHUOJ_web","homepage":null,"size":6960,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":20,"forks":10,"open_issues":20,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bruce3557/NTHUOJ_web/pulls/203"},"html":{"href":"https://github.com/bruce3557/NTHUOJ_web/pull/203"},"issue":{"href":"https://api.github.com/repos/bruce3557/NTHUOJ_web/issues/203"},"comments":{"href":"https://api.github.com/repos/bruce3557/NTHUOJ_web/issues/203/comments"},"review_comments":{"href":"https://api.github.com/repos/bruce3557/NTHUOJ_web/pulls/203/comments"},"review_comment":{"href":"https://api.github.com/repos/bruce3557/NTHUOJ_web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bruce3557/NTHUOJ_web/pulls/203/commits"},"statuses":{"href":"https://api.github.com/repos/bruce3557/NTHUOJ_web/statuses/9cfd99e2311e1ad6a8de5dc6d8a8c492abf9d8e8"}}}}