MDL-32221 - googledocs: Add support for all file types.
authorDan Poltawski <dan@moodle.com>
Sun, 13 May 2012 04:57:41 +0000 (12:57 +0800)
committerDan Poltawski <dan@moodle.com>
Tue, 29 May 2012 02:13:21 +0000 (10:13 +0800)
Now google supports 'file' as well as converted formats.

lib/googleapi.php

index a079ffb..5129294 100644 (file)
@@ -319,6 +319,10 @@ class google_docs {
                     $title  = (string)$gdoc->title;
                     $source = (string)$gdoc->content[0]->attributes()->src;
                     break;
+                case 'file':
+                    $title = (string)$gdoc->title;
+                    $source = (string)$gdoc->content[0]->attributes()->src;
+                    break;
             }
 
             if(!empty($source)){