|
|
|
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);
}
|
|
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);
}
|
Show » |
| No commits have yet been performed on this issue.
|
|