{"action":"created","comment":{"url":"https://api.github.com/repos/Coursemology/coursemology.org/pulls/comments/22398201","id":22398201,"diff_hunk":"@@ -102,6 +106,77 @@ def index\n     end\n   end\n \n+  # Export all completed assessments of the given type as a zip file of PDFs.\n+  def dump_pdfs\n+    assessment_type = params[:type]\n+\n+    # Abort if PDF export is not enabled.\n+    @pdf_export = @course.pdf_export(assessment_type).display","path":"app/controllers/assessment/assessments_controller.rb","position":35,"original_position":35,"commit_id":"a9524e6654bb6036f9748da7402e8824bff34e4e","original_commit_id":"a9524e6654bb6036f9748da7402e8824bff34e4e","user":{"login":"raymondtangsc","id":1009854,"avatar_url":"https://avatars.githubusercontent.com/u/1009854?v=3","gravatar_id":"","url":"https://api.github.com/users/raymondtangsc","html_url":"https://github.com/raymondtangsc","followers_url":"https://api.github.com/users/raymondtangsc/followers","following_url":"https://api.github.com/users/raymondtangsc/following{/other_user}","gists_url":"https://api.github.com/users/raymondtangsc/gists{/gist_id}","starred_url":"https://api.github.com/users/raymondtangsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raymondtangsc/subscriptions","organizations_url":"https://api.github.com/users/raymondtangsc/orgs","repos_url":"https://api.github.com/users/raymondtangsc/repos","events_url":"https://api.github.com/users/raymondtangsc/events{/privacy}","received_events_url":"https://api.github.com/users/raymondtangsc/received_events","type":"User","site_admin":false},"body":"is this one needs to be an instance variable ? Or local variable will do  ?","created_at":"2015-01-01T05:58:59Z","updated_at":"2015-01-01T05:58:59Z","html_url":"https://github.com/Coursemology/coursemology.org/pull/310#discussion_r22398201","pull_request_url":"https://api.github.com/repos/Coursemology/coursemology.org/pulls/310","_links":{"self":{"href":"https://api.github.com/repos/Coursemology/coursemology.org/pulls/comments/22398201"},"html":{"href":"https://github.com/Coursemology/coursemology.org/pull/310#discussion_r22398201"},"pull_request":{"href":"https://api.github.com/repos/Coursemology/coursemology.org/pulls/310"}}},"pull_request":{"url":"https://api.github.com/repos/Coursemology/coursemology.org/pulls/310","id":25620833,"html_url":"https://github.com/Coursemology/coursemology.org/pull/310","diff_url":"https://github.com/Coursemology/coursemology.org/pull/310.diff","patch_url":"https://github.com/Coursemology/coursemology.org/pull/310.patch","issue_url":"https://api.github.com/repos/Coursemology/coursemology.org/issues/310","number":310,"state":"open","locked":false,"title":"Implement PDF export for graded Missions and Trainings","user":{"login":"jiunwei-moe","id":7847512,"avatar_url":"https://avatars.githubusercontent.com/u/7847512?v=3","gravatar_id":"","url":"https://api.github.com/users/jiunwei-moe","html_url":"https://github.com/jiunwei-moe","followers_url":"https://api.github.com/users/jiunwei-moe/followers","following_url":"https://api.github.com/users/jiunwei-moe/following{/other_user}","gists_url":"https://api.github.com/users/jiunwei-moe/gists{/gist_id}","starred_url":"https://api.github.com/users/jiunwei-moe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiunwei-moe/subscriptions","organizations_url":"https://api.github.com/users/jiunwei-moe/orgs","repos_url":"https://api.github.com/users/jiunwei-moe/repos","events_url":"https://api.github.com/users/jiunwei-moe/events{/privacy}","received_events_url":"https://api.github.com/users/jiunwei-moe/received_events","type":"User","site_admin":false},"body":"Resolves #260 ","created_at":"2014-12-06T16:50:25Z","updated_at":"2015-01-01T05:58:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a619ed69eb01103471a4e87e2d1364b6970d5a2e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Coursemology/coursemology.org/pulls/310/commits","review_comments_url":"https://api.github.com/repos/Coursemology/coursemology.org/pulls/310/comments","review_comment_url":"https://api.github.com/repos/Coursemology/coursemology.org/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Coursemology/coursemology.org/issues/310/comments","statuses_url":"https://api.github.com/repos/Coursemology/coursemology.org/statuses/a9524e6654bb6036f9748da7402e8824bff34e4e","head":{"label":"jiunwei-moe:assessment-printing","ref":"assessment-printing","sha":"a9524e6654bb6036f9748da7402e8824bff34e4e","user":{"login":"jiunwei-moe","id":7847512,"avatar_url":"https://avatars.githubusercontent.com/u/7847512?v=3","gravatar_id":"","url":"https://api.github.com/users/jiunwei-moe","html_url":"https://github.com/jiunwei-moe","followers_url":"https://api.github.com/users/jiunwei-moe/followers","following_url":"https://api.github.com/users/jiunwei-moe/following{/other_user}","gists_url":"https://api.github.com/users/jiunwei-moe/gists{/gist_id}","starred_url":"https://api.github.com/users/jiunwei-moe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiunwei-moe/subscriptions","organizations_url":"https://api.github.com/users/jiunwei-moe/orgs","repos_url":"https://api.github.com/users/jiunwei-moe/repos","events_url":"https://api.github.com/users/jiunwei-moe/events{/privacy}","received_events_url":"https://api.github.com/users/jiunwei-moe/received_events","type":"User","site_admin":false},"repo":{"id":25857096,"name":"coursemology.org","full_name":"jiunwei-moe/coursemology.org","owner":{"login":"jiunwei-moe","id":7847512,"avatar_url":"https://avatars.githubusercontent.com/u/7847512?v=3","gravatar_id":"","url":"https://api.github.com/users/jiunwei-moe","html_url":"https://github.com/jiunwei-moe","followers_url":"https://api.github.com/users/jiunwei-moe/followers","following_url":"https://api.github.com/users/jiunwei-moe/following{/other_user}","gists_url":"https://api.github.com/users/jiunwei-moe/gists{/gist_id}","starred_url":"https://api.github.com/users/jiunwei-moe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiunwei-moe/subscriptions","organizations_url":"https://api.github.com/users/jiunwei-moe/orgs","repos_url":"https://api.github.com/users/jiunwei-moe/repos","events_url":"https://api.github.com/users/jiunwei-moe/events{/privacy}","received_events_url":"https://api.github.com/users/jiunwei-moe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jiunwei-moe/coursemology.org","description":"","fork":true,"url":"https://api.github.com/repos/jiunwei-moe/coursemology.org","forks_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/forks","keys_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/teams","hooks_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/hooks","issue_events_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/issues/events{/number}","events_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/events","assignees_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/assignees{/user}","branches_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/branches{/branch}","tags_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/tags","blobs_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/statuses/{sha}","languages_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/languages","stargazers_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/stargazers","contributors_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/contributors","subscribers_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/subscribers","subscription_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/subscription","commits_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/issues/comments/{number}","contents_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/contents/{+path}","compare_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/merges","archive_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/downloads","issues_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/issues{/number}","pulls_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/pulls{/number}","milestones_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/milestones{/number}","notifications_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/labels{/name}","releases_url":"https://api.github.com/repos/jiunwei-moe/coursemology.org/releases{/id}","created_at":"2014-10-28T07:04:58Z","updated_at":"2014-12-06T16:44:33Z","pushed_at":"2014-12-16T12:51:18Z","git_url":"git://github.com/jiunwei-moe/coursemology.org.git","ssh_url":"git@github.com:jiunwei-moe/coursemology.org.git","clone_url":"https://github.com/jiunwei-moe/coursemology.org.git","svn_url":"https://github.com/jiunwei-moe/coursemology.org","homepage":"coursemology.org","size":31883,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"development"}},"base":{"label":"Coursemology:development","ref":"development","sha":"64ca0a58040a17652bf0fff8119cb3f815a115b5","user":{"login":"Coursemology","id":4427741,"avatar_url":"https://avatars.githubusercontent.com/u/4427741?v=3","gravatar_id":"","url":"https://api.github.com/users/Coursemology","html_url":"https://github.com/Coursemology","followers_url":"https://api.github.com/users/Coursemology/followers","following_url":"https://api.github.com/users/Coursemology/following{/other_user}","gists_url":"https://api.github.com/users/Coursemology/gists{/gist_id}","starred_url":"https://api.github.com/users/Coursemology/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Coursemology/subscriptions","organizations_url":"https://api.github.com/users/Coursemology/orgs","repos_url":"https://api.github.com/users/Coursemology/repos","events_url":"https://api.github.com/users/Coursemology/events{/privacy}","received_events_url":"https://api.github.com/users/Coursemology/received_events","type":"Organization","site_admin":false},"repo":{"id":10055153,"name":"coursemology.org","full_name":"Coursemology/coursemology.org","owner":{"login":"Coursemology","id":4427741,"avatar_url":"https://avatars.githubusercontent.com/u/4427741?v=3","gravatar_id":"","url":"https://api.github.com/users/Coursemology","html_url":"https://github.com/Coursemology","followers_url":"https://api.github.com/users/Coursemology/followers","following_url":"https://api.github.com/users/Coursemology/following{/other_user}","gists_url":"https://api.github.com/users/Coursemology/gists{/gist_id}","starred_url":"https://api.github.com/users/Coursemology/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Coursemology/subscriptions","organizations_url":"https://api.github.com/users/Coursemology/orgs","repos_url":"https://api.github.com/users/Coursemology/repos","events_url":"https://api.github.com/users/Coursemology/events{/privacy}","received_events_url":"https://api.github.com/users/Coursemology/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Coursemology/coursemology.org","description":"","fork":false,"url":"https://api.github.com/repos/Coursemology/coursemology.org","forks_url":"https://api.github.com/repos/Coursemology/coursemology.org/forks","keys_url":"https://api.github.com/repos/Coursemology/coursemology.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Coursemology/coursemology.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Coursemology/coursemology.org/teams","hooks_url":"https://api.github.com/repos/Coursemology/coursemology.org/hooks","issue_events_url":"https://api.github.com/repos/Coursemology/coursemology.org/issues/events{/number}","events_url":"https://api.github.com/repos/Coursemology/coursemology.org/events","assignees_url":"https://api.github.com/repos/Coursemology/coursemology.org/assignees{/user}","branches_url":"https://api.github.com/repos/Coursemology/coursemology.org/branches{/branch}","tags_url":"https://api.github.com/repos/Coursemology/coursemology.org/tags","blobs_url":"https://api.github.com/repos/Coursemology/coursemology.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Coursemology/coursemology.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Coursemology/coursemology.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/Coursemology/coursemology.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Coursemology/coursemology.org/statuses/{sha}","languages_url":"https://api.github.com/repos/Coursemology/coursemology.org/languages","stargazers_url":"https://api.github.com/repos/Coursemology/coursemology.org/stargazers","contributors_url":"https://api.github.com/repos/Coursemology/coursemology.org/contributors","subscribers_url":"https://api.github.com/repos/Coursemology/coursemology.org/subscribers","subscription_url":"https://api.github.com/repos/Coursemology/coursemology.org/subscription","commits_url":"https://api.github.com/repos/Coursemology/coursemology.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/Coursemology/coursemology.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/Coursemology/coursemology.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/Coursemology/coursemology.org/issues/comments/{number}","contents_url":"https://api.github.com/repos/Coursemology/coursemology.org/contents/{+path}","compare_url":"https://api.github.com/repos/Coursemology/coursemology.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Coursemology/coursemology.org/merges","archive_url":"https://api.github.com/repos/Coursemology/coursemology.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Coursemology/coursemology.org/downloads","issues_url":"https://api.github.com/repos/Coursemology/coursemology.org/issues{/number}","pulls_url":"https://api.github.com/repos/Coursemology/coursemology.org/pulls{/number}","milestones_url":"https://api.github.com/repos/Coursemology/coursemology.org/milestones{/number}","notifications_url":"https://api.github.com/repos/Coursemology/coursemology.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Coursemology/coursemology.org/labels{/name}","releases_url":"https://api.github.com/repos/Coursemology/coursemology.org/releases{/id}","created_at":"2013-05-14T13:04:30Z","updated_at":"2015-01-01T05:50:46Z","pushed_at":"2015-01-01T05:50:44Z","git_url":"git://github.com/Coursemology/coursemology.org.git","ssh_url":"git@github.com:Coursemology/coursemology.org.git","clone_url":"https://github.com/Coursemology/coursemology.org.git","svn_url":"https://github.com/Coursemology/coursemology.org","homepage":"coursemology.org","size":37389,"stargazers_count":25,"watchers_count":25,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":50,"forks":29,"open_issues":50,"watchers":25,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/Coursemology/coursemology.org/pulls/310"},"html":{"href":"https://github.com/Coursemology/coursemology.org/pull/310"},"issue":{"href":"https://api.github.com/repos/Coursemology/coursemology.org/issues/310"},"comments":{"href":"https://api.github.com/repos/Coursemology/coursemology.org/issues/310/comments"},"review_comments":{"href":"https://api.github.com/repos/Coursemology/coursemology.org/pulls/310/comments"},"review_comment":{"href":"https://api.github.com/repos/Coursemology/coursemology.org/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Coursemology/coursemology.org/pulls/310/commits"},"statuses":{"href":"https://api.github.com/repos/Coursemology/coursemology.org/statuses/a9524e6654bb6036f9748da7402e8824bff34e4e"}}}}