{"action":"created","comment":{"url":"https://api.github.com/repos/hackAD/nyu-vote/pulls/comments/60845312","id":60845312,"diff_hunk":"@@ -4,7 +4,35 @@ Template.electionsAdminResults.helpers\n     return election\n   canEdit: () ->\n     this.status == \"unopened\" && this.hasAdmin(Meteor.user())\n-  votes: (choiceId, questionId, votes) ->\n-    return votes[questionId][choiceId]\n+  isPick: (choiceId, questionId) ->\n+    election = Election.getActive()\n+    for i in [0...election.questions.length]\n+        if election.questions[i]._id == questionId\n+            question = election.questions[i]\n+    return question.options.type == \"pick\"\n+  isRank: (choiceId, questionId) ->\n+    election = Election.getActive()\n+    for i in [0...election.questions.length]\n+        if election.questions[i]._id == questionId\n+            question = election.questions[i]\n+    return question.options.type == \"rank\"\n+  choiceLength: (choiceId, questionId, votes) ->\n+    election = Election.getActive()\n+    for i in [0...election.questions.length]\n+        if election.questions[i]._id == questionId\n+            question = election.questions[i]\n+    ranks = []\n+    for i in [1...question.choices.length+1]","path":"client/views/admin/elections/electionsAdminResults.coffee","position":24,"original_position":24,"commit_id":"1d1782d7e65e24b1a86316dd845e2fb952a85cf9","original_commit_id":"1d1782d7e65e24b1a86316dd845e2fb952a85cf9","user":{"login":"lingz","id":3147213,"avatar_url":"https://avatars.githubusercontent.com/u/3147213?v=3","gravatar_id":"","url":"https://api.github.com/users/lingz","html_url":"https://github.com/lingz","followers_url":"https://api.github.com/users/lingz/followers","following_url":"https://api.github.com/users/lingz/following{/other_user}","gists_url":"https://api.github.com/users/lingz/gists{/gist_id}","starred_url":"https://api.github.com/users/lingz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lingz/subscriptions","organizations_url":"https://api.github.com/users/lingz/orgs","repos_url":"https://api.github.com/users/lingz/repos","events_url":"https://api.github.com/users/lingz/events{/privacy}","received_events_url":"https://api.github.com/users/lingz/received_events","type":"User","site_admin":false},"body":"Not sure what is happening here.","created_at":"2016-04-24T14:16:55Z","updated_at":"2016-04-24T14:16:55Z","html_url":"https://github.com/hackAD/nyu-vote/pull/2#discussion_r60845312","pull_request_url":"https://api.github.com/repos/hackAD/nyu-vote/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/hackAD/nyu-vote/pulls/comments/60845312"},"html":{"href":"https://github.com/hackAD/nyu-vote/pull/2#discussion_r60845312"},"pull_request":{"href":"https://api.github.com/repos/hackAD/nyu-vote/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/hackAD/nyu-vote/pulls/2","id":67633498,"html_url":"https://github.com/hackAD/nyu-vote/pull/2","diff_url":"https://github.com/hackAD/nyu-vote/pull/2.diff","patch_url":"https://github.com/hackAD/nyu-vote/pull/2.patch","issue_url":"https://api.github.com/repos/hackAD/nyu-vote/issues/2","number":2,"state":"open","locked":false,"title":"Addition of rank option and small bug and design fixes.","user":{"login":"Goldsmith94","id":18149242,"avatar_url":"https://avatars.githubusercontent.com/u/18149242?v=3","gravatar_id":"","url":"https://api.github.com/users/Goldsmith94","html_url":"https://github.com/Goldsmith94","followers_url":"https://api.github.com/users/Goldsmith94/followers","following_url":"https://api.github.com/users/Goldsmith94/following{/other_user}","gists_url":"https://api.github.com/users/Goldsmith94/gists{/gist_id}","starred_url":"https://api.github.com/users/Goldsmith94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Goldsmith94/subscriptions","organizations_url":"https://api.github.com/users/Goldsmith94/orgs","repos_url":"https://api.github.com/users/Goldsmith94/repos","events_url":"https://api.github.com/users/Goldsmith94/events{/privacy}","received_events_url":"https://api.github.com/users/Goldsmith94/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-24T10:26:47Z","updated_at":"2016-04-24T14:16:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a4b79f3ab781eac3355a25cce42ac56cc034178b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hackAD/nyu-vote/pulls/2/commits","review_comments_url":"https://api.github.com/repos/hackAD/nyu-vote/pulls/2/comments","review_comment_url":"https://api.github.com/repos/hackAD/nyu-vote/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hackAD/nyu-vote/issues/2/comments","statuses_url":"https://api.github.com/repos/hackAD/nyu-vote/statuses/1d1782d7e65e24b1a86316dd845e2fb952a85cf9","head":{"label":"Goldsmith94:master","ref":"master","sha":"1d1782d7e65e24b1a86316dd845e2fb952a85cf9","user":{"login":"Goldsmith94","id":18149242,"avatar_url":"https://avatars.githubusercontent.com/u/18149242?v=3","gravatar_id":"","url":"https://api.github.com/users/Goldsmith94","html_url":"https://github.com/Goldsmith94","followers_url":"https://api.github.com/users/Goldsmith94/followers","following_url":"https://api.github.com/users/Goldsmith94/following{/other_user}","gists_url":"https://api.github.com/users/Goldsmith94/gists{/gist_id}","starred_url":"https://api.github.com/users/Goldsmith94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Goldsmith94/subscriptions","organizations_url":"https://api.github.com/users/Goldsmith94/orgs","repos_url":"https://api.github.com/users/Goldsmith94/repos","events_url":"https://api.github.com/users/Goldsmith94/events{/privacy}","received_events_url":"https://api.github.com/users/Goldsmith94/received_events","type":"User","site_admin":false},"repo":{"id":55332615,"name":"nyu-vote","full_name":"Goldsmith94/nyu-vote","owner":{"login":"Goldsmith94","id":18149242,"avatar_url":"https://avatars.githubusercontent.com/u/18149242?v=3","gravatar_id":"","url":"https://api.github.com/users/Goldsmith94","html_url":"https://github.com/Goldsmith94","followers_url":"https://api.github.com/users/Goldsmith94/followers","following_url":"https://api.github.com/users/Goldsmith94/following{/other_user}","gists_url":"https://api.github.com/users/Goldsmith94/gists{/gist_id}","starred_url":"https://api.github.com/users/Goldsmith94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Goldsmith94/subscriptions","organizations_url":"https://api.github.com/users/Goldsmith94/orgs","repos_url":"https://api.github.com/users/Goldsmith94/repos","events_url":"https://api.github.com/users/Goldsmith94/events{/privacy}","received_events_url":"https://api.github.com/users/Goldsmith94/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Goldsmith94/nyu-vote","description":"NYU voting server","fork":true,"url":"https://api.github.com/repos/Goldsmith94/nyu-vote","forks_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/forks","keys_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/teams","hooks_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/hooks","issue_events_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/issues/events{/number}","events_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/events","assignees_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/assignees{/user}","branches_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/branches{/branch}","tags_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/tags","blobs_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/git/refs{/sha}","trees_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/statuses/{sha}","languages_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/languages","stargazers_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/stargazers","contributors_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/contributors","subscribers_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/subscribers","subscription_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/subscription","commits_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/commits{/sha}","git_commits_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/git/commits{/sha}","comments_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/comments{/number}","issue_comment_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/issues/comments{/number}","contents_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/contents/{+path}","compare_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/merges","archive_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/downloads","issues_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/issues{/number}","pulls_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/pulls{/number}","milestones_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/milestones{/number}","notifications_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/labels{/name}","releases_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/releases{/id}","deployments_url":"https://api.github.com/repos/Goldsmith94/nyu-vote/deployments","created_at":"2016-04-03T06:13:40Z","updated_at":"2016-04-03T06:13:43Z","pushed_at":"2016-04-24T10:20:18Z","git_url":"git://github.com/Goldsmith94/nyu-vote.git","ssh_url":"git@github.com:Goldsmith94/nyu-vote.git","clone_url":"https://github.com/Goldsmith94/nyu-vote.git","svn_url":"https://github.com/Goldsmith94/nyu-vote","homepage":null,"size":591,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","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":"hackAD:master","ref":"master","sha":"67a3b6a7d5bc6a296bbe415d3fb71de479eee6b2","user":{"login":"hackAD","id":7273616,"avatar_url":"https://avatars.githubusercontent.com/u/7273616?v=3","gravatar_id":"","url":"https://api.github.com/users/hackAD","html_url":"https://github.com/hackAD","followers_url":"https://api.github.com/users/hackAD/followers","following_url":"https://api.github.com/users/hackAD/following{/other_user}","gists_url":"https://api.github.com/users/hackAD/gists{/gist_id}","starred_url":"https://api.github.com/users/hackAD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackAD/subscriptions","organizations_url":"https://api.github.com/users/hackAD/orgs","repos_url":"https://api.github.com/users/hackAD/repos","events_url":"https://api.github.com/users/hackAD/events{/privacy}","received_events_url":"https://api.github.com/users/hackAD/received_events","type":"Organization","site_admin":false},"repo":{"id":23505179,"name":"nyu-vote","full_name":"hackAD/nyu-vote","owner":{"login":"hackAD","id":7273616,"avatar_url":"https://avatars.githubusercontent.com/u/7273616?v=3","gravatar_id":"","url":"https://api.github.com/users/hackAD","html_url":"https://github.com/hackAD","followers_url":"https://api.github.com/users/hackAD/followers","following_url":"https://api.github.com/users/hackAD/following{/other_user}","gists_url":"https://api.github.com/users/hackAD/gists{/gist_id}","starred_url":"https://api.github.com/users/hackAD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackAD/subscriptions","organizations_url":"https://api.github.com/users/hackAD/orgs","repos_url":"https://api.github.com/users/hackAD/repos","events_url":"https://api.github.com/users/hackAD/events{/privacy}","received_events_url":"https://api.github.com/users/hackAD/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hackAD/nyu-vote","description":"NYU voting server","fork":false,"url":"https://api.github.com/repos/hackAD/nyu-vote","forks_url":"https://api.github.com/repos/hackAD/nyu-vote/forks","keys_url":"https://api.github.com/repos/hackAD/nyu-vote/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hackAD/nyu-vote/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hackAD/nyu-vote/teams","hooks_url":"https://api.github.com/repos/hackAD/nyu-vote/hooks","issue_events_url":"https://api.github.com/repos/hackAD/nyu-vote/issues/events{/number}","events_url":"https://api.github.com/repos/hackAD/nyu-vote/events","assignees_url":"https://api.github.com/repos/hackAD/nyu-vote/assignees{/user}","branches_url":"https://api.github.com/repos/hackAD/nyu-vote/branches{/branch}","tags_url":"https://api.github.com/repos/hackAD/nyu-vote/tags","blobs_url":"https://api.github.com/repos/hackAD/nyu-vote/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hackAD/nyu-vote/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hackAD/nyu-vote/git/refs{/sha}","trees_url":"https://api.github.com/repos/hackAD/nyu-vote/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hackAD/nyu-vote/statuses/{sha}","languages_url":"https://api.github.com/repos/hackAD/nyu-vote/languages","stargazers_url":"https://api.github.com/repos/hackAD/nyu-vote/stargazers","contributors_url":"https://api.github.com/repos/hackAD/nyu-vote/contributors","subscribers_url":"https://api.github.com/repos/hackAD/nyu-vote/subscribers","subscription_url":"https://api.github.com/repos/hackAD/nyu-vote/subscription","commits_url":"https://api.github.com/repos/hackAD/nyu-vote/commits{/sha}","git_commits_url":"https://api.github.com/repos/hackAD/nyu-vote/git/commits{/sha}","comments_url":"https://api.github.com/repos/hackAD/nyu-vote/comments{/number}","issue_comment_url":"https://api.github.com/repos/hackAD/nyu-vote/issues/comments{/number}","contents_url":"https://api.github.com/repos/hackAD/nyu-vote/contents/{+path}","compare_url":"https://api.github.com/repos/hackAD/nyu-vote/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hackAD/nyu-vote/merges","archive_url":"https://api.github.com/repos/hackAD/nyu-vote/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hackAD/nyu-vote/downloads","issues_url":"https://api.github.com/repos/hackAD/nyu-vote/issues{/number}","pulls_url":"https://api.github.com/repos/hackAD/nyu-vote/pulls{/number}","milestones_url":"https://api.github.com/repos/hackAD/nyu-vote/milestones{/number}","notifications_url":"https://api.github.com/repos/hackAD/nyu-vote/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hackAD/nyu-vote/labels{/name}","releases_url":"https://api.github.com/repos/hackAD/nyu-vote/releases{/id}","deployments_url":"https://api.github.com/repos/hackAD/nyu-vote/deployments","created_at":"2014-08-31T02:48:45Z","updated_at":"2016-04-16T20:13:41Z","pushed_at":"2016-04-24T10:26:47Z","git_url":"git://github.com/hackAD/nyu-vote.git","ssh_url":"git@github.com:hackAD/nyu-vote.git","clone_url":"https://github.com/hackAD/nyu-vote.git","svn_url":"https://github.com/hackAD/nyu-vote","homepage":null,"size":532,"stargazers_count":4,"watchers_count":4,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hackAD/nyu-vote/pulls/2"},"html":{"href":"https://github.com/hackAD/nyu-vote/pull/2"},"issue":{"href":"https://api.github.com/repos/hackAD/nyu-vote/issues/2"},"comments":{"href":"https://api.github.com/repos/hackAD/nyu-vote/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/hackAD/nyu-vote/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/hackAD/nyu-vote/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hackAD/nyu-vote/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/hackAD/nyu-vote/statuses/1d1782d7e65e24b1a86316dd845e2fb952a85cf9"}}}}