{"action":"created","comment":{"url":"https://api.github.com/repos/fsr-itse/EvaP/pulls/comments/48551652","id":48551652,"diff_hunk":"@@ -285,6 +289,28 @@ def semester_import(request, semester_id):\n \n \n @staff_required\n+def semester_export(request, semester_id):\n+    semester = get_object_or_404(Semester, id=semester_id)\n+\n+    ExportSheetFormset = formset_factory(form=ExportSheetForm, can_delete=True, extra=1)\n+    formset = ExportSheetFormset(request.POST or None, form_kwargs={'semester': semester})\n+\n+    if formset.is_valid():\n+        ignore_not_enough_answers = request.POST.get('ignore_not_enough_answers', False)\n+        course_types = []\n+        for form in formset:\n+            course_types.append(form.cleaned_data.get('selected_course_types'))","path":"evap/staff/views.py","position":45,"original_position":45,"commit_id":"ea1546776151792583c0b4032cfa0c102558f9a7","original_commit_id":"3a489c0fdae5ed803ec3c1a4649e1464e25a84bd","user":{"login":"karyon","id":1891915,"avatar_url":"https://avatars.githubusercontent.com/u/1891915?v=3","gravatar_id":"","url":"https://api.github.com/users/karyon","html_url":"https://github.com/karyon","followers_url":"https://api.github.com/users/karyon/followers","following_url":"https://api.github.com/users/karyon/following{/other_user}","gists_url":"https://api.github.com/users/karyon/gists{/gist_id}","starred_url":"https://api.github.com/users/karyon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karyon/subscriptions","organizations_url":"https://api.github.com/users/karyon/orgs","repos_url":"https://api.github.com/users/karyon/repos","events_url":"https://api.github.com/users/karyon/events{/privacy}","received_events_url":"https://api.github.com/users/karyon/received_events","type":"User","site_admin":false},"body":"course_types = [form.cleaned_data['selected_course_types'] for form in formset]","created_at":"2015-12-29T16:31:24Z","updated_at":"2015-12-29T16:31:24Z","html_url":"https://github.com/fsr-itse/EvaP/pull/695#discussion_r48551652","pull_request_url":"https://api.github.com/repos/fsr-itse/EvaP/pulls/695","_links":{"self":{"href":"https://api.github.com/repos/fsr-itse/EvaP/pulls/comments/48551652"},"html":{"href":"https://github.com/fsr-itse/EvaP/pull/695#discussion_r48551652"},"pull_request":{"href":"https://api.github.com/repos/fsr-itse/EvaP/pulls/695"}}},"pull_request":{"url":"https://api.github.com/repos/fsr-itse/EvaP/pulls/695","id":54736635,"html_url":"https://github.com/fsr-itse/EvaP/pull/695","diff_url":"https://github.com/fsr-itse/EvaP/pull/695.diff","patch_url":"https://github.com/fsr-itse/EvaP/pull/695.patch","issue_url":"https://api.github.com/repos/fsr-itse/EvaP/issues/695","number":695,"state":"open","locked":false,"title":"Export per type","user":{"login":"janno42","id":1781719,"avatar_url":"https://avatars.githubusercontent.com/u/1781719?v=3","gravatar_id":"","url":"https://api.github.com/users/janno42","html_url":"https://github.com/janno42","followers_url":"https://api.github.com/users/janno42/followers","following_url":"https://api.github.com/users/janno42/following{/other_user}","gists_url":"https://api.github.com/users/janno42/gists{/gist_id}","starred_url":"https://api.github.com/users/janno42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janno42/subscriptions","organizations_url":"https://api.github.com/users/janno42/orgs","repos_url":"https://api.github.com/users/janno42/repos","events_url":"https://api.github.com/users/janno42/events{/privacy}","received_events_url":"https://api.github.com/users/janno42/received_events","type":"User","site_admin":false},"body":"fix #692; enable exporting courses per type and move export view into staff app","created_at":"2015-12-29T15:56:37Z","updated_at":"2015-12-29T16:31:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9bd65232bce1620b533b5f68ada6803ef785c5e5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fsr-itse/EvaP/pulls/695/commits","review_comments_url":"https://api.github.com/repos/fsr-itse/EvaP/pulls/695/comments","review_comment_url":"https://api.github.com/repos/fsr-itse/EvaP/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fsr-itse/EvaP/issues/695/comments","statuses_url":"https://api.github.com/repos/fsr-itse/EvaP/statuses/ea1546776151792583c0b4032cfa0c102558f9a7","head":{"label":"janno42:export_per_type","ref":"export_per_type","sha":"ea1546776151792583c0b4032cfa0c102558f9a7","user":{"login":"janno42","id":1781719,"avatar_url":"https://avatars.githubusercontent.com/u/1781719?v=3","gravatar_id":"","url":"https://api.github.com/users/janno42","html_url":"https://github.com/janno42","followers_url":"https://api.github.com/users/janno42/followers","following_url":"https://api.github.com/users/janno42/following{/other_user}","gists_url":"https://api.github.com/users/janno42/gists{/gist_id}","starred_url":"https://api.github.com/users/janno42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janno42/subscriptions","organizations_url":"https://api.github.com/users/janno42/orgs","repos_url":"https://api.github.com/users/janno42/repos","events_url":"https://api.github.com/users/janno42/events{/privacy}","received_events_url":"https://api.github.com/users/janno42/received_events","type":"User","site_admin":false},"repo":{"id":20739629,"name":"EvaP","full_name":"janno42/EvaP","owner":{"login":"janno42","id":1781719,"avatar_url":"https://avatars.githubusercontent.com/u/1781719?v=3","gravatar_id":"","url":"https://api.github.com/users/janno42","html_url":"https://github.com/janno42","followers_url":"https://api.github.com/users/janno42/followers","following_url":"https://api.github.com/users/janno42/following{/other_user}","gists_url":"https://api.github.com/users/janno42/gists{/gist_id}","starred_url":"https://api.github.com/users/janno42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janno42/subscriptions","organizations_url":"https://api.github.com/users/janno42/orgs","repos_url":"https://api.github.com/users/janno42/repos","events_url":"https://api.github.com/users/janno42/events{/privacy}","received_events_url":"https://api.github.com/users/janno42/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/janno42/EvaP","description":"a university course evaluation system written in Python using Django","fork":true,"url":"https://api.github.com/repos/janno42/EvaP","forks_url":"https://api.github.com/repos/janno42/EvaP/forks","keys_url":"https://api.github.com/repos/janno42/EvaP/keys{/key_id}","collaborators_url":"https://api.github.com/repos/janno42/EvaP/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/janno42/EvaP/teams","hooks_url":"https://api.github.com/repos/janno42/EvaP/hooks","issue_events_url":"https://api.github.com/repos/janno42/EvaP/issues/events{/number}","events_url":"https://api.github.com/repos/janno42/EvaP/events","assignees_url":"https://api.github.com/repos/janno42/EvaP/assignees{/user}","branches_url":"https://api.github.com/repos/janno42/EvaP/branches{/branch}","tags_url":"https://api.github.com/repos/janno42/EvaP/tags","blobs_url":"https://api.github.com/repos/janno42/EvaP/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/janno42/EvaP/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/janno42/EvaP/git/refs{/sha}","trees_url":"https://api.github.com/repos/janno42/EvaP/git/trees{/sha}","statuses_url":"https://api.github.com/repos/janno42/EvaP/statuses/{sha}","languages_url":"https://api.github.com/repos/janno42/EvaP/languages","stargazers_url":"https://api.github.com/repos/janno42/EvaP/stargazers","contributors_url":"https://api.github.com/repos/janno42/EvaP/contributors","subscribers_url":"https://api.github.com/repos/janno42/EvaP/subscribers","subscription_url":"https://api.github.com/repos/janno42/EvaP/subscription","commits_url":"https://api.github.com/repos/janno42/EvaP/commits{/sha}","git_commits_url":"https://api.github.com/repos/janno42/EvaP/git/commits{/sha}","comments_url":"https://api.github.com/repos/janno42/EvaP/comments{/number}","issue_comment_url":"https://api.github.com/repos/janno42/EvaP/issues/comments{/number}","contents_url":"https://api.github.com/repos/janno42/EvaP/contents/{+path}","compare_url":"https://api.github.com/repos/janno42/EvaP/compare/{base}...{head}","merges_url":"https://api.github.com/repos/janno42/EvaP/merges","archive_url":"https://api.github.com/repos/janno42/EvaP/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/janno42/EvaP/downloads","issues_url":"https://api.github.com/repos/janno42/EvaP/issues{/number}","pulls_url":"https://api.github.com/repos/janno42/EvaP/pulls{/number}","milestones_url":"https://api.github.com/repos/janno42/EvaP/milestones{/number}","notifications_url":"https://api.github.com/repos/janno42/EvaP/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/janno42/EvaP/labels{/name}","releases_url":"https://api.github.com/repos/janno42/EvaP/releases{/id}","created_at":"2014-06-11T20:15:30Z","updated_at":"2015-01-06T21:08:30Z","pushed_at":"2015-12-29T16:30:35Z","git_url":"git://github.com/janno42/EvaP.git","ssh_url":"git@github.com:janno42/EvaP.git","clone_url":"https://github.com/janno42/EvaP.git","svn_url":"https://github.com/janno42/EvaP","homepage":"","size":9952,"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":"fsr-itse:master","ref":"master","sha":"261beee9a72d5f4b385aff4dbc5a069aaeb84e24","user":{"login":"fsr-itse","id":1298457,"avatar_url":"https://avatars.githubusercontent.com/u/1298457?v=3","gravatar_id":"","url":"https://api.github.com/users/fsr-itse","html_url":"https://github.com/fsr-itse","followers_url":"https://api.github.com/users/fsr-itse/followers","following_url":"https://api.github.com/users/fsr-itse/following{/other_user}","gists_url":"https://api.github.com/users/fsr-itse/gists{/gist_id}","starred_url":"https://api.github.com/users/fsr-itse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsr-itse/subscriptions","organizations_url":"https://api.github.com/users/fsr-itse/orgs","repos_url":"https://api.github.com/users/fsr-itse/repos","events_url":"https://api.github.com/users/fsr-itse/events{/privacy}","received_events_url":"https://api.github.com/users/fsr-itse/received_events","type":"Organization","site_admin":false},"repo":{"id":3110378,"name":"EvaP","full_name":"fsr-itse/EvaP","owner":{"login":"fsr-itse","id":1298457,"avatar_url":"https://avatars.githubusercontent.com/u/1298457?v=3","gravatar_id":"","url":"https://api.github.com/users/fsr-itse","html_url":"https://github.com/fsr-itse","followers_url":"https://api.github.com/users/fsr-itse/followers","following_url":"https://api.github.com/users/fsr-itse/following{/other_user}","gists_url":"https://api.github.com/users/fsr-itse/gists{/gist_id}","starred_url":"https://api.github.com/users/fsr-itse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsr-itse/subscriptions","organizations_url":"https://api.github.com/users/fsr-itse/orgs","repos_url":"https://api.github.com/users/fsr-itse/repos","events_url":"https://api.github.com/users/fsr-itse/events{/privacy}","received_events_url":"https://api.github.com/users/fsr-itse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fsr-itse/EvaP","description":"a university course evaluation system written in Python using Django","fork":false,"url":"https://api.github.com/repos/fsr-itse/EvaP","forks_url":"https://api.github.com/repos/fsr-itse/EvaP/forks","keys_url":"https://api.github.com/repos/fsr-itse/EvaP/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fsr-itse/EvaP/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fsr-itse/EvaP/teams","hooks_url":"https://api.github.com/repos/fsr-itse/EvaP/hooks","issue_events_url":"https://api.github.com/repos/fsr-itse/EvaP/issues/events{/number}","events_url":"https://api.github.com/repos/fsr-itse/EvaP/events","assignees_url":"https://api.github.com/repos/fsr-itse/EvaP/assignees{/user}","branches_url":"https://api.github.com/repos/fsr-itse/EvaP/branches{/branch}","tags_url":"https://api.github.com/repos/fsr-itse/EvaP/tags","blobs_url":"https://api.github.com/repos/fsr-itse/EvaP/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fsr-itse/EvaP/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fsr-itse/EvaP/git/refs{/sha}","trees_url":"https://api.github.com/repos/fsr-itse/EvaP/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fsr-itse/EvaP/statuses/{sha}","languages_url":"https://api.github.com/repos/fsr-itse/EvaP/languages","stargazers_url":"https://api.github.com/repos/fsr-itse/EvaP/stargazers","contributors_url":"https://api.github.com/repos/fsr-itse/EvaP/contributors","subscribers_url":"https://api.github.com/repos/fsr-itse/EvaP/subscribers","subscription_url":"https://api.github.com/repos/fsr-itse/EvaP/subscription","commits_url":"https://api.github.com/repos/fsr-itse/EvaP/commits{/sha}","git_commits_url":"https://api.github.com/repos/fsr-itse/EvaP/git/commits{/sha}","comments_url":"https://api.github.com/repos/fsr-itse/EvaP/comments{/number}","issue_comment_url":"https://api.github.com/repos/fsr-itse/EvaP/issues/comments{/number}","contents_url":"https://api.github.com/repos/fsr-itse/EvaP/contents/{+path}","compare_url":"https://api.github.com/repos/fsr-itse/EvaP/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fsr-itse/EvaP/merges","archive_url":"https://api.github.com/repos/fsr-itse/EvaP/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fsr-itse/EvaP/downloads","issues_url":"https://api.github.com/repos/fsr-itse/EvaP/issues{/number}","pulls_url":"https://api.github.com/repos/fsr-itse/EvaP/pulls{/number}","milestones_url":"https://api.github.com/repos/fsr-itse/EvaP/milestones{/number}","notifications_url":"https://api.github.com/repos/fsr-itse/EvaP/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fsr-itse/EvaP/labels{/name}","releases_url":"https://api.github.com/repos/fsr-itse/EvaP/releases{/id}","created_at":"2012-01-05T13:56:45Z","updated_at":"2015-12-17T23:57:32Z","pushed_at":"2015-12-29T16:30:36Z","git_url":"git://github.com/fsr-itse/EvaP.git","ssh_url":"git@github.com:fsr-itse/EvaP.git","clone_url":"https://github.com/fsr-itse/EvaP.git","svn_url":"https://github.com/fsr-itse/EvaP","homepage":"","size":49319,"stargazers_count":25,"watchers_count":25,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":53,"mirror_url":null,"open_issues_count":64,"forks":53,"open_issues":64,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fsr-itse/EvaP/pulls/695"},"html":{"href":"https://github.com/fsr-itse/EvaP/pull/695"},"issue":{"href":"https://api.github.com/repos/fsr-itse/EvaP/issues/695"},"comments":{"href":"https://api.github.com/repos/fsr-itse/EvaP/issues/695/comments"},"review_comments":{"href":"https://api.github.com/repos/fsr-itse/EvaP/pulls/695/comments"},"review_comment":{"href":"https://api.github.com/repos/fsr-itse/EvaP/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fsr-itse/EvaP/pulls/695/commits"},"statuses":{"href":"https://api.github.com/repos/fsr-itse/EvaP/statuses/ea1546776151792583c0b4032cfa0c102558f9a7"}}}}