Google Drive speed grader preview

Fixes PLAT-929

Test plan

use beta :/
submit an assignment from google drive
make sure you can preview it in speed grader

Change-Id: I19545cde75a26cff34ff63506b69fba3d6a1363f
Reviewed-on: https://gerrit.instructure.com/50717
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
This commit is contained in:
Brad Horrocks 2015-03-20 13:08:06 -06:00
parent 2d515683ac
commit b4ec21af5d
1 changed files with 1 additions and 0 deletions

View File

@ -66,6 +66,7 @@ define([
// ex: $.isPreviewable("application/mspowerpoint") -> true
// $.isPreviewable("application/rtf", 'google') -> false
$.isPreviewable = function(mimeType, service){
mimeType = mimeType.replace(/; charset=[^;]+/g, ''); // google drive returns the charset
return $.filePreviewsEnabled() && previewableMimeTypes[mimeType] && (
!service ||
(!INST['disable' + $.capitalize(service) + 'Previews'] && previewableMimeTypes[mimeType][{scribd: 0, google: 1}[service]])