From: nicolasconnault Date: Mon, 30 Jul 2007 16:43:12 +0000 (+0000) Subject: MDL-9664 Attempting to address the issue. I need feedback from many people on this... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e751b5602e560425b1e7f172921b839e3c6b9515;p=moodle.git MDL-9664 Attempting to address the issue. I need feedback from many people on this, so this commit is only a temporary fix. --- diff --git a/mod/resource/type/file/resource.class.php b/mod/resource/type/file/resource.class.php index 175d7e9dcf..12d0122135 100644 --- a/mod/resource/type/file/resource.class.php +++ b/mod/resource/type/file/resource.class.php @@ -214,8 +214,8 @@ function display() { $formatoptions = new object(); $formatoptions->noclean = true; - - if ($resource->options == "frame") { // TODO nicolasconnault 14-03-07: This option should be renamed "embed" + + if ($resource->options != "bogusoption_usedtobe_frame") { // TODO nicolasconnault 14-03-07: This option should be renamed "embed" if (in_array($mimetype, array('image/gif','image/jpeg','image/png'))) { // It's an image $resourcetype = "image"; $embedded = true; @@ -223,7 +223,7 @@ function display() { } else if ($mimetype == "audio/mp3") { // It's an MP3 audio file $resourcetype = "mp3"; $embedded = true; - + } else if ($mimetype == "video/x-flv") { // It's a Flash video file $resourcetype = "flv"; $embedded = true; @@ -390,7 +390,7 @@ function display() { /// If we are in a frameset, just print the top of it if (!empty( $frameset ) and ($frameset == "top") ) { - + print_header($pagetitle, $course->fullname, "$this->navigation ".format_string($resource->name), "", "", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, "parent")); $options = new object(); @@ -495,10 +495,10 @@ function display() { } else if ($resourcetype == "mediaplayer") { echo '
'; - echo ''; - echo ''; - echo ''; - echo ""; + echo ''; + echo ''; + echo ''; + echo ""; echo ''; echo "$fullurl"; echo ''; @@ -516,10 +516,10 @@ function display() { echo ''; echo ''; echo ''; - echo ''; - echo ''; - echo ''; - echo ""; + echo ''; + echo ''; + echo ''; + echo ""; echo "$fullurl"; echo ''; echo '' . $fullurl . ''; @@ -540,7 +540,7 @@ function display() { echo '/**/'; echo ''; echo '
'; - + echo ''; echo ""; @@ -548,7 +548,7 @@ function display() { echo ''; echo ''; echo ''; - + echo ""; echo ''; echo ''; @@ -558,7 +558,7 @@ function display() { echo '' . $fullurl . ''; echo ''; echo ''; - } else if ($resourcetype == "flash") { + } else if ($resourcetype == "flash") { echo '
'; echo ''; echo ""; @@ -685,9 +685,9 @@ function setup_elements(&$mform) { $woptions = array(0 => get_string('pagewindow', 'resource'), 1 => get_string('newwindow', 'resource')); $mform->addElement('select', 'windowpopup', get_string('display', 'resource'), $woptions); $mform->setDefault('windowpopup', !empty($CFG->resource_popup)); - + $mform->addElement('checkbox', 'framepage', get_string('keepnavigationvisible', 'resource')); - + $mform->setHelpButton('framepage', array('frameifpossible', get_string('keepnavigationvisible', 'resource'), 'resource')); $mform->setDefault('framepage', 0); $mform->disabledIf('framepage', 'windowpopup', 'eq', 1);