MDL-8792 - Simply added help icon to explain the options available regarding embedding media files in the site.

This commit is contained in:
nicolasconnault
2007-03-12 05:27:43 +00:00
parent a8d9136e89
commit 96ef423773
4 changed files with 128 additions and 1 deletions
@@ -0,0 +1,11 @@
<h1>Embedding media in a frame</h1>
<p>The normal way to display embedded media is either in an object element, if your
browser supports it, or on a page of its own. These methods are compliant with
XHTML strict standards. However, in some cases, your browser may not support the
type of file you want to embed, and you still want it to appear within your site's context
(with the navigation breadcrumbs etc..). The only way to do this is to enable this option.
However, this is not compliant with XHTML strict.</p>
<p>
If your users have the option screenreader switched on in their profile, it will override this
option, so that frames will never be used to display embedded media for these users.
</p>
+57
View File
@@ -0,0 +1,57 @@
<?php // $Id$
///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.org //
// //
// Copyright (C) 1999-2004 Martin Dougiamas http://dougiamas.com //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details: //
// //
// http://www.gnu.org/copyleft/gpl.html //
// //
///////////////////////////////////////////////////////////////////////////
/**
* Unit tests for (some of) ../moodlelib.php.
*
* @copyright &copy; 2006 The Open University
* @author [email protected]
* @author [email protected]
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package moodlecore
*/
/** $Id */
require_once(dirname(__FILE__) . '/../../config.php');
global $CFG;
require_once($CFG->libdir . '/simpletestlib.php');
require_once($CFG->dirroot . '/mod/forum/lib.php');
class modforumlib_test extends UnitTestCase {
function setUp() {
}
function tearDown() {
}
function test_forum_cron() {
forum_cron();
$this->assertTrue(false);
}
}
?>
+57
View File
@@ -123,6 +123,63 @@ class moodlelib_test extends UnitTestCase {
$this->assertTrue(check_browser_version('Firefox', '1.5'));
$this->assertFalse(check_browser_version('Firefox', '3.0'));
}
function test_optional_param()
{
$_POST['username'] = 'post_user';
$_GET['username'] = 'get_user';
$this->assertEqual(optional_param('username', 'default_user'), 'post_user');
unset($_POST['username']);
$this->assertEqual(optional_param('username', 'default_user'), 'get_user');
unset($_GET['username']);
$this->assertEqual(optional_param('username', 'default_user'), 'default_user');
}
/**
* Used by {@link optional_param()} and {@link required_param()} to
* clean the variables and/or cast to specific types, based on
* an options field.
* <code>
* $course->format = clean_param($course->format, PARAM_ALPHA);
* $selectedgrade_item = clean_param($selectedgrade_item, PARAM_CLEAN);
* </code>
*
* @uses $CFG
* @uses PARAM_CLEAN
* @uses PARAM_INT
* @uses PARAM_INTEGER
* @uses PARAM_ALPHA
* @uses PARAM_ALPHANUM
* @uses PARAM_NOTAGS
* @uses PARAM_ALPHAEXT
* @uses PARAM_BOOL
* @uses PARAM_SAFEDIR
* @uses PARAM_CLEANFILE
* @uses PARAM_FILE
* @uses PARAM_PATH
* @uses PARAM_HOST
* @uses PARAM_URL
* @uses PARAM_LOCALURL
* @uses PARAM_CLEANHTML
* @uses PARAM_SEQUENCE
* @param mixed $param the variable we are cleaning
* @param int $type expected format of param after cleaning.
* @return mixed
*/
function test_clean_param()
{
// Test unknown parameter type
// Test Raw param
$this->assertEqual(clean_param('#()*#,9789\'".,<42897></?$(*DSFMO#$*)(SDJ)($*)', PARAM_RAW),
'#()*#,9789\'".,<42897></?$(*DSFMO#$*)(SDJ)($*)');
$this->assertEqual(clean_param('#()*#,9789\'".,<42897></?$(*DSFMO#$*)(SDJ)($*)', PARAM_CLEAN),
'#()*#,9789\\\'\".,');
}
}
?>
+3 -1
View File
@@ -588,8 +588,10 @@ 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('frameifpossible', 'resource'));
$mform->setHelpButton('framepage', array('frameifpossible', get_string('frameifpossible', 'resource'), 'resource'));
$mform->setDefault('framepage', 0);
$mform->disabledIf('framepage', 'windowpopup', 'eq', 1);
$mform->setAdvanced('framepage');