diff --git a/mod/resource/type/file/resource.class.php b/mod/resource/type/file/resource.class.php
index 03e3e83fbf9..ac88a7cccea 100644
--- a/mod/resource/type/file/resource.class.php
+++ b/mod/resource/type/file/resource.class.php
@@ -370,25 +370,61 @@ class resource_file extends resource_base {
/// Now check whether we need to display a frameset
$frameset = optional_param('frameset', '', PARAM_ALPHA);
- if (empty($frameset) and !$embedded and !$inpopup and ($resource->options == "frame") and empty($USER->screenreader)) {
- @header('Content-Type: text/html; charset=utf-8');
- echo "\n";
- echo "\n";
- echo '
';
- echo '';
- echo "" . format_string($course->shortname) . ": ".strip_tags(format_string($resource->name,true))."\n";
- echo "";
- echo "";
- exit;
+ echo '';
+
+ ///embedded HTML file into an object tag
+ echo '';
+
+ ///add some javascript in order to fit this object tag into the browser window
+ echo '
+ ';
+
+ ///print the summary
+ if (!empty($resource->summary)) {
+ print_simple_box(format_text($resource->summary, FORMAT_MOODLE, $formatoptions, $course->id), "center");
+ }
+ echo "