Index: moodle/lib/googleapi.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- moodle/lib/googleapi.php (revision ) +++ moodle/lib/googleapi.php (revision ) @@ -304,8 +304,8 @@ // chose. switch($type){ case 'document': - $title = $gdoc->title.'.rtf'; - $source = 'https://docs.google.com/feeds/download/documents/Export?id='.$docid.'&exportFormat=rtf'; + $title = $gdoc->title.'.doc'; + $source = 'https://docs.google.com/feeds/download/documents/Export?id='.$docid.'&exportFormat=doc'; break; case 'presentation': $title = $gdoc->title.'.ppt'; @@ -316,7 +316,11 @@ $source = 'https://spreadsheets.google.com/feeds/download/spreadsheets/Export?key='.$docid.'&exportFormat=xls'; break; case 'pdf': + $title = (string)$gdoc->title; + $source = (string)$gdoc->content[0]->attributes()->src; + break; + case 'file': - $title = (string)$gdoc->title; + $title = (string)$gdoc->title; $source = (string)$gdoc->content[0]->attributes()->src; break; }