diff --git a/mod/resource/type/file/resource.class.php b/mod/resource/type/file/resource.class.php index a00c6f605b7..94d885ae724 100644 --- a/mod/resource/type/file/resource.class.php +++ b/mod/resource/type/file/resource.class.php @@ -216,6 +216,7 @@ function display() { $formatoptions->noclean = true; if ($resource->options != "frame") { + if (in_array($mimetype, array('image/gif','image/jpeg','image/png'))) { // It's an image $resourcetype = "image"; $embedded = true; @@ -234,7 +235,7 @@ function display() { } else if ($mimetype == "text/html") { // It's a web page $resourcetype = "html"; - } + } } $isteamspeak = (stripos($resource->reference, 'teamspeak://') === 0); @@ -440,26 +441,26 @@ function display() { } else if ($resourcetype == "mediaplayer") { echo '
'; - echo ''; - echo ""; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo "\n'; - echo ''; + + echo ''; +// Old non-compliant code (but used to work with Opera/Safari) +// echo ''; + echo ''; + echo ''; + echo ""; + echo ''; +// Old non-compliant code +// echo "\n'; +// echo ''; + echo "$fullurl"; echo ''; + echo ''; } else if ($resourcetype == "quicktime") { @@ -467,21 +468,31 @@ function display() { echo '
'; echo ''; + echo ' id="quicktime" type="application/x-oleobject">'; echo ""; echo ''; echo ''; echo ''; echo ''; - echo "\n'; - echo ''; + // New compliant code + echo ''; + echo ""; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + +// Old non-compliant code +// echo "\n'; +// echo ''; echo ''; echo '
'; - } + } if (trim($resource->summary)) { print_simple_box(format_text($resource->summary, FORMAT_MOODLE, $formatoptions, $course->id), "center"); diff --git a/theme/standard/styles_layout.css b/theme/standard/styles_layout.css index 5c1bc014003..de2074916fb 100644 --- a/theme/standard/styles_layout.css +++ b/theme/standard/styles_layout.css @@ -3023,6 +3023,11 @@ body#question-preview .quemodname, body#question-preview .controls { margin:20px; } +.resourcecontent object { + height:480px; + width:600px; +} + .mod-resource .modified { text-align:center; }