{"action":"created","issue":{"url":"https://api.github.com/repos/edx/edx-ora2/issues/708","labels_url":"https://api.github.com/repos/edx/edx-ora2/issues/708/labels{/name}","comments_url":"https://api.github.com/repos/edx/edx-ora2/issues/708/comments","events_url":"https://api.github.com/repos/edx/edx-ora2/issues/708/events","html_url":"https://github.com/edx/edx-ora2/pull/708","id":92231040,"number":708,"title":"Allow file upload for PDF and arbitrary file types in addition to image","user":{"login":"xcompass","id":465548,"avatar_url":"https://avatars.githubusercontent.com/u/465548?v=3","gravatar_id":"","url":"https://api.github.com/users/xcompass","html_url":"https://github.com/xcompass","followers_url":"https://api.github.com/users/xcompass/followers","following_url":"https://api.github.com/users/xcompass/following{/other_user}","gists_url":"https://api.github.com/users/xcompass/gists{/gist_id}","starred_url":"https://api.github.com/users/xcompass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xcompass/subscriptions","organizations_url":"https://api.github.com/users/xcompass/orgs","repos_url":"https://api.github.com/users/xcompass/repos","events_url":"https://api.github.com/users/xcompass/events{/privacy}","received_events_url":"https://api.github.com/users/xcompass/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/edx/edx-ora2/labels/open-source-contribution","name":"open-source-contribution","color":"bfe5bf"},{"url":"https://api.github.com/repos/edx/edx-ora2/labels/waiting%20on%20author","name":"waiting on author","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":135,"created_at":"2015-07-01T00:31:00Z","updated_at":"2015-10-22T07:48:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/edx/edx-ora2/pulls/708","html_url":"https://github.com/edx/edx-ora2/pull/708","diff_url":"https://github.com/edx/edx-ora2/pull/708.diff","patch_url":"https://github.com/edx/edx-ora2/pull/708.patch"},"body":"This PR is based on Stanford's work for extending uploadable files to more types. The current upload functionality only allows images.\r\n\r\nNow the course author can set \"image\", \"PDF and image\" or \"Custom White List\" file to be allowed to upload along with submission. When \"image\" or \"PDF and image\" file type is selected, the file mime type is checked against a whitelist. When \"Custom White List\" is selected, a white list input box is shown for a list of allowed file extensions. As there is potential for students to upload malicious files, an warning message is printed in the help line. This feature allow instructors to enable students uploading their course work other than images. \r\n\r\nNote: This PR added additional fields to ORA2 XBlock. So \"paver update_db\" is required.\r\nSandbox Link: https://ora-file-upload.sandbox.edx.org/login <--edited to https Alison 15 Sep 15"},"comment":{"url":"https://api.github.com/repos/edx/edx-ora2/issues/comments/150136415","html_url":"https://github.com/edx/edx-ora2/pull/708#issuecomment-150136415","issue_url":"https://api.github.com/repos/edx/edx-ora2/issues/708","id":150136415,"user":{"login":"xcompass","id":465548,"avatar_url":"https://avatars.githubusercontent.com/u/465548?v=3","gravatar_id":"","url":"https://api.github.com/users/xcompass","html_url":"https://github.com/xcompass","followers_url":"https://api.github.com/users/xcompass/followers","following_url":"https://api.github.com/users/xcompass/following{/other_user}","gists_url":"https://api.github.com/users/xcompass/gists{/gist_id}","starred_url":"https://api.github.com/users/xcompass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xcompass/subscriptions","organizations_url":"https://api.github.com/users/xcompass/orgs","repos_url":"https://api.github.com/users/xcompass/repos","events_url":"https://api.github.com/users/xcompass/events{/privacy}","received_events_url":"https://api.github.com/users/xcompass/received_events","type":"User","site_admin":false},"created_at":"2015-10-22T07:48:59Z","updated_at":"2015-10-22T07:48:59Z","body":"For adding the course fixtures for file upload acceptance tests, here is what I did:\r\n* Add new section: File Upload\r\n* Add new subsection: File Upload\r\n* Add new unit: File\r\n* Add new Peer Assessment with the following settings changed from default:\r\n  * display name: RST File\r\n  * Allow File Upload: Custom File Types\r\n  * File Types: rst\r\n  * Uncheck student training and self assessment\r\n* Save\r\n\r\nIn order to run the acceptance tests, you need to make sure this line(https://github.com/ubc/edx-ora2/blob/xcompass/pu/file-upload/test/acceptance/tests.py#L63) matches to the created Peer Assessment xblock's location."}}