Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Not a bug
-
Affects Version/s: 1.9
-
Fix Version/s: None
-
Component/s: Resource
-
Labels:None
-
Affected Branches:MOODLE_19_STABLE
Description
When we click on the following powerpoint file resouce, a blank page will be displayed.
1. Resource type: ppt (Powerpoint file)
2. Window: new window
To prevent this blank page, we can modify mod/resource/type/file/resource.class.php as below.
Index: resource.class.php
===================================================================
RCS file: /cvsroot/moodle/moodle/mod/resource/type/file/resource.class.php,v
retrieving revision 1.68
diff -u -r1.68 resource.class.php
— resource.class.php 19 Jul 2007 05:51:33 -0000 1.68
+++ resource.class.php 19 Jul 2007 22:51:38 -0000
@@ -605,6 +605,9 @@
echo '</div>';
echo "<div class=\"popupnotice\">(<a href=\"$fullurl\">$fullurl</a>)</div>";
}
+ if ($mimetype == "application/vnd.ms-powerpoint") {
+ $fullurl = $fullurl . "?forcedownload=1";
+ }
redirect($fullurl);
}
This problem also affects 1.8! It was of huge concern to us, because we have a large number of powerpoint files in the system and many users who only use IE7.
This fix saved us, so thanks for posting! I hope this is adopted in core soon, and also provided for 1.8.2.