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:46:41 +00:00
parent 3b73b15d37
commit facb512c06
4 changed files with 123 additions and 1 deletions
@@ -0,0 +1,6 @@
<h1>Embedding files in a frame</h1>
<p>This option will allow the file to be displayed in a frame, so that the Moodle navigation remains on the page in an upper frame.</p>
<p>Note that this option is normally not necessary for media types such as movies, audio files and flash files, as without this option turned on they will be embedded within a navigable page.</p>
<p>Note also that the use of frames can break accessibility, and so this option will be completely ignored if the user has chosen the "Screenreader" option in their profile.</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');