require_once($CFG->libdir.'/adminlib.php');
admin_externalpage_setup('bloglevelupgrade');
-$PAGE->set_generaltype('maintenance');
+$PAGE->set_pagelayout('maintenance');
$go = optional_param('go', 0, PARAM_BOOL);
$CFG->libdir = "$CFG->dirroot/lib";
$CFG->wwwroot = "http://localhost";
$CFG->httpswwwroot = $CFG->wwwroot;
-$CFG->httpsthemewww = $CFG->wwwroot;
$CFG->dataroot = str_replace('\\', '/', dirname(dirname(dirname(__FILE__))).'/moodledata');
$CFG->docroot = 'http://docs.moodle.org';
$CFG->directorypermissions = 00777;
}
$CFG->wwwroot = $wwwroot;
$CFG->httpswwwroot = $CFG->wwwroot;
-$CFG->httpsthemewww = $CFG->wwwroot;
//We need dataroot before lang download
require_capability('moodle/site:config', $systemcontext);
$PAGE->set_url($CFG->wwwroot.'/admin/generator.php');
- $PAGE->set_generaltype('form');
+ $PAGE->set_pagelayout('form');
$generator = new generator_web();
$generator->setup();
$generator->display();
$CFG->xmlstrictheaders = false;
if (!core_tables_exist()) {
- $PAGE->set_generaltype('maintenance');
+ $PAGE->set_pagelayout('maintenance');
// fake some settings
$CFG->docroot = 'http://docs.moodle.org';
}
if ($version > $CFG->version) { // upgrade
- $PAGE->set_generaltype('maintenance');
+ $PAGE->set_pagelayout('maintenance');
$a->oldversion = "$CFG->release ($CFG->version)";
$a->newversion = "$release ($version)";
}
/// Print the form.
- check_theme_arrows();
?>
<form id="assignform" method="post" action="<?php echo $baseurl . '&roleid=' . $roleid ?>"><div>
<input type="hidden" name="sesskey" value="<?php echo sesskey() ?>" />
// "themesettings" settingpage
$temp = new admin_settingpage('themesettings', get_string('themesettings', 'admin'));
$temp->add(new admin_setting_configtext('themelist', get_string('themelist', 'admin'), get_string('configthemelist','admin'), '', PARAM_NOTAGS));
+ $setting = new admin_setting_configcheckbox('themedesignermode', get_string('themedesignermode', 'admin'), get_string('configthemedesignermode', 'admin'), 0);
+ $setting->set_updatedcallback('theme_reset_all_caches');
+ $temp->add($setting);
$temp->add(new admin_setting_configcheckbox('allowuserthemes', get_string('allowuserthemes', 'admin'), get_string('configallowuserthemes', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('allowcoursethemes', get_string('allowcoursethemes', 'admin'), get_string('configallowcoursethemes', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('allowcategorythemes', get_string('allowcategorythemes', 'admin'), get_string('configallowcategorythemes', 'admin'), 0));
$ADMIN->add('themes', $temp);
$ADMIN->add('themes', new admin_externalpage('themeselector', get_string('themeselector','admin'), $CFG->wwwroot . '/theme/index.php'));
+ // settings for each theme
+ foreach (get_plugin_list('theme') as $theme => $themedir) {
+ $settings_path = "$themedir/settings.php";
+ if (file_exists($settings_path)) {
+ include($settings_path);
+ }
+ }
+
// calendar
$temp = new admin_settingpage('calendar', get_string('calendarsettings','admin'));
$temp->add(new admin_setting_special_adminseesall());
$ADMIN->add('appearance', new admin_externalpage('managetags', get_string('managetags', 'tag'), "$CFG->wwwroot/tag/manage.php"));
} // end of speedup
+
$temp = new admin_settingpage('experimentalsettings', get_string('experimentalsettings', 'admin'));
$temp->add(new admin_setting_configcheckbox('enableglobalsearch', get_string('enableglobalsearch', 'admin'), get_string('configenableglobalsearch', 'admin'), 0));
- $temp->add(new admin_setting_configcheckbox('smartpix', get_string('smartpix', 'admin'), get_string('configsmartpix', 'admin'), 0));
$item = new admin_setting_configcheckbox('enablehtmlpurifier', get_string('enablehtmlpurifier', 'admin'), get_string('configenablehtmlpurifier', 'admin'), 0);
$item->set_updatedcallback('reset_text_filters_cache');
$temp->add($item);
* Please note that is file is always loaded last - it means that you can inject entries into other categories too.
*/
-if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext)) {
-
- require_once($CFG->libdir. '/portfoliolib.php');
-
+if ($hassiteconfig) {
$ADMIN->add('modules', new admin_category('modsettings', get_string('activitymodules')));
$ADMIN->add('modsettings', new admin_page_managemods());
if ($modules = $DB->get_records('modules')) {
}
}
+
+ //== Portfolio settings ==
+ require_once($CFG->libdir. '/portfoliolib.php');
$catname = get_string('portfolios', 'portfolio');
$manage = get_string('manageportfolios', 'portfolio');
$url = "$CFG->wwwroot/$CFG->admin/portfolio.php";
$ADMIN->add('repositorysettings', new admin_externalpage('repositoryinstanceedit',
get_string('editrepositoryinstance', 'repository'), $url, 'moodle/site:config', true),
'', $url);
- foreach (repository::get_types()
- as $repositorytype)
- {
+ foreach (repository::get_types() as $repositorytype) {
//display setup page for plugins with: general options or multiple instances (e.g. has instance config)
$typeoptionnames = repository::static_function($repositorytype->get_typename(), 'get_type_option_names');
$instanceoptionnames = repository::static_function($repositorytype->get_typename(), 'get_instance_option_names');
'moodle/site:config');
}
}
+}
// Web services
$ADMIN->add('modules', new admin_category('webservicesettings', get_string('webservices', 'webservice')));
}
}
+if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext)) {
// Question type settings.
$ADMIN->add('modules', new admin_category('qtypesettings', get_string('questiontypes', 'admin')));
$ADMIN->add('qtypesettings', new admin_page_manageqtypes());
$adminroot = admin_get_root(); // need all settings
admin_externalpage_setup('upgradesettings'); // now hidden page
-$PAGE->set_generaltype('maintenance');
+$PAGE->set_pagelayout('maintenance');
// now we'll deal with the case that the admin has submitted the form with new settings
if ($data = data_submitted() and confirm_sesskey()) {
}
}
/// Print the form.
- check_theme_arrows();
-
/// display the UI
?>
<form id="assignform" method="post" action="service_users.php?id=<?php echo $id ?>"><div>
$select = html_select::make_popup_form("$CFG->httpswwwroot/login/index.php", 'lang', $langs, 'chooselang', $currlang);
$select->nothinglabel = false;
$select->set_label(get_accesshide(get_string('language')));
- $langmenu = $OUTPUT->select($select);
+ $langmenu = '<div class="langmenu">'.$OUTPUT->select($select).'</div>';
}
$loginsite = get_string("loginsite");
$PAGE->set_title("$site->fullname: $loginsite");
$PAGE->set_heading($site->fullname);
$PAGE->set_focuscontrol('idp');
- $PAGE->set_headingmenu('<div class="langmenu">'.$langmenu.'</div>');
+ $PAGE->set_headingmenu($langmenu);
echo $OUTPUT->header();
include("index_form.html");
$restorelog_file = fopen("$dest_dir/restorelog.html","a");
//Add the stylesheet
$stylesheetshtml = '';
- foreach ($CFG->stylesheets as $stylesheet) {
+/* foreach ($CFG->stylesheets as $stylesheet) {
+ //TODO: MDL-21120
$stylesheetshtml .= '<link rel="stylesheet" type="text/css" href="'.$stylesheet.'" />'."\n";
- }
+ }*/
///Accessibility: added the 'lang' attribute to $direction, used in theme <html> tag.
$languagehtml = get_html_lang($dir=true);
fwrite ($restorelog_file," \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> ");
fwrite ($restorelog_file,"<html dir=\"ltr\".$languagehtml.");
fwrite ($restorelog_file,"<head>");
- fwrite ($restorelog_file,$stylesheetshtml);
+// fwrite ($restorelog_file,$stylesheetshtml);
fwrite ($restorelog_file,"<title>".$course_header->course_shortname." Restored </title>");
fwrite ($restorelog_file,"</head><body><br/><h1>The following changes were made during the Restoration of this Course.</h1><br/><br/>");
fwrite ($restorelog_file,"The Course ShortName is now - ".$course_header->course_shortname." The FullName is now - ".$course_header->course_fullname."<br/><br/>");
if ($this->contentgenerated === true) {
return true;
}
+ $this->page->requires->yui_lib('dom');
$this->page->requires->js('lib/javascript-navigation.js');
// Navcount is used to allow us to have multiple trees although I dont' know why
// you would want to trees the same
*
* Also adds the required javascript call to the page output.
*
- * @param moodle_core_renderer $output
+ * @param core_renderer $output
* @return string HTML
*/
protected function formatted_contents($output) {
$managefeeds = new moodle_url($CFG->wwwroot . '/blocks/rss_client/managefeeds.php', $urlparams);
$PAGE->set_url('blocks/rss_client/editfeed.php', $urlparams);
-$PAGE->set_generaltype('form');
+$PAGE->set_pagelayout('form');
if ($rssid) {
$isadding = false;
$strmanage = get_string('managefeeds', 'block_rss_client');
-$PAGE->set_generaltype('form');
+$PAGE->set_pagelayout('form');
$PAGE->set_title($strmanage);
$PAGE->set_heading($strmanage);
$urlparams['returnurl'] = $returnurl;
}
$PAGE->set_url('blocks/rss_client/viewfeed.php', $urlparams);
-$PAGE->set_generaltype('popup');
+$PAGE->set_pagelayout('popup');
$rssrecord = $DB->get_record('block_rss_client', array('id' => $rssid), '*', MUST_EXIST);
if ($this->contentgenerated === true) {
return true;
}
+ $this->page->requires->yui_lib('dom');
$this->page->requires->js('lib/javascript-navigation.js');
block_settings_navigation_tree::$navcount++;
* move post instalation code from install() method into db/install.php
* completely rewrite file handling
* rewrite backup/restore
+* theme changes: move plugin styles into blocks/xxx/styles.css and use new css markers for images,
+ move all images into new blocks/xxx/pix/ directory and use new outputlib api
+
optional - no changes needed in older code:
*
}
function calendar_top_controls($type, $data) {
- global $CFG, $CALENDARDAYS, $THEME;
+ global $CFG, $CALENDARDAYS;
$content = '';
if(!isset($data['d'])) {
$data['d'] = 1;
$id = optional_param('id', 0, PARAM_INT); // course id
$categoryid = optional_param('category', 0, PARAM_INT); // course category - can be changed in edit form
- $PAGE->set_generaltype('form');
+ $PAGE->set_pagelayout('form');
/// basic access control checks
if ($id) { // editing course
?>
</select></td>
<td valign="top">
- <?php check_theme_arrows(); ?>
<p class="arrow_button">
<input name="add" id="add" type="submit" value="<?php echo ' '.$THEME->larrow.' '.get_string('add'); ?>" title="<?php print_string('add'); ?>" />
<br />
if (!empty($customicon)) {
if (substr($customicon, 0, 4) === 'mod/') {
list($modname, $iconname) = explode('/', substr($customicon, 4), 2);
- $icon = $OUTPUT->mod_icon_url(str_replace(array('.gif', '.png'), '', $customicon), $modname);
+ $icon = $OUTPUT->old_icon_url(str_replace(array('.gif', '.png'), '', $customicon), $modname);
} else {
$icon = $OUTPUT->old_icon_url(str_replace(array('.gif', '.png'), '', $customicon));
}
} else {
- $icon = $OUTPUT->mod_icon_url('icon', $mod->modname);
+ $icon = $OUTPUT->old_icon_url('icon', $mod->modname);
}
//Accessibility: for files get description via icon, this is very ugly hack!
$leftright = '';
if (has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $mod->course))) {
- if (right_to_left()) { // Exchange arrows on RTL
- $rightarrow = 't/left';
- $leftarrow = 't/right';
- } else {
- $rightarrow = 't/right';
- $leftarrow = 't/left';
+ if (right_to_left()) { // Exchange arrows on RTL
+ $rightarrow = 't/left';
+ $leftarrow = 't/right';
+ } else {
+ $rightarrow = 't/right';
+ $leftarrow = 't/left';
}
if ($indent > 0) {
$return = optional_param('return', 0, PARAM_BOOL); //return to course/view.php if false or mod/modname/view.php if true
$type = optional_param('type', '', PARAM_ALPHANUM); //TODO: hopefully will be removed in 2.0
- $PAGE->set_generaltype('form');
+ $PAGE->set_pagelayout('form');
$url = new moodle_url($CFG->wwwroot.'/course/modedit.php');
if (!empty($add)) {
$strupdatesevery = get_string("updatesevery", "moodle", COURSE_LIVELOG_REFRESH);
$PAGE->set_url('/course/report/log/live.php', Array('id'=>$course->id));
- $PAGE->set_generaltype('popup');
+ $PAGE->set_pagelayout('popup');
$PAGE->set_title("$strlivelogs ($strupdatesevery)");
$PAGE->set_periodic_refresh_delay(COURSE_LIVELOG_REFRESH);
$PAGE->set_heading($strlivelogs);
if (!empty($cm->icon)) {
$icon = '<img src="'.$OUTPUT->old_icon_url($cm->icon).'" class="activityicon" alt="" /> ';
} else {
- $icon = '<img src="'.$OUTPUT->mod_icon_url('icon', $cm->modname).'" class="activityicon" alt="" /> ';
+ $icon = '<img src="'.$OUTPUT->old_icon_url('icon', $cm->modname).'" class="activityicon" alt="" /> ';
}
$class = $cm->visible ? '' : 'class="dimmed"'; // hidden modules are dimmed
}
$PAGE->set_url('course/view.php', array('id' => $course->id));
+ $PAGE->set_pagelayout('course');
$PAGE->set_pagetype('course-view-' . $course->format);
$PAGE->set_other_editing_capability('moodle/course:manageactivities');
$PAGE->set_title(get_string('course') . ': ' . $course->fullname);
$PAGE->set_heading($course->fullname);
$PAGE->set_button($buttons);
- $PAGE->set_headingmenu(user_login_string($course, $USER));
+ //TODO: MDL-21123 this should be done in course page layout, not here with this ugly hack!
+ //$PAGE->set_headingmenu(user_login_string($course, $USER));
echo $OUTPUT->header();
if ($completion->is_enabled() && ajaxenabled()) {
* @param course current course object
*/
function print_entry($course) {
- global $CFG, $USER, $SESSION, $THEME, $OUTPUT, $PAGE;
+ global $CFG, $USER, $SESSION, $OUTPUT, $PAGE;
$strloginto = get_string('loginto', '', $course->shortname);
$strcourses = get_string('courses');
* @param course the current course, as an object
*/
function check_entry($form, $course) {
- global $CFG, $USER, $SESSION, $THEME;
+ global $CFG, $USER, $SESSION;
if (empty($form->password)) {
$form->password = '';
/// Print header
print_grade_page_head($COURSE->id, 'outcome', 'course');
-check_theme_arrows();
require('course_form.html');
echo $OUTPUT->footer();
$PAGE->requires->yui_lib('container');
$PAGE->requires->yui_lib('animation');
$PAGE->requires->js('grade/edit/tree/functions.js');
-$PAGE->requires->css('/grade/edit/tree/tree.css');
$courseid = required_param('id', PARAM_INT);
$action = optional_param('action', 0, PARAM_ALPHA);
* @param boolean $return Whether to return (true) or echo (false) the HTML generated by this function
* @param string $bodytags Additional attributes that will be added to the <body> tag
* @param string $buttons Additional buttons to display on the page
- * @param array $extracss An array of additional stylesheets to load (relative paths)
*
* @return string HTML code or nothing if $return == false
*/
function print_grade_page_head($courseid, $active_type, $active_plugin=null,
$heading = false, $return=false,
- $buttons=false, $extracss=array()) {
+ $buttons=false) {
global $CFG, $COURSE, $OUTPUT, $PAGE;
$strgrades = get_string('grades');
$plugin_info = grade_get_plugin_info($courseid, $active_type, $active_plugin);
$first_link = $CFG->wwwroot.'/grade/index.php?id='.$COURSE->id;
}
- if ($active_type == 'preferences') {
- $CFG->stylesheets[] = $CFG->wwwroot . '/grade/report/styles.css';
- }
-
- foreach ($extracss as $css_url) {
- $CFG->stylesheets[] = $css_url;
- }
$PAGE->navbar->add($strgrades, $first_link);
$toggle_type = optional_param('toggle_type', 0, PARAM_ALPHANUM);
$PAGE->set_url('grade/report/grader/index.php', compact('courseid', 'page', 'perpageurl', 'edit', 'sortitemid'));
-$PAGE->requires->css('lib/yui/container/assets/skins/sam/container.css');
/// basic access checks
if (!$course = $DB->get_record('course', array('id' => $courseid))) {
if ($bounded > $finalgrade) {
$errorstr = 'lessthanmin';
} else if ($bounded < $finalgrade) {
- $errorstr = 'morethanmax';
- }
+ $errorstr = 'morethanmax';
+ }
}
if ($errorstr) {
$user = $DB->get_record('user', array('id' => $userid), 'id, firstname, lastname');
+++ /dev/null
-#content #siteconfiglink {
- text-align: right;
-}
-
</select></td>
<td valign="top">
- <?php check_theme_arrows(); ?>
<p class="arrow_button">
<input name="add" id="add" type="submit" value="<?php echo ' '.$THEME->larrow.' '.get_string('add'); ?>" title="<?php print_string('add'); ?>" />
<br />
$PAGE->set_heading($course->fullname);
$PAGE->set_headingmenu(user_login_string($course, $USER));
echo $OUTPUT->header();
-check_theme_arrows();
?>
<div id="addmembersform">
}
// Do the main output.
-$PAGE->set_generaltype('popup');
+$PAGE->set_pagelayout('popup');
$PAGE->set_title($title);
echo $OUTPUT->header();
echo $OUTPUT->box_start();
$select = html_select::make_popup_form($CFG->wwwroot .'/index.php', 'lang', $langs, 'chooselang', $currlang);
$select->nothinglabel = false;
$select->set_label(get_accesshide(get_string('language')));
- $langmenu = $OUTPUT->select($select);
+ //TODO: MDL-21123
+ $langmenu = '<div class="langmenu">'.$OUTPUT->select($select).'</div>';
}
$PAGE->set_other_editing_capability('moodle/course:manageactivities');
$PAGE->set_url('');
$PAGE->set_docs_path('');
- $PAGE->set_generaltype('home');
+ $PAGE->set_pagelayout('home');
$editing = $PAGE->user_is_editing();
$PAGE->set_title($SITE->fullname);
$PAGE->set_heading($SITE->fullname);
- $PAGE->set_headingmenu(user_login_string($SITE) . $langmenu);
- echo $OUTPUT->header();
+ $PAGE->set_headingmenu($langmenu);
+ echo $OUTPUT->header($langmenu);
/// Print Section
if ($SITE->numsections > 0) {
$CFG->dirroot = str_replace('\\', '/', dirname(__FILE__)); // Fix for win32
$CFG->libdir = "$CFG->dirroot/lib";
$CFG->wwwroot = install_guess_wwwroot(); // can not be changed - ppl must use the real address when installing
-$CFG->themedir = $CFG->dirroot.'/theme';
-$CFG->themewww = $CFG->wwwroot.'/theme';
$CFG->httpswwwroot = $CFG->wwwroot;
-$CFG->httpsthemewww = $CFG->wwwroot;
$CFG->dataroot = $config->dataroot;
$CFG->admin = $config->admin;
$CFG->docroot = 'http://docs.moodle.org';
}
$PAGE->set_url('iplookup/index.php', array('id'=>$ip, 'user'=>$user));
-$PAGE->set_generaltype('popup');
+$PAGE->set_pagelayout('popup');
$info = array($ip);
$note = array();
$string['configsupportname'] = 'This is the name of a person or other entity offering general help via the support email or web address.';
$string['configsupportpage'] = 'This web address will be published to users of this site as the one to go to when they need general help (for example, when new users create their own accounts). If this address is left blank then no link will be supplied.';
$string['configteacherassignteachers'] = 'Should ordinary teachers be allowed to assign other teachers within courses they teach? If \'No\', then only course creators and admins can assign teachers.';
+$string['configthemedesignermode'] = 'All theme images and CSS are cached in browsers and in server for a very long time. Turn on this setting if you are developing or tweaking themes. This setting is also suitable for developers.
+You can invalidate all theme caches manually from the theme selection page too. WARNING: enabling of theme designer mode affects the server performance severly!';
$string['configthemelist'] = 'Leave this blank to allow any valid theme to be used. If you want to shorten the theme menu, you can specify a comma-separated list of names here (Don\'t use spaces!).
For example: standard,orangewhite.';
$string['configtimezone'] = 'You can set the default timezone here. This is the only the DEFAULT timezone for displaying dates - each user can override this by setting their own in their profile. \"Server time\" here will make Moodle default to the server\'s operating system setting, but \"Server time\" in the user profile will make the user default to this timezone setting. Cronjobs that depend on a time of day to run will use this timezone.';
$string['tablesnosave'] = 'Changes in tables above are saved automatically.';
$string['tabselectedtofront'] = 'On tables with tabs, should the row with the currently selected tab be placed at the front';
$string['tabselectedtofronttext'] = 'Bring selected tab row to front';
+$string['themedesignermode'] = 'Theme designer mode';
$string['themelist'] = 'Theme list';
+$string['themeresetcaches'] = 'Invalidate theme caches';
$string['themeselector'] = 'Theme Selector';
$string['themesettings'] = 'Theme settings';
$string['therewereerrors'] = 'There were errors in your data';
-<?php // $Id$
- // theme_standard.php - created with Moodle 2.0 dev
+<?php
+$string['pluginname'] = "Standard";
$string['region-side-pre'] = 'Left';
$string['region-side-post'] = 'Right';
$adminroot = admin_get_root(false, false); // settings not required for external pages
$extpage = $adminroot->locate($section);
+ if ($section === 'upgradesettings') {
+ $PAGE->set_pagelayout('maintenance');
+ } else {
+ $PAGE->set_pagelayout('admin');
+ }
+
$PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
// $PAGE->set_extra_button($extrabutton); TODO
* @param string $focus focus element
*/
function admin_externalpage_print_header($focus='') {
- global $CFG, $PAGE, $SITE, $THEME, $OUTPUT;
+ global $CFG, $PAGE, $SITE, $OUTPUT;
if (!is_string($focus)) {
$focus = ''; // BC compatibility, there used to be adminroot parameter
* @param page_requirements_manager $requires The page_requirements_manager to initialise.
*/
function setup_core_javascript(page_requirements_manager $requires) {
- global $CFG, $OUTPUT;
+ global $CFG, $OUTPUT, $PAGE;
// JavaScript should always work with $CFG->httpswwwroot rather than $CFG->wwwroot.
// Otherwise, in some situations, users will get warnings about insecure content
$config = array(
'wwwroot' => $CFG->httpswwwroot, // Yes, really. See above.
'sesskey' => sesskey(),
- 'loadingicon' => $OUTPUT->old_icon_url('i/loading_small')
+ 'loadingicon' => $OUTPUT->old_icon_url('i/loading_small', 'moodle', false),
+ 'themerev' => theme_get_revision(),
+ 'theme' => $PAGE->theme->name,
);
if (debugging('', DEBUG_DEVELOPER)) {
$config['developerdebug'] = true;
*
* Typical useage would be
* <pre>
- * $PAGE->requires->css('mod/mymod/styles.css');
+ * $PAGE->requires->css('mod/mymod/userstyles.php?id='.$id); // not overriddable via themes!
* $PAGE->requires->js('mod/mymod/script.js');
* $PAGE->requires->js('mod/mymod/small_but_urgent.js')->in_head();
* $PAGE->requires->js_function_call('init_mymod', array($data))->on_dom_ready();
* performance. Optional dependencies are not loaded automatically - if you want
* them you will need to load them first with other calls to this method.
*
- * If the YUI library you ask for requires one or more CSS files, and if
- * <head> has already been printed, then an exception will be thrown.
- * Therefore, you are strongly advised to request all the YUI libraries you
- * will need before output is started.
- *
* Even if a particular library is requested more than once (perhaps as a dependancy
* of other libraries) it will only be linked to once.
*
*
* This class (with the help of {@link ajax_resolve_yui_lib()}) knows about the
* dependancies between the different YUI libraries, and will include all the
- * other libraries required by the one you ask for. It also knows which YUI
- * libraries require css files. If the library you ask for requires CSS files,
- * then you should ask for it before <head> is output, or an exception will
- * be thrown.
+ * other libraries required by the one you ask for.
*
* By default JavaScript files are included at the end of the HTML.
* This is recommended practice because it means that the web browser will only
parent::__construct($manager, '');
$this->when = page_requirements_manager::WHEN_AT_END;
- list($jsurls, $cssurls) = ajax_resolve_yui_lib($libname);
+ $jsurls = ajax_resolve_yui_lib($libname);
foreach ($jsurls as $jsurl) {
$this->jss[] = $manager->js($jsurl, true);
}
- foreach ($cssurls as $cssurl) {
- // this might be a bit problematic because it requires yui to be
- // requested before print_header() - this was not required in 1.9.x
- $manager->css($cssurl, true);
- }
}
public function get_html() {
/**
- * Given the name of a YUI library, return a list of the .js and .css files that
- * it requries.
+ * Given the name of a YUI library, return a list of the .js that it requries.
*
* This method takes note of the $CFG->useexternalyui setting.
*
* the -debug version of the YUI files, otherwise it will return links to the -min versions.
*
* @param string $libname the name of a YUI library, for example 'autocomplete'.
- * @return array with two elementes. The first is an array of the JavaScript URLs
- * that must be loaded to make this library work, in the order they should be
- * loaded. The second element is a (possibly empty) list of CSS files that
- * need to be loaded.
+ * @return an array of the JavaScript URLs that must be loaded to make this library work,
+ * in the order they should be loaded.
*/
function ajax_resolve_yui_lib($libname) {
global $CFG;
// because another part of the code may later ask for other bits. It is easier, and
// not very inefficient, just to always use (and get browsers to cache) the combined file.
static $translatelist = array(
- 'yahoo' => 'yahoo-dom-event',
- 'animation' => array('yahoo-dom-event', 'animation'),
- 'autocomplete' => array(
- 'js' => array('yahoo-dom-event', 'datasource', 'autocomplete'),
- 'css' => array('autocomplete/assets/skins/sam/autocomplete.css')),
- 'button' => array(
- 'js' => array('yahoo-dom-event', 'element', 'button'),
- 'css' => array('button/assets/skins/sam/button.css')),
- 'calendar' => array(
- 'js' => array('yahoo-dom-event', 'calendar'),
- 'css' => array('calendar/assets/skins/sam/calendar.css')),
- 'carousel' => array(
- 'js' => array('yahoo-dom-event', 'element', 'carousel'),
- 'css' => array('carousel/assets/skins/sam/carousel.css')),
- 'charts' => array('yahoo-dom-event', 'element', 'datasource', 'json', 'charts'),
- 'colorpicker' => array(
- 'js' => array('utilities', 'slider', 'colorpicker'),
- 'css' => array('colorpicker/assets/skins/sam/colorpicker.css')),
- 'connection' => array('yahoo-dom-event', 'connection'),
- 'container' => array(
- 'js' => array('yahoo-dom-event', 'container'),
- 'css' => array('container/assets/skins/sam/container.css')),
- 'cookie' => array('yahoo-dom-event', 'cookie'),
- 'datasource' => array('yahoo-dom-event', 'datasource'),
- 'datatable' => array(
- 'js' => array('yahoo-dom-event', 'element', 'datasource', 'datatable'),
- 'css' => array('datatable/assets/skins/sam/datatable.css')),
- 'dom' => 'yahoo-dom-event',
- 'dom-event' => 'yahoo-dom-event',
- 'dragdrop' => array('yahoo-dom-event', 'dragdrop'),
- 'editor' => array(
- 'js' => array('yahoo-dom-event', 'element', 'container', 'menu', 'button', 'editor'),
- 'css' => array('assets/skins/sam/skin.css')),
- 'element' => array('yahoo-dom-event', 'element'),
- 'event' => 'yahoo-dom-event',
- 'get' => array('yahoo-dom-event', 'get'),
- 'history' => array('yahoo-dom-event', 'history'),
- 'imagecropper' => array(
- 'js' => array('yahoo-dom-event', 'dragdrop', 'element', 'resize', 'imagecropper'),
- 'css' => array('assets/skins/sam/resize.css', 'assets/skins/sam/imagecropper.css')),
- 'imageloader' => array('yahoo-dom-event', 'imageloader'),
- 'json' => array('yahoo-dom-event', 'json'),
- 'layout' => array(
- 'js' => array('yahoo-dom-event', 'dragdrop', 'element', 'layout'),
- 'css' => array('reset-fonts-grids/reset-fonts-grids.css', 'assets/skins/sam/layout.css')),
- 'logger' => array(
- 'js' => array('yahoo-dom-event', 'logger'),
- 'css' => array('logger/assets/skins/sam/logger.css')),
- 'menu' => array(
- 'js' => array('yahoo-dom-event', 'container', 'menu'),
- 'css' => array('menu/assets/skins/sam/menu.css')),
- 'paginator' => array(
- 'js' => array('yahoo-dom-event', 'element', 'paginator'),
- 'css' => array('paginator/assets/skins/sam/paginator.css')),
- 'profiler' => array('yahoo-dom-event', 'profiler'),
+ 'yahoo' => array('yahoo-dom-event'),
+ 'animation' => array('yahoo-dom-event', 'animation'),
+ 'autocomplete' => array('yahoo-dom-event', 'datasource', 'autocomplete'),
+ 'button' => array('yahoo-dom-event', 'element', 'button'),
+ 'calendar' => array('yahoo-dom-event', 'calendar'),
+ 'carousel' => array('yahoo-dom-event', 'element', 'carousel'),
+ 'charts' => array('yahoo-dom-event', 'element', 'datasource', 'json', 'charts'),
+ 'colorpicker' => array('utilities', 'slider', 'colorpicker'),
+ 'connection' => array('yahoo-dom-event', 'connection'),
+ 'container' => array('yahoo-dom-event', 'container'),
+ 'cookie' => array('yahoo-dom-event', 'cookie'),
+ 'datasource' => array('yahoo-dom-event', 'datasource'),
+ 'datatable' => array('yahoo-dom-event', 'element', 'datasource', 'datatable'),
+ 'dom' => array('yahoo-dom-event'),
+ 'dom-event' => array('yahoo-dom-event'),
+ 'dragdrop' => array('yahoo-dom-event', 'dragdrop'),
+ 'editor' => array('yahoo-dom-event', 'element', 'container', 'menu', 'button', 'editor'),
+ 'element' => array('yahoo-dom-event', 'element'),
+ 'event' => array('yahoo-dom-event'),
+ 'get' => array('yahoo-dom-event', 'get'),
+ 'history' => array('yahoo-dom-event', 'history'),
+ 'imagecropper' => array('yahoo-dom-event', 'dragdrop', 'element', 'resize', 'imagecropper'),
+ 'imageloader' => array('yahoo-dom-event', 'imageloader'),
+ 'json' => array('yahoo-dom-event', 'json'),
+ 'layout' => array('yahoo-dom-event', 'dragdrop', 'element', 'layout'),
+ 'logger' => array('yahoo-dom-event', 'logger'),
+ 'menu' => array('yahoo-dom-event', 'container', 'menu'),
+ 'paginator' => array('yahoo-dom-event', 'element', 'paginator'),
+ 'profiler' => array('yahoo-dom-event', 'profiler'),
'profilerviewer' => array('yuiloader-dom-event', 'element', 'profiler', 'profilerviewer'),
- 'resize' => array(
- 'js' => array('yahoo-dom-event', 'dragdrop', 'element', 'resize'),
- 'css' => array('assets/skins/sam/resize.css')),
- 'selector' => array('yahoo-dom-event', 'selector'),
- 'simpleeditor' => array(
- 'js' => array('yahoo-dom-event', 'element', 'container', 'simpleeditor'),
- 'css' => array('assets/skins/sam/skin.css')),
- 'slider' => array('yahoo-dom-event', 'gragdrop', 'slider'),
- 'stylesheet' => array('yahoo-dom-event', 'stylesheet'),
- 'tabview' => array(
- 'js' => array('yahoo-dom-event', 'element', 'tabview'),
- 'css' => array('assets/skins/sam/skin.css')),
- 'treeview' => array(
- 'js' => array('yahoo-dom-event', 'treeview'),
- 'css' => array('treeview/assets/skins/sam/treeview.css')),
- 'uploader' => array('yahoo-dom-event', 'element', 'uploader'),
- 'utilities' => array('yahoo-dom-event', 'connection', 'animation', 'dragdrop', 'element', 'get'),
- 'yuiloader' => 'yuiloader',
- 'yuitest' => array(
- 'js' => array('yahoo-dom-event', 'logger', 'yuitest'),
- 'css' => array('logger/assets/logger.css', 'yuitest/assets/testlogger.css')),
+ 'resize' => array('yahoo-dom-event', 'dragdrop', 'element', 'resize'),
+ 'selector' => array('yahoo-dom-event', 'selector'),
+ 'simpleeditor' => array('yahoo-dom-event', 'element', 'container', 'simpleeditor'),
+ 'slider' => array('yahoo-dom-event', 'gragdrop', 'slider'),
+ 'stylesheet' => array('yahoo-dom-event', 'stylesheet'),
+ 'tabview' => array('yahoo-dom-event', 'element', 'tabview'),
+ 'treeview' => array('yahoo-dom-event', 'treeview'),
+ 'uploader' => array('yahoo-dom-event', 'element', 'uploader'),
+ 'utilities' => array('yahoo-dom-event', 'connection', 'animation', 'dragdrop', 'element', 'get'),
+ 'yuiloader' => array('yuiloader'),
+ 'yuitest' => array('yahoo-dom-event', 'logger', 'yuitest'),
);
if (!isset($translatelist[$libname])) {
throw new coding_exception('Unknown YUI library ' . $libname);
}
- $data = $translatelist[$libname];
- if (!is_array($data)) {
- $jsnames = array($data);
- $cssfiles = array();
- } else if (isset($data['js']) && isset($data['css'])) {
- $jsnames = $data['js'];
- $cssfiles = $data['css'];
- } else {
- $jsnames = $data;
- $cssfiles = array();
- }
+ $jsnames = $translatelist[$libname];
$debugging = debugging('', DEBUG_DEVELOPER);
if ($debugging) {
}
}
- $cssurls = array();
- foreach ($cssfiles as $css) {
- $cssurls[] = $libpath . $css;
- }
-
- return array($jsurls, $cssurls);
+ return $jsurls;
}
/**
$this->assertTrue($this->requires->is_top_of_body_done());
}
- public function test_requiring_css() {
- global $CFG;
- $cssfile = 'theme/standard/styles_layout.css'; // Just needs to be a CSS file that exists.
- $this->requires->css($cssfile);
-
- $html = $this->requires->get_head_code();
- $this->assertContains($html, $CFG->httpswwwroot . '/' . $cssfile);
- }
-
- public function test_nonexistant_css_throws_exception() {
- $cssfile = 'css/file/that/does/not/exist.css';
-
- $this->expectException();
- $this->requires->css($cssfile);
- }
-
public function test_requiring_js() {
global $CFG;
$jsfile = 'lib/javascript-static.js'; // Just needs to be a JS file that exists.
}
public function test_nonexistant_js_throws_exception() {
- $cssfile = 'js/file/that/does/not/exist.js';
+ $jsfile = 'js/file/that/does/not/exist.js';
$this->expectException();
- $this->requires->js($cssfile);
+ $this->requires->js($jsfile);
}
public function test_requiring_skip_link() {
* @return array the internal names of the regions on this page where block may appear.
*/
public function get_regions() {
- if (is_null($this->defaultregion)) {
+ if (is_null($this->defaultregion)) {
$this->page->initialise_theme_and_output();
- }
+ }
return array_keys($this->regions);
}
* output the blocks anyway, so we are not doing wasted effort.)
*
* @param string $region a block region that exists on this page.
- * @param object $output a moodle_core_renderer. normally the global $OUTPUT.
+ * @param object $output a core_renderer. normally the global $OUTPUT.
* @return boolean Whether there is anything in this region.
*/
public function region_has_content($region, $output) {
* Return an array of content objects from a set of block instances
*
* @param array $instances An array of block instances
- * @param moodle_renderer_base The renderer to use.
+ * @param renderer_base The renderer to use.
* @param string $region the region name.
* @return array An array of block_content (and possibly block_move_target) objects.
*/
}
$editpage = new moodle_page();
- $editpage->set_generaltype('form');
+ $editpage->set_pagelayout('form');
$editpage->set_course($this->page->course);
$editpage->set_context($block->context);
$editurlbase = str_replace($CFG->wwwroot . '/', '', $this->page->url->out(true));
return;
$blockmanager = blocks_get_by_page($page);
- if(empty($blockmanager)) {
+ if (empty($blockmanager)) {
return;
}
- if(($pageformat = $page->pagetype) == NULL) {
+ if (($pageformat = $page->pagetype) == NULL) {
return;
}
--- /dev/null
+<?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle 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 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle 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.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Minimalistic library, usable even when no other moodle libs are loaded.
+ *
+ * The only library that gets loaded if you define ABORT_AFTER_CONFIG
+ * before including main config.php. You can resume normal script operation
+ * if you define ABORT_AFTER_CONFIG_CANCEL and require the setup.php
+ *
+ * @package moodlecore
+ * @copyright 2009 petr Skoda (skodak)
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+/**
+ * Minimalistic parameter validation function.
+ * Can not use optional param because moodlelib.php is not loaded yet
+ * @param string $name
+ * @param mixed $default
+ * @param string $type
+ * @return mixed
+ */
+function min_optional_param($name, $default, $type) {
+ $value = $default;
+ if (isset($_GET[$name])) {
+ $value = $_GET[$name];
+
+ } else if (isset($_GET['amp;'.$name])) {
+ // very, very, very ugly hack, unforunately $OUTPUT->old_icon_url() is not used properly in javascript code :-(
+ $value = $_GET['amp;'.$name];
+ }
+ switch($type) {
+ case 'INT': $value = (int)$value; break;
+ case 'SAFEDIR': $value = preg_replace('/[^a-zA-Z0-9_-]/', '', $value); break;
+ case 'SAFEPATH': $value = preg_replace('/[^a-zA-Z0-9\/_-]/', '', $value); break;
+ default: die("Coding error: incorrent parameter type specified ($type).");
+ }
+ return $value;
+}
+
'enrol_plugins_enabled' => 'manual',
'style' => 'default',
'template' => 'default',
- 'theme' => 'standardwhite',
+ 'theme' => 'standard', //TODO: MDL-20204 replace with some new default theme when implemented
'filter_multilang_converted' => 1,
'siteidentifier' => random_string(32).get_host_from_url($CFG->wwwroot),
'backup_version' => 2008111700,
set_role_contextlevels($guestrole, get_default_contextlevels('guest'));
set_role_contextlevels($userrole, get_default_contextlevels('user'));
+ // init themes
+ set_config('themerev', 1);
}
// before any action that may take longer time to finish.
function xmldb_main_upgrade($oldversion) {
- global $CFG, $THEME, $USER, $DB, $OUTPUT;
+ global $CFG, $USER, $DB, $OUTPUT;
require_once($CFG->libdir.'/db/upgradelib.php'); // Core Upgrade-related functions
* @return void, always throws moodle_exception
*/
function error($message, $link='') {
- throw new moodle_exception('notlocalisederrormessage', 'error', $link, $message, 'error() is a deprecated function, please call print_error() instead of error()');
+ throw new moodle_exception('notlocalisederrormessage', 'error', $link, $message, 'error() is a deprecated function, please call print_error() instead of error()');
}
return make_upload_directory($courseid .'/'. $CFG->moddata);
}
-
-/**
- * This is a slight variatoin on the standard_renderer_factory that uses
- * custom_corners_core_renderer instead of moodle_core_renderer.
- *
- * This generates the slightly different HTML that the custom_corners theme expects.
- *
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- * @deprecated Required to make the old $THEME->customcorners setting work.
- */
-class custom_corners_renderer_factory extends standard_renderer_factory {
- public function __construct($theme) {
- parent::__construct($theme);
- global $CFG;
- require_once($CFG->themedir . '/custom_corners/renderers.php');
- }
- /* Implement the subclass method. */
- public function get_renderer($module, $page, $subtype=null) {
- if ($module == 'core') {
- return new custom_corners_core_renderer($page);
- }
- return parent::get_renderer($module, $page, $subtype);
- }
-}
-
-
/**
* Used to be used for setting up the theme. No longer used by core code, and
* should not have been used elsewhere.
return $PAGE->theme->name;
}
-/**
- * This used to be the thing that theme styles.php files used to do all the work.
- * This is now handled differently. You should copy theme/standard/styes.php
- * into your theme.
- *
- * @deprecated
- * @param int $lastmodified Always gets set to now
- * @param int $lifetime The max-age header setting (seconds) defaults to 300
- * @param string $themename The name of the theme to use (optional) defaults to current theme
- * @param string $forceconfig Force a particular theme config (optional)
- * @param string $lang Load styles for the specified language (optional)
- */
-function style_sheet_setup($lastmodified=0, $lifetime=300, $themename='', $forceconfig='', $lang='') {
- global $CFG, $PAGE, $THEME, $showdeprecatedstylesheetsetupwarning;
- $showdeprecatedstylesheetsetupwarning = true;
- include($CFG->dirroot . '/theme/styles.php');
- exit;
-}
-
/**
* @todo Remove this deprecated function when no longer used
* @deprecated since Moodle 2.0 - use $PAGE->pagetype instead of the .
function print_heading_block($heading, $class='', $return=false) {
global $OUTPUT;
debugging('print_heading_with_block() has been deprecated. Please change your code to use $OUTPUT->heading().');
- $output = $OUTPUT->heading($heading, 2, 'headingblock header ' . moodle_renderer_base::prepare_classes($class));
+ $output = $OUTPUT->heading($heading, 2, 'headingblock header ' . renderer_base::prepare_classes($class));
if ($return) {
return $output;
} else {
}
}
+/**
+ * Deprecated, now handled automatically in themes
+ */
+function check_theme_arrows() {
+ debugging('check_theme_arrows() has been deprecated, do not use it anymore, it is now automatic.');
+}
+
/**
* Simple function to end a container (see above)
*
// TODO check arguments.
if (is_string($course)) {
debugging("Magic values like 'home', 'empty' passed to print_footer no longer have any effect. " .
- 'To achieve a similar effect, call $PAGE->set_generaltype before you call print_header.', DEBUG_DEVELOPER);
+ 'To achieve a similar effect, call $PAGE->set_pagelayout before you call print_header.', DEBUG_DEVELOPER);
} else if (!empty($course->id) && $course->id != $PAGE->course->id) {
throw new coding_exception('The $course object you passed to print_footer does not match $PAGE->course.');
}
* @return string
*/
function navmenu($course, $cm=NULL, $targetwindow='self') {
- global $CFG, $THEME, $USER, $DB, $OUTPUT;
-
// This function has been deprecated with the creation of the global nav in
// moodle 2.0
/**
* Call this function to hide an event in the calendar table
* the event will be identified by the id field of the $event object.
- *
+ *
* @param object $event An object representing an event from the calendar table. The event will be identified by the id field.
* @return true
*/
$directionality = get_string('thisdirection');
$strtime = get_string('strftimetime');
$strdate = get_string('strftimedaydate');
- $lang = str_replace('_utf8', '', current_language()); // use more standard language codes
- $contentcss = $CFG->themewww.'/'.current_theme().'/styles.php'; // should be customizable
+ $lang = str_replace('_utf8', '', current_language()); // use more standard language codes
+ $contentcss = $PAGE->theme->editor_css_url()->out(false, array(), false);
$context = empty($options['context']) ? get_context_instance(CONTEXT_SYSTEM) : $options['context'];
if (!empty($options['legacy'])) {
global $CFG;
$stylesheetshtml = '';
- foreach ($CFG->stylesheets as $stylesheet) {
+/* foreach ($CFG->stylesheets as $stylesheet) {
+ //TODO: MDL-21120
$stylesheetshtml .= '<link rel="stylesheet" type="text/css" href="'.$stylesheet.'" />'."\n";
- }
+ }*/
$ufo = '';
if (filter_is_enabled('filter/mediaplugin')) {
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
echo '<html dir="'.(right_to_left() ? 'rtl' : 'ltr').'">
<head>
- <link rel="shortcut icon" href="theme/standard/favicon.ico" />
+ <link rel="shortcut icon" href="theme/standard/pix/favicon.ico" />
<link rel="stylesheet" type="text/css" href="'.$CFG->wwwroot.'/install.php?css=1" />
<title>'.get_string('installation','install').'</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
echo '<html dir="'.(right_to_left() ? 'rtl' : 'ltr').'">
<head>
- <link rel="shortcut icon" href="theme/standard/favicon.ico" />';
+ <link rel="shortcut icon" href="theme/standard/pix/favicon.ico" />';
$sheets = array('styles_layout', 'styles_fonts', 'styles_color', 'styles_moz');
$csss = array();
var moveicon = moveto[i].getElementsByTagName('img');
if (moveicon.length>0) {
for (var j=0;j<moveicon.length;j++) {
- moveicon[j].src = moveicon[j].src.replace(/movetosidetab/, 'movetoblock');
+ moveicon[j].src = get_image_url('t/movetoblock', 'moodle');
moveicon[j].setAttribute('alt', this.toggleblockdisplay);
moveicon[j].setAttribute('title', this.toggleblockdisplay);
}
var moveicon = moveto[i].getElementsByTagName('img');
if (moveicon.length>0) {
for (var j=0;j<moveicon.length;j++) {
- moveicon[j].src = moveicon[j].src.replace(/movetoblock/, 'movetosidetab');
+ moveicon[j].src = get_image_url('t/movetosidetab', 'moodle');
moveicon[j].setAttribute('alt', this.togglesidetabdisplay);
moveicon[j].setAttribute('title', this.togglesidetabdisplay);
}
var navbarcontrol = document.createElement('div');
YAHOO.util.Dom.addClass(navbarcontrol, 'controls');
var removeall = document.createElement('img');
- removeall.setAttribute('src', moodle_cfg.wwwroot+'/pix/t/movetoblock.png');
+ removeall.setAttribute('src', get_image_url('t/movetoblock', 'moodle'));
removeall.setAttribute('title', mstr.moodle.moveallsidetabstoblock);
removeall.setAttribute('alt', mstr.moodle.moveallsidetabstoblock);
navbarcontrol.appendChild(removeall);
function frame_breakout(e, properties) {
this.setAttribute('target', properties.framename);
}
+
+function get_image_url(imagename, component) {
+ var url = moodle_cfg.wwwroot + '/theme/image.php?theme=' + moodle_cfg.theme + '&image=' + imagename;
+
+ if (moodle_cfg.themerev > 0) {
+ url = url + '&rev=' + moodle_cfg.themerev;
+ }
+
+ if (component != '' && component != 'moodle' && component != 'core') {
+ url = url + '&component=' + component;
+ }
+
+ return url;
+}
\ No newline at end of file
$themelist = array_keys(get_plugin_list("theme"));
}
- foreach ($themelist as $key => $theme) {
- if (!file_exists("$CFG->themedir/$theme/config.php")) { // bad folder
- continue;
- }
- $THEME = new object(); // Note this is not the global one!! :-)
- include("$CFG->themedir/$theme/config.php");
- if (!isset($THEME->sheets)) { // Not a valid 1.5 theme
- continue;
- }
- $themes[$theme] = $theme;
+ foreach ($themelist as $key => $themename) {
+ $theme = theme_config::load($themename);
+ $themes[$themename] = $theme;
}
asort($themes);
if ($component == 'moodle') {
$path = ($fullpaths ? $CFG->libdir : 'lib');
} else {
- list($type, $plugin) = explode('_', $component, 2);
+ if (strpos($component, '_') === false) {
+ $type = 'mod';
+ $plugin = $component;
+ } else {
+ list($type, $plugin) = explode('_', $component, 2);
+ }
$path = get_plugin_directory($type, $plugin, $fullpaths);
}
'repository' => 'repository',
'portfolio' => 'portfolio',
'qtype' => 'question/type',
- 'qformat' => 'question/format');
+ 'qformat' => 'question/format',
+ 'theme' => 'theme'); // this is a bit hacky, themes may be in dataroot too
$mods = get_plugin_list('mod');
foreach ($mods as $mod => $moddir) {
}
}
- // do not include themes if in non-standard location
- if (empty($CFG->themedir) or $CFG->themedir === $CFG->dirroot.'/theme') {
- $info['theme'] = 'theme';
- }
-
- // local is always last
+ // local is always last!
$info['local'] = 'local';
$fullinfo = array();
foreach ($info as $type => $dir) {
$fullinfo[$type] = $CFG->dirroot.'/'.$dir;
}
- $fullinfo['theme'] = $CFG->themedir;
}
return ($fullpaths ? $fullinfo : $info);
/**
* Simplified version of get_list_of_plugins()
* @param string $plugintype type of plugin
- * @param bool $fullpaths false means relative paths from dirroot
* @return array name=>fulllocation pairs of plugins of given type
*/
-function get_plugin_list($plugintype, $fullpaths=true) {
+function get_plugin_list($plugintype) {
global $CFG;
$ignored = array('CVS', '_vti_cnf', 'simpletest', 'db');
$plugintype = 'mod';
}
+ $fulldirs = array();
+
if ($plugintype === 'mod') {
// mod is an exception because we have to call this function from get_plugin_types()
- $fulldir = $CFG->dirroot.'/mod';
- $dir = $fullpaths ? $fulldir : 'mod';
+ $fulldirs[] = $CFG->dirroot.'/mod';
+
+ } else if ($plugintype === 'theme') {
+ // themes are an exception because they may be stored also in dataroot
+ $fulldirs[] = $CFG->dirroot.'/theme';
} else {
- $fulltypes = get_plugin_types(true);
- $types = get_plugin_types($fullpaths);
+ $types = get_plugin_types(true);
if (!array_key_exists($plugintype, $types)) {
return array();
}
- $fulldir = $fulltypes[$plugintype];
- $dir = $types[$plugintype];
+ $fulldir = $types[$plugintype];
if (!file_exists($fulldir)) {
return array();
}
+ $fulldirs[] = $fulldir;
}
$result = array();
- $items = new DirectoryIterator($fulldir);
- foreach ($items as $item) {
- if ($item->isDot() or !$item->isDir()) {
- continue;
- }
- $pluginname = $item->getFilename();
- if (in_array($pluginname, $ignored)) {
+ //TODO: MDL-20799 add themedir support
+
+ foreach ($fulldirs as $fulldir) {
+ if (!is_dir($fulldir)) {
continue;
}
- if ($pluginname !== clean_param($pluginname, PARAM_SAFEDIR)) {
- // better ignore plugins with problematic names here
- continue;
+ $items = new DirectoryIterator($fulldir);
+ foreach ($items as $item) {
+ if ($item->isDot() or !$item->isDir()) {
+ continue;
+ }
+ $pluginname = $item->getFilename();
+ if (in_array($pluginname, $ignored)) {
+ continue;
+ }
+ if ($pluginname !== clean_param($pluginname, PARAM_SAFEDIR)) {
+ // better ignore plugins with problematic names here
+ continue;
+ }
+ $result[$pluginname] = $fulldir.'/'.$pluginname;
+ unset($item);
}
- $result[$pluginname] = $dir.'/'.$pluginname;
+ unset($items);
}
ksort($result);
$plugins = array();
if (empty($basedir)) {
- // This switch allows us to use the appropiate theme directory - and potentialy alternatives for other plugins
- switch ($directory) {
- case "theme":
- $basedir = $CFG->themedir;
- break;
- default:
- $basedir = $CFG->dirroot .'/'. $directory;
- }
+ // TODO: MDL-20799 megre theme with themedir if defined
+ $basedir = $CFG->dirroot .'/'. $directory;
} else {
$basedir = $basedir .'/'. $directory;
$name = clean_param($name, PARAM_SAFEDIR); //bit of extra security
if ($type === 'mod') {
- // we need this special case because we support subplugins in modules,
- // otherwise it would end up in infinite loop
- if ($name === 'NEWMODULE') {
- //somebody forgot to rename the module template
- return false;
- }
- include_once("$CFG->dirroot/mod/$name/lib.php");
-
+ // we need this special case because we support subplugins in modules,
+ // otherwise it would end up in infinite loop
+ if ($name === 'NEWMODULE') {
+ //somebody forgot to rename the module template
+ return false;
+ }
+ include_once("$CFG->dirroot/mod/$name/lib.php");
+
$function = $name.'_supports';
} else {
- if ($feature == FEATURE_MOD_SUBPLUGINS) {
- //sorry only modules
- return false;
- }
- if (!$dir = get_plugin_directory($type, $name)) {
- throw new coding_exception("Unsupported plugin type or name ($type/$name)");
- }
-
- $libfile = $dir.'/lib.php';
- if (file_exists($libfile)) {
- include_once($libfile);
- }
-
- $function = $type.'_'.$name.'_supports';
+ if ($feature == FEATURE_MOD_SUBPLUGINS) {
+ //sorry only modules
+ return false;
+ }
+ if (!$dir = get_plugin_directory($type, $name)) {
+ throw new coding_exception("Unsupported plugin type or name ($type/$name)");
+ }
+
+ $libfile = $dir.'/lib.php';
+ if (file_exists($libfile)) {
+ include_once($libfile);
+ }
+
+ $function = $type.'_'.$name.'_supports';
}
if (function_exists($function)) {
$supports = $function($feature);
if (is_null($supports)) {
- // plugin does not know - use default
+ // plugin does not know - use default
return $default;
} else {
return $supports;
$link->add_class('dimmed');
}
- if (!empty($CFG->framename) && ($PAGE->generaltype=='topframe' || $CFG->framename!='_top')) {
+ if (!empty($CFG->framename) && ($PAGE->pagelayout=='topframe' || $CFG->framename!='_top')) {
$breakoutaction = new breakout_of_frame_action();
$link->add_action($breakoutaction);
}
/**
* This class hold all the information required to describe a <select> menu that
- * will be printed by {@link moodle_core_renderer::select()}. (Or by an overridden
+ * will be printed by {@link core_renderer::select()}. (Or by an overridden
* version of that method in a subclass.)
*
* This component can also hold enough metadata to be used as a popup form. It just
/**
* Holds all the information required to render a <table> by
- * {@see moodle_core_renderer::table()} or by an overridden version of that
+ * {@see core_renderer::table()} or by an overridden version of that
* method in a subclass.
*
* Example of usage:
/**
* Return the renderer for a particular part of Moodle.
*
- * The renderer interfaces are defined by classes called moodle_{plugin}_renderer
+ * The renderer interfaces are defined by classes called {plugin}_renderer
* where {plugin} is the name of the component. The renderers for core Moodle are
* defined in lib/renderer.php. For plugins, they will be defined in a file
* called renderer.php inside the plugin.
*
- * Renderers will normally want to subclass the moodle_renderer_base class.
+ * Renderers will normally want to subclass the renderer_base class.
* (However, if you really know what you are doing, you don't have to do that.)
*
* There is no separate interface definition for renderers. The default
- * moodle_{plugin}_renderer implementation also serves to define the API for
+ * {plugin}_renderer implementation also serves to define the API for
* other implementations of the interface, whether or not they subclass it.
- * For example, {@link custom_corners_core_renderer} does subclass
- * {@link moodle_core_renderer}. On the other hand, if you are using
- * {@link template_renderer_factory} then you always get back an instance
- * of the {@link template_renderer} class, whatever type of renderer you ask
- * for. This uses the fact that PHP is a dynamic language.
*
* A particular plugin can define multiple renderers if it wishes, using the
- * $subtype parameter. For example moodle_mod_workshop_renderer,
- * moodle_mod_workshop_allocation_manual_renderer etc.
+ * $subtype parameter. For example workshop_renderer,
+ * workshop_allocation_manual_renderer etc.
*
* @param string $component name such as 'core', 'mod_forum' or 'qtype_multichoice'.
* @param moodle_page $page the page the renderer is outputting content for.
public function get_renderer($component, $page, $subtype=null);
}
+
/**
* This is a base class to help you implement the renderer_factory interface.
*
* Constructor.
* @param theme_config $theme the theme we belong to.
*/
- public function __construct($theme) {
+ public function __construct(theme_config $theme) {
$this->theme = $theme;
}
+
/**
* For a given module name, return the name of the standard renderer class
* that defines the renderer interface for that module.
* @param string $subtype optional subtype such as 'news' resulting to 'mod_forum_news'
* @return string the name of the standard renderer class for that module.
*/
- protected function standard_renderer_class_for_module($component, $subtype=null) {
- if ($component != 'core') {
- $pluginrenderer = get_component_directory($component) . '/renderer.php';
- if (file_exists($pluginrenderer)) {
- include_once($pluginrenderer);
+ protected function standard_renderer_class_for_plugin($component, $subtype=null) {
+ global $CFG; // needed in incldued files
+
+ if ($component !== 'core') {
+ // renderers are stored in lib.php files like the rest of standard functions and classes
+ $libfile = get_component_directory($component) . '/renderer.php';
+ if (file_exists($libfile)) {
+ include_once($libfile);
}
}
+
+ if (strpos($component, 'mod_') === 0) {
+ $component = substr($component, 4);
+ }
if (is_null($subtype)) {
- $class = 'moodle_' . $component . '_renderer';
+ $class = $component . '_renderer';
} else {
- $class = 'moodle_' . $component . '_' . $subtype . '_renderer';
+ $class = $component . '_' . $subtype . '_renderer';
}
if (!class_exists($class)) {
throw new coding_exception('Request for an unknown renderer class ' . $class);
class standard_renderer_factory extends renderer_factory_base {
/**
* Implement the subclass method
- * @param string $module name such as 'core', 'mod_forum' or 'qtype_multichoice'.
+ * @param string $component name such as 'core', 'mod_forum' or 'qtype_multichoice'.
* @param moodle_page $page the page the renderer is outputting content for.
* @param string $subtype optional subtype such as 'news' resulting to 'mod_forum_news'
* @return object an object implementing the requested renderer interface.
*/
- public function get_renderer($module, $page, $subtype=null) {
- if ($module == 'core') {
- return new moodle_core_renderer($page);
+ public function get_renderer($component, $page, $subtype=null) {
+ if ($component === 'core') {
+ return new core_renderer($page);
} else {
- $class = $this->standard_renderer_class_for_module($module, $subtype);
+ $class = $this->standard_renderer_class_for_plugin($component, $subtype);
return new $class($page, $this->get_renderer('core', $page));
}
}
class cli_renderer_factory extends standard_renderer_factory {
/**
* Implement the subclass method
- * @param string $module name such as 'core', 'mod_forum' or 'qtype_multichoice'.
+ * @param string $component name such as 'core', 'mod_forum' or 'qtype_multichoice'.
* @param moodle_page $page the page the renderer is outputting content for.
* @param string $subtype optional subtype such as 'news' resulting to 'mod_forum_news'
* @return object an object implementing the requested renderer interface.
*/
- public function get_renderer($module, $page, $subtype=null) {
- if ($module == 'core') {
+ public function get_renderer($component, $page, $subtype=null) {
+ if ($component === 'core') {
return new cli_core_renderer($page);
} else {
- parent::get_renderer($module, $page, $subtype);
+ parent::get_renderer($component, $page, $subtype);
}
}
}
* It will load any code from theme/mytheme/renderers.php and
* theme/parenttheme/renderers.php, if then exist. Then whenever you ask for
* a renderer for 'component', it will create a mytheme_component_renderer or a
- * parenttheme_component_renderer, instead of a moodle_component_renderer,
+ * parenttheme_component_renderer, instead of a component_renderer,
* if either of those classes exist.
*
- * This generates the slightly different HTML that the custom_corners theme expects.
- *
* @copyright 2009 Tim Hunt
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since Moodle 2.0
* Constructor.
* @param object $theme the theme we are rendering for.
*/
- public function __construct($theme) {
- global $CFG;
+ public function __construct(theme_config $theme) {
parent::__construct($theme);
-
// Initialise $this->prefixes.
- $renderersfile = $theme->dir . '/renderers.php';
- if (is_readable($renderersfile)) {
- include_once($renderersfile);
- $this->prefixes[] = $theme->name . '_';
- }
- if (!empty($theme->parent)) {
- $renderersfile = $CFG->themedir .'/'. $theme->parent . '/renderers.php';
- if (is_readable($renderersfile)) {
- include_once($renderersfile);
- $this->prefixes[] = $theme->parent . '_';
- }
- }
+ $this->prefixes = $theme->renderer_prefixes();
}
/**
* Implement the subclass method
- * @param string $module name such as 'core', 'mod_forum' or 'qtype_multichoice'.
+ * @param string $component name such as 'core', 'mod_forum' or 'qtype_multichoice'.
* @param moodle_page $page the page the renderer is outputting content for.
* @param string $subtype optional subtype such as 'news' resulting to 'mod_forum_news'
* @return object an object implementing the requested renderer interface.
*/
- public function get_renderer($module, $page, $subtype=null) {
+ public function get_renderer($component, $page, $subtype=null) {
+ if (strpos($component, 'mod_') === 0) {
+ $component = substr($component, 4);
+ }
+
foreach ($this->prefixes as $prefix) {
+ // theme lib.php files are loaded automatically
if (is_null($subtype)) {
- $classname = $prefix . $module . '_renderer';
+ $classname = $prefix . '_' . $component . '_renderer';
} else {
- $classname = $prefix . $module . '_' . $subtype . '_renderer';
+ $classname = $prefix . '_' . $component . '_' . $subtype . '_renderer';
}
if (class_exists($classname)) {
- if ($module == 'core') {
+ if ($component === 'core') {
return new $classname($page);
} else {
return new $classname($page, $this->get_renderer('core', $page));
}
}
}
- return parent::get_renderer($module, $page, $subtype);
- }
-}
-
-
-/**
- * This is renderer factory that allows you to create templated themes.
- *
- * This should be considered an experimental proof of concept. In particular,
- * the performance is probably not very good. Do not try to use in on a busy site
- * without doing careful load testing first!
- *
- * This renderer factory returns instances of {@link template_renderer} class
- * which which implement the corresponding renderer interface in terms of
- * templates. To use this your theme must have a templates folder inside it.
- * Then suppose the method moodle_core_renderer::greeting($name = 'world');
- * exists. Then, a call to $OUTPUT->greeting() will cause the template
- * /theme/yourtheme/templates/core/greeting.php to be rendered, with the variable
- * $name available. The greeting.php template might contain
- *
- * <pre>
- * <h1>Hello <?php echo $name ?>!</h1>
- * </pre>
- *
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- * @since Moodle 2.0
- */
-class template_renderer_factory extends renderer_factory_base {
- /**
- * An array of paths of where to search for templates. Normally this theme,
- * the parent theme then the standardtemplate theme. (If some of these do
- * not exist, or are the same as each other, then the list will be shorter.
- */
- protected $searchpaths = array();
-
- /**
- * Constructor.
- * @param object $theme the theme we are rendering for.
- */
- public function __construct($theme) {
- global $CFG;
- parent::__construct($theme);
-
- // Initialise $this->searchpaths.
- if ($theme->name != 'standardtemplate') {
- $templatesdir = $theme->dir . '/templates';
- if (is_dir($templatesdir)) {
- $this->searchpaths[] = $templatesdir;
- }
- }
- if (!empty($theme->parent)) {
- $templatesdir = $CFG->themedir .'/'. $theme->parent . '/templates';
- if (is_dir($templatesdir)) {
- $this->searchpaths[] = $templatesdir;
- }
- }
- $this->searchpaths[] = $CFG->themedir .'/standardtemplate/templates';
- }
-
- /**
- * Implement the subclass method
- * @param string $module name such as 'core', 'mod_forum' or 'qtype_multichoice'.
- * @param moodle_page $page the page the renderer is outputting content for.
- * @param string $subtype optional subtype such as 'news' resulting to 'mod_forum_news'
- * @return object an object implementing the requested renderer interface.
- */
- public function get_renderer($module, $page, $subtype=null) {
- // Refine the list of search paths for this module.
- $searchpaths = array();
- foreach ($this->searchpaths as $rootpath) {
- $path = $rootpath . '/' . $module;
- if (!is_null($subtype)) {
- $path .= '/' . $subtype;
- }
- if (is_dir($path)) {
- $searchpaths[] = $path;
- }
- }
-
- // Create a template_renderer that copies the API of the standard renderer.
- $copiedclass = $this->standard_renderer_class_for_module($module, $subtype);
- return new template_renderer($copiedclass, $searchpaths, $page);
+ // use standard renderes if themes do not contain overridden renderer
+ return parent::get_renderer($component, $page, $subtype);
}
}
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * Functions for generating the HTML that Moodle should output.
+ *
+ * Please see http://docs.moodle.org/en/Developement:How_Moodle_outputs_HTML
+ * for an overview.
+ *
+ * @package moodlecore
+ * @copyright 2009 Tim Hunt
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
/**
* This constant is used for html attributes which need to have an empty
* value and still be output by the renderers (e.g. alt="");
require_once($CFG->libdir.'/outputrenderers.php');
/**
- * Functions for generating the HTML that Moodle should output.
- *
- * Please see http://docs.moodle.org/en/Developement:How_Moodle_outputs_HTML
- * for an overview.
- *
- * @package moodlecore
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Invalidate all server and client side caches.
+ * @return void
+ */
+function theme_reset_all_caches() {
+ global $CFG;
+ require_once("$CFG->libdir/filelib.php");
+
+ set_config('themerev', empty($CFG->themerev) ? 1 : $CFG->themerev+1);
+ fulldelete("$CFG->dataroot/cache/theme");
+}
+
+/**
+ * Enable or disable theme designer mode.
+ * @param bool $state
+ * @return void
+ */
+function theme_set_designer_mod($state) {
+ theme_reset_all_caches();
+ set_config('themedesignermode', (int)!empty($state));
+}
+
+/**
+ * Returns current theme revision number.
+ * @return int
*/
+function theme_get_revision() {
+ global $CFG;
+
+ if (empty($CFG->themedesignermode)) {
+ if (empty($CFG->themerev)) {
+ return -1;
+ } else {
+ return $CFG->themerev;
+ }
+
+ } else {
+ return -1;
+ }
+}
+
/**
* This class represents the configuration variables of a Moodle theme.
*/
class theme_config {
/**
- * @var string the name of this theme. Set automatically when this theme is
- * loaded. Please do not try to set this in your theme's config.php file.
- */
- public $name;
-
- /**
- * @var string the folder where this themes files are stored. This is set
- * automatically when the theme is loaded to $CFG->themedir . '/' . $this->name.
- * Please do not try to set this in your theme's config.php file.
- */
- public $dir;
-
- /**
- * @var array The names of all the stylesheets from this theme that you would
- * like included, in order. Give the names of the files without .css.
- */
- public $sheets = array('styles_layout', 'styles_fonts', 'styles_color');
-
- /**
- * You can base your theme on another theme by linking to the other theme as
- * a parent. This lets you use the CSS from the other theme
- * (see {@link $parentsheets}), or layout templates (see {@link $layouts}).
+ * You can base your theme on other themes by linking to the other theme as
+ * parents. This lets you use the CSS and layouts from the other themes
+ * (see {@link $layouts}).
* That makes it easy to create a new theme that is similar to another one
* but with a few changes. In this theme's CSS you only need to override
* those rules you want to change.
- */
- public $parent = null;
-
- /**
- * @var boolean|array Whether and which stylesheets from the parent theme
- * to use in this theme. (Ignored if parent is null)
*
- * Possible values are:
- * false - no parent theme CSS.
- * true - include all the normal parent theme CSS. Currently this means
- * array('styles_layout', 'styles_fonts', 'styles_color').
- * array - include just the listed stylesheets. Give the files names
- * without the .css, as in the above example.
+ * @var array
*/
- public $parentsheets = false;
+ public $parents;
/**
- * @var boolean|array Whether and which stylesheets from the standard theme
- * to use in this theme.
- *
- * The advantages of using the standard stylesheets in your theme is that
- * they give you a good basic layout, and when the Moodle core code is
- * updated with new features, the standard theme CSS will be updated to match
- * the changes in the code. Therefore, your theme is less likely to break
- * when you upgrade Moodle.
+ * The names of all the stylesheets from this theme that you would
+ * like included, in order. Give the names of the files without .css.
*
- * Possible values are:
- * false - no standard theme CSS.
- * true - include all the main standard theme CSS. Currently this means
- * array('styles_layout', 'styles_fonts', 'styles_color').
- * array - include just the listed stylesheets. Give the files names
- * without the .css, as in the above example.
+ * @var array
*/
- public $standardsheets = true;
+ public $sheets = array();
/**
- * @var array use the CSS fragments from these types of plugins.
- *
- * All the plugins of the given types will be searched for a file called
- * styles.php and, if found, these will be included with the CSS for this theme.
- *
- * This allows modules to provide some basic CSS so they work out of the box.
- * You are strongly advised to leave this enabled, otherwise you will have to
- * provide styling in your theme for every installed block, activity, course
- * format, ... in your Moodle site.
+ * The names of all the stylesheets from parents that should be expcluded.
+ * true value may be used to specify all parents or all themes from one parent.
+ * If no value specified value from parent theme used.
*
- * This setting is an array of plugin types, as in the {@link get_plugin_types()}
- * function. The default value has been chosen to be the same as Moodle 1.9.
- * This is not necessarily the best choice.
- *
- * The plugin CSS is included first, before any theme CSS. To be precise,
- * if $standardsheets is true, the plugin CSS is included with the
- * standard theme's CSS, otherwise if $parentsheets is true, the plugin CSS
- * will be included with the parent theme's CSS, otherwise the plugin CSS
- * will be include with this theme's CSS.
- */
- public $pluginsheets = array('mod', 'block', 'format', 'gradereport');
-
- /**
- * @var boolean When this is true then Moodle will try to include a file
- * meta.php from this theme into the <head></head> part of the page.
+ * @var array or arrays, true means all, null means use value from parent
*/
- public $metainclude = false;
+ public $parents_exclude_sheets = null;
/**
- * @var boolean When this is true, and when this theme has a parent, then
- * Moodle will try to include a file meta.php from the parent theme into the
- * <head></head> part of the page.
- */
- public $parentmetainclude = false;
-
- /**
- * @var boolean When this is true then Moodle will try to include the file
- * meta.php from the standard theme into the <head></head> part of the page.
+ * List of plugin sheets to be excluded.
+ * If no value specified value from parent theme used.
+ *
+ * @var array of full plugin names, null means use value from parent
*/
- public $standardmetainclude = true;
+ public $plugins_exclude_sheets = null;
/**
- * If true, then this theme must have a "pix" subdirectory that contains
- * copies of all files from the moodle/pix directory, plus a "pix/mod"
- * directory containing all the icons for all the activity modules.
+ * List of style sheets that are included in the text editor bodies.
+ * Sheets from parent themes are used automatically and can not be excluded.
*
- * @var boolean
+ * @var array
*/
- public $custompix = false;
+ public $editor_sheets = array();
/**
- * Which template to use for each general type of page.
+ * Which file to use for each page layout.
*
- * This is an array of arrays. The keys of the outer array are the different
- * types of page. Pages in Moodle are categorised into one of a short list of
- * types like 'normal', 'home', 'popup', 'form', .... The most reliable way
- * to get a complete list is to look at
- * {@link http://cvs.moodle.org/moodle/theme/standard/config.php?view=markup the standard theme config.php file}.
+ * This is an array of arrays. The keys of the outer array are the different layouts.
+ * Pages in Moodle are using several different layouts like 'normal', 'course', 'home',
+ * 'popup', 'form', .... The most reliable way to get a complete list is to look at
+ * {@link http://cvs.moodle.org/moodle/theme/base/config.php?view=markup the base theme config.php file}.
* That file also has a good example of how to set this setting.
*
- * If Moodle encounters a general type of page that is not listed in your theme,
- * then it will use the first layout. Therefore, should probably put 'normal'
- * first in this array.
- *
- * For each page type, the value in the outer array is an array that describes
+ * For each layout, the value in the outer array is an array that describes
* how you want that type of page to look. For example
* <pre>
* $THEME->layouts = array(
- * // Most pages. Put this first, so if we encounter an unknown page type, this is used.
+ * // Most pages - if we encounter an unknown or amissing page type, this one is used.
* 'normal' => array(
- * 'layout' => 'parent:layout.php',
+ * 'theme' = 'mytheme',
+ * 'file' => 'normal.php',
* 'regions' => array('side-pre', 'side-post'),
* 'defaultregion' => 'side-post'
* ),
* // The site home page.
* 'home' => array(
- * 'layout' => 'layout-home.php',
+ * 'theme' = 'mytheme',
+ * 'file' => 'home.php',
* 'regions' => array('side-pre', 'side-post'),
* 'defaultregion' => 'side-post'
* ),
* );
* </pre>
*
- * 'layout' is the layout template to use for this type of page. You can
- * specify this in one of three ways:
- * <ol>
- * <li><b>filename</b> for example 'layout-home.php' as above. Use that file from this theme.</li>
- * <li><b>parent:filename</b> for example 'parent:layout.php' as above. Use the
- * specified file from the parent theme. (Obviously, you can only do this
- * if this theme has a parent!)</li>
- * <li><b>standard:filename</b> for example 'standard:layout-popup.php'. Use
- * the specified file from the standard theme.</li>
- * </ol>
- * To promote consistency, you are encouraged to call your layout files
- * layout.php or layout-something.php.
- *
+ * 'theme' name of the theme where is the layout located
+ * 'file' is the layout file to use for this type of page.
+ * layout files are stored in layout subfolder
* 'regions' This lists the regions on the page where blocks may appear. For
* each region you list here, your layout file must include a call to
* <pre>
*/
public $layouts = array();
- /*
- * Time in seconds to cache the CSS style sheets for the chosen theme
- *
- * @var integer
- */
- public $csslifetime = 1800;
-
/**
* With this you can control the colours of the big MP3 player
* that is used for MP3 resources.
public $resource_mp3player_colors = 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&font=Arial&fontColour=3333FF&buffer=10&waitForPlay=no&autoPlay=yes';
/**
- * With this you can control the colours of the small MP3 player
- * that is used elsewhere
- *.
+ * With this you can control the colours of the small MP3 player
+ * that is used elsewhere.
+ *
* @var string
*/
public $filter_mediaplugin_colors = 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&waitForPlay=yes';
- /**
- *$THEME->rarrow = '►' //OR '→';
- *$THEME->larrow = '◄' //OR '←';
- *$CFG->block_search_button = link_arrow_right(get_string('search'), $url='', $accesshide=true);
- *
- * Accessibility: Right and left arrow-like characters are
- * used in the breadcrumb trail, course navigation menu
- * (previous/next activity), calendar, and search forum block.
- *
- * If the theme does not set characters, appropriate defaults
- * are set by (lib/weblib.php:check_theme_arrows). The suggestions
- * above are 'silent' in a screen-reader like JAWS. Please DO NOT
- * use < > » - these are confusing for blind users.
- */
-
/**
* Name of the renderer factory class to use.
*
* <ul>
* <li>{@link standard_renderer_factory} - the default.</li>
* <li>{@link theme_overridden_renderer_factory} - use this if you want to write
- * your own custom renderers in a renderers.php file in this theme (or the parent theme).</li>
- * <li>{@link template_renderer_factory} - highly experimental! Do not use (yet).</li>
+ * your own custom renderers in a lib.php file in this theme (or the parent theme).</li>
* </ul>
*
* @var string name of a class implementing the {@link renderer_factory} interface.
public $rendererfactory = 'standard_renderer_factory';
/**
- * Name of the icon finder class to use.
+ * Function to do custom CSS post-processing.
*
- * This is an advanced feature. controls how Moodle converts from the icon
- * names used in the code to URLs to embed in the HTML. You should not ever
- * need to change this.
+ * This is an advanced feature. If you want to do custom post-processing on the
+ * CSS before it is output (for example, to replace certain variable names
+ * with particular values) you can give the name of a function here.
*
- * @var string name of a class implementing the {@link icon_finder} interface.
+ * @var string the name of a function.
*/
- public $iconfinder = 'pix_icon_finder';
+ public $csspostprocess = null;
/**
- * Function to do custom CSS processing.
- *
- * This is an advanced feature. If you want to do custom processing on the
- * CSS before it is output (for example, to replace certain variable names
- * with particular values) you can give the name of a function here.
- *
- * There are two functions available that you may wish to use (defined in lib/outputlib.php):
- * <ul>
- * <li>{@link output_css_replacing_constants}</li>
- * <li>{@link output_css_for_css_edit}</li>
- * </ul>
+ * Accessibility: Right arrow-like character is
+ * used in the breadcrumb trail, course navigation menu
+ * (previous/next activity), calendar, and search forum block.
+ * If the theme does not set characters, appropriate defaults
+ * are set automatically. Please DO NOT
+ * use < > » - these are confusing for blind users.
*
- * If you wish to write your own function, look at those two as examples,
- * and it should be clear what you have to do.
+ * @var string
+ */
+ public $rarrow = null;
+
+ /**
+ * Accessibility: Right arrow-like character is
+ * used in the breadcrumb trail, course navigation menu
+ * (previous/next activity), calendar, and search forum block.
+ * If the theme does not set characters, appropriate defaults
+ * are set automatically. Please DO NOT
+ * use < > » - these are confusing for blind users.
*
- * @var string the name of a function.
+ * @var string
*/
- public $customcssoutputfunction = null;
+ public $larrow = null;
+
+
+ //==Following properties are not configurable from theme config.php==
/**
- * You can use this to control the cutoff point for strings
- * in the navmenus (list of activities in popup menu etc)
- * Default is 50 characters wide.
+ * The name of this theme. Set automatically when this theme is
+ * loaded. This can not be set in theme config.php
+ * @var string
*/
- public $navmenuwidth = 50;
+ public $name;
/**
- * By setting this to true, then you will have access to a
- * new variable in your header.html and footer.html called
- * $navmenulist ... this contains a simple XHTML menu of
- * all activities in the current course, mostly useful for
- * creating popup navigation menus and so on.
+ * the folder where this themes files are stored. This is set
+ * automatically. This can not be set in theme config.php
+ * @var string
*/
- public $makenavmenulist = false;
+ public $dir;
/**
- * @var renderer_factory Instance of the renderer_factory implementation
+ * Theme settings stored in config_plugins table.
+ * This can not be set in theme config.php
+ * @var object
+ */
+ public $setting = null;
+
+ /**
+ * Instance of the renderer_factory implementation
* we are using. Implementation detail.
+ * @var renderer_factory
*/
protected $rf = null;
/**
- * @var renderer_factory Instance of the icon_finder implementation we are
- * using. Implementation detail.
- */
- protected $if = null;
+ * List of parent config objects.
+ * @var array list of parent configs
+ **/
+ protected $parent_configs = array();
/**
* Load the config.php file for a particular theme, and return an instance
public static function load($themename) {
global $CFG;
- // We have to use the variable name $THEME (upper case) because that
- // is what is used in theme config.php files.
+ // load theme settings from db
+ try {
+ $settings = get_config('theme_'.$themename);
+ } catch (dml_exception $e) {
+ // most probably not installed yet
+ $settings = new object();
+ }
- // Set some other standard properties of the theme.
- $THEME = new theme_config;
- $THEME->name = $themename;
- $THEME->dir = $CFG->themedir . '/' . $themename;
+ if ($config = theme_config::find_theme_config($themename, $settings)) {
+ return new theme_config($config);
+ } else {
+ // bad luck, the requested theme has some problems - admin see details in theme config
+ return new theme_config(theme_config::find_theme_config('standard', $settings)); // TODO: use some other default
+ }
+ }
- // Load up the theme config
- $configfile = $THEME->dir . '/config.php';
- if (!is_readable($configfile)) {
- throw new coding_exception('Cannot use theme ' . $themename .
- '. The file ' . $configfile . ' does not exist or is not readable.');
+ /**
+ * Theme diagnostic code. It is very problematic to send debug output
+ * to the actual CSS file, instead this functions is supposed to
+ * diagnose given theme and highlisht all potential problems.
+ * This information should be available from the theme selection page
+ * or some other debug page for theme designers.
+ *
+ * @param string $themename
+ * @return array description of problems
+ */
+ public static function diagnose($themename) {
+ //TODO:
+ return array();
+ }
+
+ /**
+ * Private constructor, can be called only from the factory method.
+ * @param stdClass $config
+ */
+ private function __construct($config) {
+ global $CFG; //needed for included lib.php files
+
+ $this->settings = $config->settings;
+ $this->name = $config->name;
+ $this->dir = $config->dir;
+
+ if ($this->name != 'base') {
+ $baseconfig = theme_config::find_theme_config('base', $this->settings);
+ } else {
+ $baseconfig = $config;
}
- include($configfile);
- $THEME->update_legacy_information();
+ $configurable = array('parents', 'sheets', 'parents_exclude_sheets', 'plugins_exclude_sheets', 'layouts', 'resource_mp3player_colors',
+ 'filter_mediaplugin_colors', 'rendererfactory', 'csspostprocess', 'editor_sheets', 'rarrow', 'larrow');
- return $THEME;
+ foreach ($config as $key=>$value) {
+ if (in_array($key, $configurable)) {
+ $this->$key = $value;
+ }
+ }
+
+ // verify all parents and load configs and renderers
+ foreach ($this->parents as $parent) {
+ if ($parent == 'base') {
+ $parent_config = $baseconfig;
+ } else if (!$parent_config = theme_config::find_theme_config($parent, $this->settings)) {
+ // this is not good - better exclude faulty parents
+ continue;
+ }
+ $libfile = $parent_config->dir.'/lib.php';
+ if (is_readable($libfile)) {
+ // theme may store various function here
+ include_once($libfile);
+ }
+ $renderersfile = $parent_config->dir.'/renderers.php';
+ if (is_readable($renderersfile)) {
+ // may contain core and plugin renderers and renderer factory
+ include_once($renderersfile);
+ }
+ $this->parent_configs[$parent] = $parent_config;
+ $rendererfile = $parent_config->dir.'/renderers.php';
+ if (is_readable($rendererfile)) {
+ // may contain core and plugin renderers and renderer factory
+ include_once($rendererfile);
+ }
+ }
+ $libfile = $this->dir.'/lib.php';
+ if (is_readable($libfile)) {
+ // theme may store various function here
+ include_once($libfile);
+ }
+ $rendererfile = $this->dir.'/renderers.php';
+ if (is_readable($rendererfile)) {
+ // may contain core and plugin renderers and renderer factory
+ include_once($rendererfile);
+ }
+
+ // cascade all layouts properly
+ foreach ($baseconfig->layouts as $layout=>$value) {
+ if (!isset($this->layouts[$layout])) {
+ foreach ($this->parent_configs as $parent_config) {
+ if (isset($parent_config->layouts[$layout])) {
+ $this->layouts[$layout] = $parent_config->layouts[$layout];
+ continue 2;
+ }
+ }
+ $this->layouts[$layout] = $value;
+ }
+ }
+
+ //fix arrows if needed
+ $this->check_theme_arrows();
}
- /**
- * Get the renderer for a part of Moodle for this theme.
- * @param string $module the name of part of moodle. E.g. 'core', 'quiz', 'qtype_multichoice'.
- * @param moodle_page $page the page we are rendering
- * @param string $subtype optional subtype such as 'news' resulting to 'mod_forum_news'
- * @return moodle_renderer_base the requested renderer.
+ /*
+ * Checks if arrows $THEME->rarrow, $THEME->larrow have been set (theme/-/config.php).
+ * If not it applies sensible defaults.
+ *
+ * Accessibility: right and left arrow Unicode characters for breadcrumb, calendar,
+ * search forum block, etc. Important: these are 'silent' in a screen-reader
+ * (unlike > »), and must be accompanied by text.
*/
- public function get_renderer($module, $page, $subtype=null) {
- if (is_null($this->rf)) {
- if (CLI_SCRIPT) {
- $classname = 'cli_renderer_factory';
+ private function check_theme_arrows() {
+ if (!isset($this->rarrow) and !isset($this->larrow)) {
+ // Default, looks good in Win XP/IE 6, Win/Firefox 1.5, Win/Netscape 8...
+ // Also OK in Win 9x/2K/IE 5.x
+ $this->rarrow = '►';
+ $this->larrow = '◄';
+ if (empty($_SERVER['HTTP_USER_AGENT'])) {
+ $uagent = '';
} else {
- $classname = $this->rendererfactory;
+ $uagent = $_SERVER['HTTP_USER_AGENT'];
+ }
+ if (false !== strpos($uagent, 'Opera')
+ || false !== strpos($uagent, 'Mac')) {
+ // Looks good in Win XP/Mac/Opera 8/9, Mac/Firefox 2, Camino, Safari.
+ // Not broken in Mac/IE 5, Mac/Netscape 7 (?).
+ $this->rarrow = '▶';
+ $this->larrow = '◀';
+ }
+ elseif (false !== strpos($uagent, 'Konqueror')) {
+ $this->rarrow = '→';
+ $this->larrow = '←';
+ }
+ elseif (isset($_SERVER['HTTP_ACCEPT_CHARSET'])
+ && false === stripos($_SERVER['HTTP_ACCEPT_CHARSET'], 'utf-8')) {
+ // (Win/IE 5 doesn't set ACCEPT_CHARSET, but handles Unicode.)
+ // To be safe, non-Unicode browsers!
+ $this->rarrow = '>';
+ $this->larrow = '<';
+ }
+
+ /// RTL support - in RTL languages, swap r and l arrows
+ if (right_to_left()) {
+ $t = $this->rarrow;
+ $this->rarrow = $this->larrow;
+ $this->larrow = $t;
}
- $this->rf = new $classname($this);
}
+ }
- return $this->rf->get_renderer($module, $page, $subtype);
+ /**
+ * Returns output renderer prefixes, these are used when looking
+ * for the overriden renderers in themes.
+ * @return array
+ */
+ public function renderer_prefixes() {
+ global $CFG; // just in case the included files need it
+
+ $prefixes = array();
+
+ foreach ($this->parent_configs as $parent) {
+ $prefixes[] = 'theme_'.$parent->name;
+ }
+
+ return $prefixes;
}
/**
- * Get the renderer for a part of Moodle for this theme.
- * @return moodle_renderer_base the requested renderer.
+ * Returns the stylesheet URL of this editor content
+ * @param bool $encoded false means use & and true use & in URLs
+ * @return string
*/
- protected function get_icon_finder() {
- if (is_null($this->if)) {
- $classname = $this->iconfinder;
- $this->if = new $classname($this);
+ public function editor_css_url($encoded=true) {
+ global $CFG;
+
+ $rev = theme_get_revision();
+
+ if ($rev > -1) {
+ $params = array('theme'=>$this->name,'rev'=>$rev, 'type'=>'editor');
+ return new moodle_url($CFG->httpswwwroot.'/theme/styles.php', $params);
+ } else {
+ $params = array('theme'=>$this->name, 'type'=>'editor');
+ return new moodle_url($CFG->httpswwwroot.'/theme/styles_debug.php', $params);
}
- return $this->if;
}
/**
- * Return the URL for an icon identified as in pre-Moodle 2.0 code.
- *
- * Suppose you have old code like $url = "$CFG->pixpath/i/course.gif";
- * then old_icon_url('i/course'); will return the equivalent URL that is correct now.
- *
- * @param string $iconname the name of the icon.
- * @return string the URL for that icon.
+ * Returns the content of the CSS to be used in editor content
+ * @return string
*/
- public function old_icon_url($iconname) {
- return $this->get_icon_finder()->old_icon_url($iconname);
+ public function editor_css_content() {
+ global $CFG;
+
+ $css = '';
+
+ // first editor plugins
+ $plugins = get_plugin_list('editor');
+ foreach ($plugins as $plugin=>$fulldir) {
+ $sheetfile = "$fulldir/editor_styles.css";
+ if (is_readable($sheetfile)) {
+ $css .= "/*** Editor $plugin content CSS ***/\n\n" . file_get_contents($sheetfile) . "\n\n";
+ }
+ }
+ // then parent themes
+ foreach (array_reverse($this->parent_configs) as $parent_config) { // base first, the immediate parent last
+ if (empty($parent_config->editor_sheets)) {
+ continue;
+ }
+ foreach ($parent_config->editor_sheets as $sheet) {
+ $sheetfile = "$parent_config->dir/$sheet.css";
+ if (is_readable($sheetfile)) {
+ $css .= "/*** Parent theme $parent/$sheet ***/\n\n" . file_get_contents($sheetfile) . "\n\n";
+ }
+ }
+ }
+ // finally this theme
+ if (!empty($this->editor_sheets)) {
+ foreach ($this->editor_sheets as $sheet) {
+ $sheetfile = "$this->dir/$sheet.css";
+ if (is_readable($sheetfile)) {
+ $css .= "/*** Theme $sheet ***/\n\n" . file_get_contents($sheetfile) . "\n\n";
+ }
+ }
+ }
+
+ return $this->post_process($css);
}
/**
- * Return the URL for an icon identified as in pre-Moodle 2.0 code.
- *
- * Suppose you have old code like $url = "$CFG->modpixpath/$mod/icon.gif";
- * then mod_icon_url('icon', $mod); will return the equivalent URL that is correct now.
- *
- * @param string $iconname the name of the icon.
- * @param string $module the module the icon belongs to.
- * @return string the URL for that icon.
+ * Get the stylesheet URL of this theme
+ * @param bool $encoded false means use & and true use & in URLs
+ * @return string
*/
- public function mod_icon_url($iconname, $module) {
- return $this->get_icon_finder()->mod_icon_url($iconname, $module);
+ public function css_urls() {
+ global $CFG;
+
+ $rev = theme_get_revision();
+
+ if ($rev > -1) {
+ $params = array('theme'=>$this->name,'rev'=>$rev);
+ if (check_browser_version('MSIE', 5) and !check_browser_version('MSIE', 8)) {
+ $params['type'] = 'ie';
+ }
+ return array(new moodle_url($CFG->httpswwwroot.'/theme/styles.php', $params));
+
+ } else {
+ // this is painfully slow, but it should not matter much ;-)
+ $css = $this->css_content();
+ $url = $CFG->httpswwwroot.'/theme/styles_debug.php';
+ $urls = array();
+ $urls[] = new moodle_url($url, array('theme'=>$this->name,'type'=>'yui'));
+ foreach ($css['plugins'] as $plugin=>$unused) {
+ $urls[] = new moodle_url($url, array('theme'=>$this->name,'type'=>'plugin', 'subtype'=>$plugin));
+ }
+ foreach ($css['parents'] as $parent=>$sheets) {
+ foreach ($sheets as $sheet=>$unused2) {
+ $urls[] = new moodle_url($url, array('theme'=>$this->name,'type'=>'parent', 'subtype'=>$parent, 'sheet'=>$sheet));
+ }
+ }
+ foreach ($css['theme'] as $sheet=>$unused) {
+ $urls[] = new moodle_url($url, array('theme'=>$this->name,'type'=>'theme', 'sheet'=>$sheet));
+ }
+ return $urls;
+ }
}
/**
- * Get the list of stylesheet URLs that need to go in the header for this theme.
- * @return array of URLs.
+ * Returns the content of the one huge CSS merged from all style sheets.
+ * @return string
*/
- public function get_stylesheet_urls() {
+ public function css_content() {
global $CFG;
- // We need to tell the CSS that is being included (for example the standard
- // theme CSS) which theme it is being included for. Prepare the necessary param.
- $param = '?for=' . $this->name;
+ $css = array('yui'=>array(), 'plugins'=>array(), 'parents'=>array(), 'theme'=>array());
- // Stylesheets, in order (standard, parent, this - some of which may be the same).
- $stylesheets = array();
- if ($this->name != 'standard' && $this->standardsheets) {
- $stylesheets[] = $CFG->httpsthemewww . '/standard/styles.php' . $param;
+ //YUI sheets
+ $yui_sheets = "/*** Standard YUI sheets ***/\n\n";
+ $yui_sheets .= file_get_contents("$CFG->libdir/yui/reset-fonts-grids/reset-fonts-grids.css");
+ $items = new DirectoryIterator("$CFG->libdir/yui/assets/skins/sam");
+ foreach ($items as $item) {
+ if ($item->isDot() or !$item->isFile()) {
+ continue;
+ }
+ $filename = $item->getFilename();
+ if (substr($filename, -4) !== '.css') {
+ continue;
+ }
+ $yui_sheets .= file_get_contents("$CFG->libdir/yui/assets/skins/sam/$filename");
+ }
+ unset($item);
+ unset($items);
+ $yui_sheets = preg_replace('/([a-z-]+)\.(png|gif)/', '[[pix:yui|$1]]', $yui_sheets);
+ $css['yui'][] = $this->post_process($yui_sheets);
+
+ // get plugin sheets
+ $excludes = null;
+ if (is_array($this->plugins_exclude_sheets) or $this->plugins_exclude_sheets === true) {
+ $excludes = $this->plugins_exclude_sheets;
+ } else {
+ foreach ($this->parent_configs as $parent_config) { // the immediate parent first, base last
+ if (!isset($parent_config->plugins_exclude_sheets)) {
+ continue;
+ }
+ if (is_array($parent_config->plugins_exclude_sheets) or $parent_config->plugins_exclude_sheets === true) {
+ $excludes = $parent_config->plugins_exclude_sheets;
+ break;
+ }
+ }
}
- if (!empty($this->parent)) {
- $stylesheets[] = $CFG->httpsthemewww . '/' . $this->parent . '/styles.php' . $param;
+ if ($excludes !== true) {
+ foreach (get_plugin_types() as $type=>$unused) {
+ if ($type === 'theme') {
+ continue;
+ }
+ if (!empty($excludes[$type]) and $excludes[$type] === true) {
+ continue;
+ }
+ $plugins = get_plugin_list($type);
+ foreach ($plugins as $plugin=>$fulldir) {
+ if (!empty($excludes[$type]) and is_array($excludes[$type])
+ and in_array($plugin, $excludes[$type])) {
+ continue;
+ }
+ $sheetfile = "$fulldir/styles.css";
+ if (is_readable($sheetfile)) {
+ $css['plugins'][$type.'_'.$plugin] = $this->post_process("/*** Standard plugin $type/$plugin ***/\n\n" . file_get_contents($sheetfile));
+ }
+ }
+ }
}
- $stylesheets[] = $CFG->httpsthemewww . '/' . $this->name . '/styles.php' . $param;
- // Additional styles for right-to-left languages, if applicable.
- if (right_to_left()) {
- $stylesheets[] = $CFG->httpsthemewww . '/standard/rtl.css';
+ // find out wanted parent sheets
+ $excludes = null;
+ if (is_array($this->parents_exclude_sheets) or $this->parents_exclude_sheets === true) {
+ $excludes = $this->parents_exclude_sheets;
+ } else {
+ foreach ($this->parent_configs as $parent_config) { // the immediate parent first, base last
+ if (!isset($parent_config->parents_exclude_sheets)) {
+ continue;
+ }
+ if (is_array($parent_config->parents_exclude_sheets) or $parent_config->parents_exclude_sheets === true) {
+ $excludes = $parent_config->parents_exclude_sheets;
+ break;
+ }
+ }
+ }
+ if ($excludes !== true) {
+ foreach (array_reverse($this->parent_configs) as $parent_config) { // base first, the immediate parent last
+ $parent = $parent_config->name;
+ if (empty($parent_config->sheets)) {
+ continue;
+ }
+ if (!empty($excludes[$parent]) and $excludes[$parent] === true) {
+ continue;
+ }
+ foreach ($parent_config->sheets as $sheet) {
+ if (!empty($excludes[$parent]) and is_array($excludes[$parent])
+ and in_array($sheet, $excludes[$parent])) {
+ continue;
+ }
+ $sheetfile = "$parent_config->dir/style/$sheet.css";
+ if (is_readable($sheetfile)) {
+ $css['parents'][$parent][$sheet] = $this->post_process("/*** Parent theme $parent/$sheet ***/\n\n" . file_get_contents($sheetfile));
+ }
+ }
+ }
+ }
- if (!empty($this->parent) && file_exists($CFG->themedir . '/' . $this->parent . '/rtl.css')) {
- $stylesheets[] = $CFG->httpsthemewww . '/' . $this->parent . '/rtl.css';
+ // current theme sheets
+ if (is_array($this->sheets)) {
+ foreach ($this->sheets as $sheet) {
+ $sheetfile = "$this->dir/style/$sheet.css";
+ if (is_readable($sheetfile)) {
+ $css['theme'][$sheet] = $this->post_process("/*** This theme $sheet ***/\n\n" . file_get_contents($sheetfile));
+ }
}
+ }
+
+ return $css;
+ }
- if (file_exists($this->dir . '/rtl.css')) {
- $stylesheets[] = $CFG->httpsthemewww . '/' . $this->name . '/rtl.css';
+ protected function post_process($css) {
+ // now resolve all image locations
+ if (preg_match_all('/\[\[pix:([a-z_]+\|)?([^\]]+)\]\]/', $css, $matches, PREG_SET_ORDER)) {
+ $replaced = array();
+ foreach ($matches as $match) {
+ if (isset($replaced[$match[0]])) {
+ continue;
+ }
+ $replaced[$match[0]] = true;
+ $imagename = $match[2];
+ $component = rtrim($match[1], '|');
+ $css = str_replace($match[0], $this->image_url($imagename, $component)->out(false, array(), false), $css);
}
}
- // If the theme wants pluginsheets, get them included in the first (most
- // general) stylesheet we are including. That is, process them with the
- // standard CSS if we are using that, else with the parent CSS, else with
- // our own CSS.
- if (!empty($this->pluginsheets)) {
- $stylesheets[0] .= '&pluginsheets=1';
+ // now resolve all theme settings or do any other postprocessing
+ $csspostprocess = $this->csspostprocess;
+ if (function_exists($csspostprocess)) {
+ $css = $csspostprocess($css, $this);
}
- return $stylesheets;
+ return $css;
}
/**
- * Get the meta tags from one theme to got in the <head> of the HTML.
- * @param string $themename the name of the theme to get meta tags from.
- * @param string $page that page whose <head> is being output.
- * @return string HTML code.
+ * Return the URL for an image
+ *
+ * @param string $imagename the name of the icon.
+ * @param string $component, specification of one plugin like in get_string()
+ * @return moodle_url
*/
- protected function get_theme_meta_tags($themename, $page) {
+ public function image_url($imagename, $component) {
global $CFG;
- // At least one theme's meta.php expects to have $PAGE visible.
- $PAGE = $page;
- $filename = $CFG->themedir . '/' . $themename . '/meta.php';
- if (file_exists($filename)) {
- ob_start();
- include_once($filename);
- $metatags = ob_get_contents();
- ob_end_clean();
+
+ $params = array('theme'=>$this->name, 'image'=>$imagename);
+
+ $rev = theme_get_revision();
+ if ($rev != -1) {
+ $params['rev'] = $rev;
+ }
+ if (!empty($component) and $component !== 'moodle'and $component !== 'core') {
+ $params['component'] = $component;
}
- return $metatags;
+
+ return new moodle_url("$CFG->httpswwwroot/theme/image.php", $params);
}
/**
- * Get all the meta tags (from this theme, standard, parent) that this theme
- * wants in the <head> of the HTML.
- *
- * @param string $page that page whose <head> is being output.
- * @return string HTML code.
+ * Resolves the real image location.
+ * @param string $image name of image, may contain relative path
+ * @param string $component
+ * @return string full file path
*/
- public function get_meta_tags($page) {
- $metatags = '';
- if ($this->standardmetainclude) {
- $metatags .= $this->get_theme_meta_tags('standard', $page);
- }
- if ($this->parent && $this->parentmetainclude) {
- $metatags .= $this->get_theme_meta_tags($this->parent, $page);
- }
- if ($this->metainclude) {
- $metatags .= $this->get_theme_meta_tags($this->name, $page);
+ public function resolve_image_location($image, $component) {
+ global $CFG;
+
+ if ($component === 'moodle' or $component === 'core' or empty($component)) {
+ if ($imagefile = $this->image_exists("$this->dir/pix_core/$image")) {
+ return $imagefile;
+ }
+ foreach (array_reverse($this->parent_configs) as $parent_config) { // base first, the immediate parent last
+ if ($imagefile = $this->image_exists("$parent_config->dir/pix_core/$image")) {
+ return $imagefile;
+ }
+ }
+ if ($imagefile = $this->image_exists("$CFG->dirroot/pix/$image")) {
+ return $imagefile;
+ }
+ return null;
+
+ } else if ($component === 'theme') { //exception
+ if ($image === 'favicon') {
+ return "$this->dir/pix/favicon.ico";
+ }
+ if ($imagefile = $this->image_exists("$this->dir/pix/$image")) {
+ return $imagefile;
+ }
+ foreach (array_reverse($this->parent_configs) as $parent_config) { // base first, the immediate parent last
+ if ($imagefile = $this->image_exists("$parent_config->dir/pix/$image")) {
+ return $imagefile;
+ }
+ }
+ return null;
+
+ } else if ($component === 'yui') {
+ // yui CSS files are parsed automatically and altered on the fly
+ if ($imagefile = $this->image_exists("$this->dir/pix_yui/$image")) {
+ return $imagefile;
+ }
+ foreach (array_reverse($this->parent_configs) as $parent_config) { // base first, the immediate parent last
+ if ($imagefile = $this->image_exists("$parent_config->dir/pix_yui/$image")) {
+ return $imagefile;
+ }
+ }
+ if ($imagefile = $this->image_exists("$CFG->libdir/yui/assets/skins/sam/$image")) {
+ return $imagefile;
+ }
+ return null;
+
+ } else {
+ if (strpos($component, '_') === false) {
+ $component = 'mod_'.$component;
+ }
+ list($type, $plugin) = explode('_', $component, 2);
+
+ if ($imagefile = $this->image_exists("$this->dir/pix_plugins/$type/$plugin/$image")) {
+ return $imagefile;
+ }
+ foreach (array_reverse($this->parent_configs) as $parent_config) { // base first, the immediate parent last
+ if ($imagefile = $this->image_exists("$parent_config->dir/pix_plugins/$type/$plugin/$image")) {
+ return $imagefile;
+ }
+ }
+ $dir = get_plugin_directory($type, $plugin);
+ if ($imagefile = $this->image_exists("$dir/pix/$image")) {
+ return $imagefile;
+ }
+ return null;
}
- return $metatags;
}
/**
- * Get the information from {@link $layouts} for this type of page.
- * @param string $generaltype the general type of the page.
- * @return array the appropriate part of {@link $layouts}.
+ * Checks if file with any image extension exists.
+ * @param string $filepath
+ * @return string image name with extension
*/
- protected function layout_info_for_page($generaltype) {
- if (array_key_exists($generaltype, $this->layouts)) {
- return $this->layouts[$generaltype];
+ private static function image_exists($filepath) {
+ if (file_exists("$filepath.gif")) {
+ return "$filepath.gif";
+ } else if (file_exists("$filepath.png")) {
+ return "$filepath.png";
+ } else if (file_exists("$filepath.jpg")) {
+ return "$filepath.jpg";
+ } else if (file_exists("$filepath.jpeg")) {
+ return "$filepath.jpeg";
} else {
- return reset($this->layouts);
+ return false;
}
}
/**
- * Given the settings of this theme, and the page generaltype, return the
- * full path of the page layout template to use.
- *
- * Used by {@link moodle_core_renderer::header()}. If an appropriate new-style
- * template cannot be found, returns false to signal that the old-style
- * header.html and footer.html files should be used.
- *
- * @param string $generaltype the general type of the page.
- * @return string Full path to the template to use, or false if a new-style
- * template cannot be found.
+ * Loads the theme config from config.php file.
+ * @param string $themename
+ * @param object $settings from config_plugins table
+ * @return object
*/
- public function template_for_page($generaltype) {
- global $CFG;
-
- // Legacy fallback.
- if (empty($this->layouts)) {
- return false;
- }
+ private static function find_theme_config($themename, $settings) {
+ // We have to use the variable name $THEME (upper case) because that
+ // is what is used in theme config.php files.
- $layoutinfo = $this->layout_info_for_page($generaltype);
- $templatefile = $layoutinfo['layout'];
-
- // Parse the name that was found.
- if (strpos($templatefile, 'standard:') === 0) {
- $templatepath = $CFG->themedir . '/standard/' . substr($templatefile, 9);
- } else if (strpos($templatefile, 'parent:') === 0) {
- if (empty($this->parent)) {
- throw new coding_exception('This theme (' . $this->name .
- ') does not have a parent. You cannot specify a layout template like ' .
- $templatefile);
- }
- $templatepath = $CFG->themedir . '/' . $this->parent . '/' . substr($templatefile, 7);
- } else {
- $templatepath = $this->dir . '/' . $templatefile;
+ if (!$dir = theme_config::find_theme_location($themename)) {
+ return null;
}
-
- // Check the template exists.
- if (!is_readable($templatepath)) {
- throw new coding_exception('The template ' . $templatefile . ' (' . $templatepath .
- ') for page type ' . $generaltype . ' cannot be found in this theme (' .
- $this->name . ')');
+
+ $THEME = new object();
+ $THEME->name = $themename;
+ $THEME->dir = $dir;
+ $THEME->settings = $settings;
+
+ global $CFG; // just in case somebody tries to use $CFG in theme config
+ include("$THEME->dir/config.php");
+
+ // verify the theme configuration is OK
+ if (!is_array($THEME->parents)) {
+ // parents option is mandatory now
+ return null;
}
- return $templatepath;
+ return $THEME;
}
/**
- * Inform a block_manager about the block regions this theme wants on this
- * type of page.
- * @param string $generaltype the general type of the page.
- * @param block_manager $blockmanager the block_manger to set up.
- * @return void
+ * Finds the theme location and verifies the theme has all needed files
+ * and is not obsoleted.
+ * @param string $themename
+ * @return string full dir path or null if not found
*/
- public function setup_blocks($generaltype, $blockmanager) {
- // Legacy fallback.
- if (empty($this->layouts)) {
- if (!in_array($generaltype, array('form', 'popup', 'maintenance'))) {
- $blockmanager->add_regions(array(BLOCK_POS_LEFT, BLOCK_POS_RIGHT));
- $blockmanager->set_default_region(BLOCK_POS_RIGHT);
- }
- return;
- }
+ private static function find_theme_location($themename) {
+ global $CFG;
+
+ if (file_exists("$CFG->dirroot/theme/$themename/config.php")) {
+ $dir = "$CFG->dirroot/theme/$themename";
- $layoutinfo = $this->layout_info_for_page($generaltype);
- if (!empty($layoutinfo['regions'])) {
- $blockmanager->add_regions($layoutinfo['regions']);
- $blockmanager->set_default_region($layoutinfo['defaultregion']);
} else {
- $blockmanager->set_default_region('');
+ return null;
}
+
+ if (file_exists("$dir/styles.php")) {
+ //legacy theme - needs to be upgraded - upgrade info is displayed on the admin settings page
+ return null;
+ }
+
+ return $dir;
}
/**
- * Get the list of all block regions known to this theme in all templates.
- * @return array internal region name => human readable name.
+ * Get the renderer for a part of Moodle for this theme.
+ * @param string $module the name of part of moodle. E.g. 'core', 'quiz', 'qtype_multichoice'.
+ * @param moodle_page $page the page we are rendering
+ * @param string $subtype optional subtype such as 'news' resulting to 'mod_forum_news'
+ * @return renderer_base the requested renderer.
*/
- public function get_all_block_regions() {
- // Legacy fallback.
- if (empty($this->layouts)) {
- return array(
- 'side-pre' => get_string('region-side-pre', 'theme_standard'),
- 'side-post' => get_string('region-side-post', 'theme_standard'),
- );
- }
-
- $regions = array();
- foreach ($this->layouts as $layoutinfo) {
- $ownertheme = $this->name;
- if (strpos($layoutinfo['layout'], 'standard:') === 0) {
- $ownertheme = 'standard';
- } else if (strpos($layoutinfo['layout'], 'parent:') === 0) {
- $ownertheme = $this->parent;
- }
-
- foreach ($layoutinfo['regions'] as $region) {
- $regions[$region] = get_string('region-' . $region, 'theme_' . $ownertheme);
+ public function get_renderer($module, $page, $subtype=null) {
+ if (is_null($this->rf)) {
+ if (CLI_SCRIPT) {
+ $classname = 'cli_renderer_factory';
+ } else {
+ $classname = $this->rendererfactory;
}
+ $this->rf = new $classname($this);
}
- return $regions;
+
+ return $this->rf->get_renderer($module, $page, $subtype);
}
/**
- * Helper method used by {@link update_legacy_information()}. Update one entry
- * in the $this->pluginsheets array, based on the legacy $property propery.
- * @param string $plugintype e.g. 'mod'.
- * @param string $property e.g. 'modsheets'.
- * @return void
+ * Get the information from {@link $layouts} for this type of page.
+ * @param string $pagelayout the the page layout name.
+ * @return array the appropriate part of {@link $layouts}.
*/
- protected function update_legacy_plugin_sheets($plugintype, $property) {
- // In Moodle 1.9, modsheets etc. were ignored if standardsheets was false.
- if (!empty($this->standardsheets) && property_exists($this, $property)) {
- debugging('$THEME->' . $property . ' is deprecated. Please use the new $THEME->pluginsheets instead.', DEBUG_DEVELOPER);
- if (!empty($this->$property) && !in_array($plugintype, $this->pluginsheets)) {
- $this->pluginsheets[] = $plugintype;
- } else if (empty($this->$property) && in_array($plugintype, $this->pluginsheets)) {
- unset($this->pluginsheets[array_search($plugintype, $this->pluginsheets)]);
- }
+ protected function layout_info_for_page($pagelayout) {
+ if (array_key_exists($pagelayout, $this->layouts)) {
+ return $this->layouts[$pagelayout];
+ } else {
+ return $this->layouts['normal'];
}
}
/**
- * This method looks a the settings that have been loaded, to see whether
- * any legacy things are being used, and outputs warning and tries to update
- * things to use equivalent newer settings.
- * @return void
+ * Given the settings of this theme, and the page pagelayout, return the
+ * full path of the page layout file to use.
+ *
+ * Used by {@link core_renderer::header()}.
+ *
+ * @param string $pagelayout the the page layout name.
+ * @return string Full path to the lyout file to use
*/
- protected function update_legacy_information() {
+ public function layout_file($pagelayout) {
global $CFG;
- $this->update_legacy_plugin_sheets('mod', 'modsheets');
- $this->update_legacy_plugin_sheets('block', 'blocksheets');
- $this->update_legacy_plugin_sheets('format', 'formatsheets');
- $this->update_legacy_plugin_sheets('gradereport', 'gradereportsheets');
+ $layoutinfo = $this->layout_info_for_page($pagelayout);
+ $layoutfile = $layoutinfo['file'];
+ $theme = $layoutinfo['theme'];
- if (!empty($this->langsheets)) {
- debugging('$THEME->langsheets is no longer supported. No languages were ' .
- 'using it for anything, and it did not seem to serve any purpose.', DEBUG_DEVELOPER);
- }
+ if ($dir = $this->find_theme_location($theme)) {
+ $path = "$dir/layout/$layoutfile";
- if (!empty($this->customcorners)) {
- // $THEME->customcorners is deprecated but we provide support for it via the
- // custom_corners_renderer_factory class in lib/deprecatedlib.php
- debugging('$THEME->customcorners is deprecated. Please use the new $THEME->rendererfactory ' .
- 'to control HTML generation. Please use $this->rendererfactory = \'custom_corners_renderer_factory\'; ' .
- 'in your config.php file instead.', DEBUG_DEVELOPER);
- $this->rendererfactory = 'custom_corners_renderer_factory';
+ // Check the template exists, return general base theme template if not.
+ if (is_readable($path)) {
+ return $path;
+ }
}
- if (!empty($this->cssconstants)) {
- debugging('$THEME->cssconstants is deprecated. Please use ' .
- '$THEME->customcssoutputfunction = \'output_css_replacing_constants\'; ' .
- 'in your config.php file instead.', DEBUG_DEVELOPER);
- $this->customcssoutputfunction = 'output_css_replacing_constants';
- }
+ // fallback to standard normal layout
+ return "$CFG->dirroot/theme/base/layout/general.php";
+ }
- if (!empty($this->CSSEdit)) {
- debugging('$THEME->CSSEdit is deprecated. Please use ' .
- '$THEME->customcssoutputfunction = \'output_css_for_css_edit\'; ' .
- 'in your config.php file instead.', DEBUG_DEVELOPER);
- $this->customcssoutputfunction = 'output_css_for_css_edit';
+ /**
+ * Returns auxiliary page layout options specified in layout configuration array.
+ * @param string $pagelayout
+ * @return array
+ */
+ public function pagelayout_options($pagelayout) {
+ $info = $this->layout_info_for_page($pagelayout);
+ if (!empty($info['options'])) {
+ return $info['options'];
}
+ return array();
+ }
- if (!empty($CFG->smartpix)) {
- $this->iconfinder = 'smartpix_icon_finder';
- } else if ($this->custompix) {
- $this->iconfinder = 'theme_icon_finder';
+ /**
+ * Inform a block_manager about the block regions this theme wants on this
+ * page layout.
+ * @param string $pagelayout the general type of the page.
+ * @param block_manager $blockmanager the block_manger to set up.
+ * @return void
+ */
+ public function setup_blocks($pagelayout, $blockmanager) {
+ $layoutinfo = $this->layout_info_for_page($pagelayout);
+ if (!empty($layoutinfo['regions'])) {
+ $blockmanager->add_regions($layoutinfo['regions']);
+ $blockmanager->set_default_region($layoutinfo['defaultregion']);
}
}
/**
- * Set the variable $CFG->pixpath and $CFG->modpixpath to be the right
- * ones for this theme. These should no longer be used, but legacy code
- * might still rely on them.
- * @return void
+ * Get the list of all block regions known to this theme in all templates.
+ * @return array internal region name => human readable name.
*/
- public function setup_legacy_pix_paths() {
- global $CFG;
- if (!empty($CFG->smartpix)) {
- if ($CFG->slasharguments) {
- // Use this method if possible for better caching
- $extra = '';
- } else {
- $extra = '?file=';
+ public function get_all_block_regions() {
+ $regions = array();
+ //TODO: this is weird because the regions from different layouts override each other
+ foreach ($this->layouts as $layoutinfo) {
+ foreach ($layoutinfo['regions'] as $region) {
+ $regions[$region] = get_string('region-' . $region, 'theme_' . $layoutinfo['theme']);
}
- $CFG->pixpath = $CFG->httpswwwroot . '/pix/smartpix.php' . $extra . '/' . $this->name;
- $CFG->modpixpath = $CFG->httpswwwroot . '/pix/smartpix.php' . $extra . '/' . $this->name . '/mod';
-
- } else if (empty($THEME->custompix)) {
- $CFG->pixpath = $CFG->httpswwwroot . '/pix';
- $CFG->modpixpath = $CFG->httpswwwroot . '/mod';
-
- } else {
- $CFG->pixpath = $CFG->httpsthemewww . '/' . $this->name . '/pix';
- $CFG->modpixpath = $CFG->httpsthemewww . '/' . $this->name . '/pix/mod';
}
+ return $regions;
}
}
+
/**
* This class keeps track of which HTML tags are currently open.
*
return '<ul>' . implode("\n", $this->log) . '</ul>';
}
}
-
-/**
- * An icon finder is responsible for working out the correct URL for an icon.
- *
- * A icon finder must also have a constructor that takes a theme object.
- * (See {@link standard_icon_finder::__construct} for an example.)
- *
- * Note that we are planning to change the Moodle icon naming convention before
- * the Moodle 2.0 release. Therefore, this API will probably change.
- *
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- * @since Moodle 2.0
- */
-interface icon_finder {
- /**
- * Return the URL for an icon identified as in pre-Moodle 2.0 code.
- *
- * Suppose you have old code like $url = "$CFG->pixpath/i/course.gif";
- * then old_icon_url('i/course'); will return the equivalent URL that is correct now.
- *
- * @param string $iconname the name of the icon.
- * @return string the URL for that icon.
- */
- public function old_icon_url($iconname);
-
- /**
- * Return the URL for an icon identified as in pre-Moodle 2.0 code.
- *
- * Suppose you have old code like $url = "$CFG->modpixpath/$mod/icon.gif";
- * then mod_icon_url('icon', $mod); will return the equivalent URL that is correct now.
- *
- * @param string $iconname the name of the icon.
- * @param string $module the module the icon belongs to.
- * @return string the URL for that icon.
- */
- public function mod_icon_url($iconname, $module);
-}
-
-/**
- * This icon finder implements the old scheme that was used when themes that had
- * $THEME->custompix = false.
- *
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- * @since Moodle 2.0
- */
-class pix_icon_finder implements icon_finder {
- /**
- * Constructor
- * @param theme_config $theme the theme we are finding icons for (which is irrelevant).
- */
- public function __construct($theme) {
- }
-
- /**
- * Implement interface method.
- * @param string $iconname the name of the icon.
- * @return string the URL for that icon.
- */
- public function old_icon_url($iconname) {
- global $CFG;
- if (file_exists($CFG->dirroot . '/pix/' . $iconname . '.png')) {
- return $CFG->httpswwwroot . '/pix/' . $iconname . '.png';
- } else {
- return $CFG->httpswwwroot . '/pix/' . $iconname . '.gif';
- }
- }
-
- /**
- * Implement interface method.
- * @param string $iconname the name of the icon.
- * @param string $module the module the icon belongs to.
- * @return string the URL for that icon.
- */
- public function mod_icon_url($iconname, $module) {
- global $CFG;
- if (file_exists($CFG->dirroot . '/mod/' . $module . '/' . $iconname . '.png')) {
- return $CFG->httpswwwroot . '/mod/' . $module . '/' . $iconname . '.png';
- } else {
- return $CFG->httpswwwroot . '/mod/' . $module . '/' . $iconname . '.gif';
- }
- }
-}
-
-
-/**
- * This icon finder implements the old scheme that was used for themes that had
- * $THEME->custompix = true.
- *
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- * @since Moodle 2.0
- */
-class theme_icon_finder implements icon_finder {
- protected $themename;
- /**
- * Constructor
- * @param theme_config $theme the theme we are finding icons for.
- */
- public function __construct($theme) {
- $this->themename = $theme->name;
- }
-
- /**
- * Implement interface method.
- * @param string $iconname the name of the icon.
- * @return string the URL for that icon.
- */
- public function old_icon_url($iconname) {
- global $CFG;
- if (file_exists($CFG->themedir . '/' . $this->themename . '/pix/' . $iconname . '.png')) {
- return $CFG->httpsthemewww . '/' . $this->themename . '/pix/' . $iconname . '.png';
- } else {
- return $CFG->httpsthemewww . '/' . $this->themename . '/pix/' . $iconname . '.gif';
- }
- }
-
- /**
- * Implement interface method.
- * @param string $iconname the name of the icon.
- * @param string $module the module the icon belongs to.
- * @return string the URL for that icon.
- */
- public function mod_icon_url($iconname, $module) {
- global $CFG;
- if (file_exists($CFG->themedir . '/' . $this->themename . '/pix/mod/' . $module . '/' . $iconname . '.png')) {
- return $CFG->httpsthemewww . '/' . $this->themename . '/pix/mod/' . $module . '/' . $iconname . '.png';
- } else {
- return $CFG->httpsthemewww . '/' . $this->themename . '/pix/mod/' . $module . '/' . $iconname . '.gif';
- }
- }
-}
-
-
-/**
- * This icon finder implements the algorithm in pix/smartpix.php.
- *
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- * @since Moodle 2.0
- */
-class smartpix_icon_finder extends pix_icon_finder {
- protected $places = array();
-
- /**
- * Constructor
- * @param theme_config $theme the theme we are finding icons for.
- */
- public function __construct($theme) {
- global $CFG;
- $this->places[$CFG->themedir . '/' . $theme->name . '/pix/'] =
- $CFG->httpsthemewww . '/' . $theme->name . '/pix/';
- if (!empty($theme->parent)) {
- $this->places[$CFG->themedir . '/' . $theme->parent . '/pix/'] =
- $CFG->httpsthemewww . '/' . $theme->parent . '/pix/';
- }
- }
-
- /**
- * Implement interface method.
- * @param string $iconname the name of the icon.
- * @return string the URL for that icon.
- */
- public function old_icon_url($iconname) {
- foreach ($this->places as $dirroot => $urlroot) {
- if (file_exists($dirroot . $iconname . '.png')) {
- return $dirroot . $iconname . '.png';
- } else if (file_exists($dirroot . $iconname . '.gif')) {
- return $dirroot . $iconname . '.gif';
- }
- }
- return parent::old_icon_url($iconname);
- }
-
- /**
- * Implement interface method.
- * @param string $iconname the name of the icon.
- * @param string $module the module the icon belongs to.
- * @return string the URL for that icon.
- */
- public function mod_icon_url($iconname, $module) {
- foreach ($this->places as $dirroot => $urlroot) {
- if (file_exists($dirroot . 'mod/' . $iconname . '.png')) {
- return $dirroot . 'mod/' . $iconname . '.png';
- } else if (file_exists($dirroot . 'mod/' . $iconname . '.gif')) {
- return $dirroot . 'mod/' . $iconname . '.gif';
- }
- }
- return parent::old_icon_url($iconname, $module);
- }
-}
-
-
-/**
- * Output CSS while replacing constants/variables. See MDL-6798 for details
- *
- * Information from Urs Hunkler:
- *
- * This is an adaptation of Shaun Inman's "CSS Server-side Constants" for Moodle.
- * http://www.shauninman.com/post/heap/2005/08/09/css_constants
- *
- * To use, specify $THEME->customcssoutputfunction = 'output_css_replacing_constants';
- * in your theme's config.php file.
- *
- * The constant definitions are written into a separate CSS file named like
- * constants.css and loaded first in config.php. You can use constants for any
- * CSS properties. The constant definition looks like:
- * <code>
- * \@server constants {
- * fontColor: #3a2830;
- * aLink: #116699;
- * aVisited: #AA2200;
- * aHover: #779911;
- * pageBackground: #FFFFFF;
- * backgroundColor: #EEEEEE;
- * backgroundSideblockHeader: #a8a4e9;
- * fontcolorSideblockHeader: #222222;
- * color1: #98818b;
- * color2: #bd807b;
- * color3: #f9d1d7;
- * color4: #e8d4d8;
- * }
- * </code>
- *
- * The lines in the CSS files using CSS constants look like:
- * <code>
- * body {
- * font-size: 100%;
- * background-color: pageBackground;
- * color: fontColor;
- * font-family: 'Bitstream Vera Serif', georgia, times, serif;
- * margin: 0;
- * padding: 0;
- * }
- * div#page {
- * margin: 0 10px;
- * padding-top: 5px;
- * border-top-width: 10px;
- * border-top-style: solid;
- * border-top-color: color3;
- * }
- * div.clearer {
- * clear: both;
- * }
- * a:link {
- * color: aLink;
- * }
- * </code>
- *
- * @param array $files an array of the CSS fields that need to be output.
- * @param array $toreplace for convenience. If you are going to output the names
- * of the css files, for debugging purposes, then you should output
- * str_replace($toreplace, '', $file); because it looks prettier.
- * @return void
- */
-function output_css_replacing_constants($files, $toreplace) {
- // Get all the CSS.
- ob_start();
- foreach ($files as $file) {
- $shortname = str_replace($toreplace, '', $file);
- echo '/******* ' . $shortname . " start *******/\n\n";
- @include_once($file);
- echo '/******* ' . $shortname . " end *******/\n\n";
- }
- $css = ob_get_contents();
- ob_end_clean();
-
- if (preg_match_all("/@server\s+(?:variables|constants)\s*\{\s*([^\}]+)\s*\}\s*/i", $css, $matches)) {
- $variables = array();
- foreach ($matches[0] as $key => $server) {
- $css = str_replace($server, '', $css);
- preg_match_all("/([^:\}\s]+)\s*:\s*([^;\}]+);/", $matches[1][$key], $vars);
- foreach ($vars[1] as $var => $value) {
- $variables[$value] = $vars[2][$var];
- }
- }
- $css = str_replace(array_keys($variables), array_values($variables), $css);
- }
- echo $css;
-}
-
-/**
- * This CSS output function will link to CSS files rather than including them
- * inline.
- *
- * The single CSS files can then be edited and saved with interactive
- * CSS editors like CSSEdit. Any files that have a .php extension are still included
- * inline.
- *
- * @param array $files an array of the CSS fields that need to be output.
- * @param array $toreplace for convenience. If you are going to output the names
- * of the css files, for debugging purposes, then you should output
- * str_replace($toreplace, '', $file); because it looks prettier.
- * @return void
- */
-function output_css_for_css_edit($files, $toreplace) {
- foreach ($files as $file) {
- $shortname = str_replace($toreplace, '', $file);
- echo '/* @group ' . $shortname . " */\n\n";
- if (strpos($file, '.css') !== false) {
- echo '@import url("' . $file . '");'."\n\n";
- } else {
- @include_once($file);
- }
- echo "/* @end */\n\n";
- }
-}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since Moodle 2.0
*/
-class moodle_renderer_base {
+class renderer_base {
/** @var xhtml_container_stack the xhtml_container_stack to use. */
protected $opencontainers;
/** @var moodle_page the page we are rendering for. */
return $classes;
}
- /**
- * Return the URL for an icon identified as in pre-Moodle 2.0 code.
- *
- * Suppose you have old code like $url = "$CFG->pixpath/i/course.gif";
- * then old_icon_url('i/course'); will return the equivalent URL that is correct now.
- *
- * @param string $iconname the name of the icon.
- * @return string the URL for that icon.
- */
- public function old_icon_url($iconname) {
- return $this->page->theme->old_icon_url($iconname);
+ /** OBSOLETED: to be removed soon */
+ public function old_icon_url($iconname, $component='moodle', $escaped=true) {
+ $url = $this->page->theme->image_url($iconname, $component);
+ return $url->out(false, array(), $escaped);
+ }
+
+ /** OBSOLETED: to be removed soon */
+ public function mod_icon_url($iconname, $component, $escaped=true) {
+ $url = $this->page->theme->image_url($iconname, $component);
+ return $url->out(false, array(), $escaped);
}
/**
- * Return the URL for an icon identified as in pre-Moodle 2.0 code.
+ * Return the moodle_url for an image
*
- * Suppose you have old code like $url = "$CFG->modpixpath/$mod/icon.gif";
- * then mod_icon_url('icon', $mod); will return the equivalent URL that is correct now.
- *
- * @param string $iconname the name of the icon.
- * @param string $module the module the icon belongs to.
- * @return string the URL for that icon.
+ * @param string $imagename the name of the image
+ * @param string $component full plugin name
+ * @return moodle_url
*/
- public function mod_icon_url($iconname, $module) {
- return $this->page->theme->mod_icon_url($iconname, $module);
+ public function image_url($imagename, $component='moodle') {
+ return $this->page->theme->image_url($imagename, $component);
}
/**
/**
- * This is the templated renderer which copies the API of another class, replacing
- * all methods calls with instantiation of a template.
- *
- * When the method method_name is called, this class will search for a template
- * called method_name.php in the folders in $searchpaths, taking the first one
- * that it finds. Then it will set up variables for each of the arguments of that
- * method, and render the template. This is implemented in the {@link __call()}
- * PHP magic method.
- *
- * Methods like print_box_start and print_box_end are handles specially, and
- * implemented in terms of the print_box.php method.
- *
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- * @since Moodle 2.0
- */
-class template_renderer extends moodle_renderer_base {
- /** @var ReflectionClass information about the class whose API we are copying. */
- protected $copiedclass;
- /** @var array of places to search for templates. */
- protected $searchpaths;
- protected $rendererfactory;
-
- /**
- * Magic word used when breaking apart container templates to implement
- * _start and _end methods.
- */
- const CONTENTSTOKEN = '-@#-Contents-go-here-#@-';
-
- /**
- * Constructor
- * @param string $copiedclass the name of a class whose API we should be copying.
- * @param array $searchpaths a list of folders to search for templates in.
- * @param moodle_page $page the page we are doing output for.
- */
- public function __construct($copiedclass, $searchpaths, $page) {
- parent::__construct($page);
- $this->copiedclass = new ReflectionClass($copiedclass);
- $this->searchpaths = $searchpaths;
- }
-
- /**
- * PHP magic method implementation. Do not use this method directly.
- * @param string $method The method to call
- * @param array $arguments The arguments to pass to the method
- * @return mixed The return value of the called method
- */
- public function __call($method, $arguments) {
- if (substr($method, -6) == '_start') {
- return $this->process_start(substr($method, 0, -6), $arguments);
- } else if (substr($method, -4) == '_end') {
- return $this->process_end(substr($method, 0, -4), $arguments);
- } else {
- return $this->process_template($method, $arguments);
- }
- }
-
- /**
- * Render the template for a given method of the renderer class we are copying,
- * using the arguments passed.
- * @param string $method the method that was called.
- * @param array $arguments the arguments that were passed to it.
- * @return string the HTML to be output.
- */
- protected function process_template($method, $arguments) {
- if (!$this->copiedclass->hasMethod($method) ||
- !$this->copiedclass->getMethod($method)->isPublic()) {
- throw new coding_exception('Unknown method ' . $method);
- }
-
- // Find the template file for this method.
- $template = $this->find_template($method);
-
- // Use the reflection API to find out what variable names the arguments
- // should be stored in, and fill in any missing ones with the defaults.
- $namedarguments = array();
- $expectedparams = $this->copiedclass->getMethod($method)->getParameters();
- foreach ($expectedparams as $param) {
- $paramname = $param->getName();
- if (!empty($arguments)) {
- $namedarguments[$paramname] = array_shift($arguments);
- } else if ($param->isDefaultValueAvailable()) {
- $namedarguments[$paramname] = $param->getDefaultValue();
- } else {
- throw new coding_exception('Missing required argument ' . $paramname);
- }
- }
-
- // Actually render the template.
- return $this->render_template($template, $namedarguments);
- }
-
- /**
- * Actually do the work of rendering the template.
- * @param string $_template the full path to the template file.
- * @param array $_namedarguments an array variable name => value, the variables
- * that should be available to the template.
- * @return string the HTML to be output.
- */
- protected function render_template($_template, $_namedarguments) {
- // Note, we intentionally break the coding guidelines with regards to
- // local variable names used in this function, so that they do not clash
- // with the names of any variables being passed to the template.
-
- global $CFG, $SITE, $THEME, $USER;
- // The next lines are a bit tricky. The point is, here we are in a method
- // of a renderer class, and this object may, or may not, be the same as
- // the global $OUTPUT object. When rendering the template, we want to use
- // this object. However, people writing Moodle code expect the current
- // renderer to be called $OUTPUT, not $this, so define a variable called
- // $OUTPUT pointing at $this. The same comment applies to $PAGE and $COURSE.
- $OUTPUT = $this;
- $PAGE = $this->page;
- $COURSE = $this->page->course;
-
- // And the parameters from the function call.
- extract($_namedarguments);
-
- // Include the template, capturing the output.
- ob_start();
- include($_template);
- $_result = ob_get_contents();
- ob_end_clean();
-
- return $_result;
- }
-
- /**
- * Searches the folders in {@link $searchpaths} to try to find a template for
- * this method name. Throws an exception if one cannot be found.
- * @param string $method the method name.
- * @return string the full path of the template to use.
- */
- protected function find_template($method) {
- foreach ($this->searchpaths as $path) {
- $filename = $path . '/' . $method . '.php';
- if (file_exists($filename)) {
- return $filename;
- }
- }
- throw new coding_exception('Cannot find template for ' . $this->copiedclass->getName() . '::' . $method);
- }
-
- /**
- * Handle methods like print_box_start by using the print_box template,
- * splitting the result, pushing the end onto the stack, then returning the start.
- * @param string $method the method that was called, with _start stripped off.
- * @param array $arguments the arguments that were passed to it.
- * @return string the HTML to be output.
- */
- protected function process_start($method, $arguments) {
- array_unshift($arguments, self::CONTENTSTOKEN);
- $html = $this->process_template($method, $arguments);
- list($start, $end) = explode(self::CONTENTSTOKEN, $html, 2);
- $this->opencontainers->push($method, $end);
- return $start;
- }
-
- /**
- * Handle methods like print_box_end, we just need to pop the end HTML from
- * the stack.
- * @param string $method the method that was called, with _end stripped off.
- * @param array $arguments not used. Assumed to be irrelevant.
- * @return string the HTML to be output.
- */
- protected function process_end($method, $arguments) {
- return $this->opencontainers->pop($method);
- }
-
- /**
- * @return array the list of paths where this class searches for templates.
- */
- public function get_search_paths() {
- return $this->searchpaths;
- }
-
- /**
- * @return string the name of the class whose API we are copying.
- */
- public function get_copied_class() {
- return $this->copiedclass->getName();
- }
-}
-
-/**
- * The standard implementation of the moodle_core_renderer interface.
+ * The standard implementation of the core_renderer interface.
*
* @copyright 2009 Tim Hunt
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since Moodle 2.0
*/
-class moodle_core_renderer extends moodle_renderer_base {
+class core_renderer extends renderer_base {
/** @var string used in {@link header()}. */
const PERFORMANCE_INFO_TOKEN = '%%PERFORMANCEINFO%%';
/** @var string used in {@link header()}. */
}
}
- /// Perform a browser environment check for the flash version. Should only run once per login session.
+ // Get the theme stylesheet - this has to be always first CSS, this loads also styles.css from all plugins;
+ // any other custom CSS can not be overridden via themes and is highly discouraged
+ $urls = $this->page->theme->css_urls();
+ foreach ($urls as $url) {
+ $output .= '<link rel="stylesheet" type="text/css" href="' . $url->out() . '" />' . "\n";
+ }
+
+ // Perform a browser environment check for the flash version. Should only run once per login session.
if (isloggedin() && !empty($CFG->excludeoldflashclients) && empty($SESSION->flashversion)) {
$this->page->requires->yui_lib('event')->in_head();
$this->page->requires->yui_lib('connection')->in_head();
$this->page->requires->js_function_call('setflashversiontosession', array($CFG->wwwroot, sesskey()));
}
- // Add the meta tags from the themes if any were requested.
- $output .= $this->page->theme->get_meta_tags($this->page);
-
// Get any HTML from the page_requirements_manager.
$output .= $this->page->requires->get_head_code();
$this->page->set_state(moodle_page::STATE_PRINTING_HEADER);
- // Find the appropriate page template, based on $this->page->generaltype.
- $templatefile = $this->page->theme->template_for_page($this->page->generaltype);
+ // Find the appropriate page layout file, based on $this->page->pagelayout.
+ $layoutfile = $this->page->theme->layout_file($this->page->pagelayout);
+ // Render the layout using the layout file.
+ $rendered = $this->render_page_layout($layoutfile);
- if ($templatefile) {
- // Render the template.
- $template = $this->render_page_template($templatefile);
- } else {
- // New style template not found, fall back to using header.html and footer.html.
- $template = $this->handle_legacy_theme();
- }
-
- // Slice the template output into header and footer.
- $cutpos = strpos($template, self::MAIN_CONTENT_TOKEN);
+ // Slice the rendered output into header and footer.
+ $cutpos = strpos($rendered, self::MAIN_CONTENT_TOKEN);
if ($cutpos === false) {
- throw new coding_exception('Layout template ' . $templatefile .
+ throw new coding_exception('page layout file ' . $layoutfile .
' does not contain the string "' . self::MAIN_CONTENT_TOKEN . '".');
}
- $header = substr($template, 0, $cutpos);
- $footer = substr($template, $cutpos + strlen(self::MAIN_CONTENT_TOKEN));
+ $header = substr($rendered, 0, $cutpos);
+ $footer = substr($rendered, $cutpos + strlen(self::MAIN_CONTENT_TOKEN));
if (empty($this->contenttype)) {
- debugging('The layout template did not call $OUTPUT->doctype()');
+ debugging('The page layout file did not call $OUTPUT->doctype()');
$header = $this->doctype() . $header;
}
}
/**
- * Renders and outputs the page template.
- * @param string $templatefile The name of the template's file
- * @param array $menu The menu that will be used in the included file
- * @param array $navigation The navigation that will be used in the included file
+ * Renders and outputs the page layout file.
+ * @param string $layoutfile The name of the layout file
* @return string HTML code
*/
- protected function render_page_template($templatefile) {
+ protected function render_page_layout($layoutfile) {
global $CFG, $SITE, $THEME, $USER;
// The next lines are a bit tricky. The point is, here we are in a method
// of a renderer class, and this object may, or may not, be the same as
- // the global $OUTPUT object. When rendering the template, we want to use
+ // the global $OUTPUT object. When rendering the page layout file, we want to use
// this object. However, people writing Moodle code expect the current
// renderer to be called $OUTPUT, not $this, so define a variable called
// $OUTPUT pointing at $this. The same comment applies to $PAGE and $COURSE.
$PAGE = $this->page;
$COURSE = $this->page->course;
- // Required for legacy template uses
- $navigation = $this->page->has_navbar();
-
- ob_start();
- include($templatefile);
- $template = ob_get_contents();
- ob_end_clean();
- return $template;
- }
-
- /**
- * Renders and outputs a legacy template.
- * @param array $navigation The navigation that will be used in the included file
- * @param array $menu The menu that will be used in the included file
- * @return string HTML code
- */
- protected function handle_legacy_theme() {
- global $CFG, $SITE, $USER;
- // Set a pretend global from the properties of this class.
- // See the comment in render_page_template for a fuller explanation.
- $COURSE = $this->page->course;
- $THEME = $this->page->theme;
- $OUTPUT = $this;
-
- // Set up local variables that header.html expects.
- $direction = $this->htmlattributes();
- $title = $this->page->title;
- $heading = $this->page->heading;
- $focus = $this->page->focuscontrol;
- $button = $this->page->button;
- $pageid = $this->page->pagetype;
- $pageclass = $this->page->bodyclasses;
- $bodytags = ' class="' . $pageclass . '" id="' . $pageid . '"';
- $home = $this->page->generaltype == 'home';
- $menu = $this->page->headingmenu;
-
- $meta = $this->standard_head_html();
- // The next line is a nasty hack. having set $meta to standard_head_html, we have already
- // got the contents of include($CFG->javascript). However, legacy themes are going to
- // include($CFG->javascript) again. We want to make sure that when they do, nothing is output.
- $CFG->javascript = $CFG->libdir . '/emptyfile.php';
-
- // Set up local variables that footer.html expects.
- $homelink = $this->home_link();
- $loggedinas = $this->login_info();
- $course = $this->page->course;
- $performanceinfo = self::PERFORMANCE_INFO_TOKEN;
-
- $navigation = $this->page->has_navbar();
- if (!$menu && $navigation) {
- $menu = $loggedinas;
- }
-
- if (!empty($this->page->theme->layouttable)) {
- $lt = $this->page->theme->layouttable;
- } else {
- $lt = array('left', 'middle', 'right');
- }
-
- if (!empty($this->page->theme->block_l_max_width)) {
- $preferredwidthleft = $this->page->theme->block_l_max_width;
- } else {
- $preferredwidthleft = 210;
- }
- if (!empty($this->page->theme->block_r_max_width)) {
- $preferredwidthright = $this->page->theme->block_r_max_width;
- } else {
- $preferredwidthright = 210;
- }
-
ob_start();
- include($this->page->theme->dir . '/header.html');
-
- echo '<table id="layout-table"><tr>';
- foreach ($lt as $column) {
- if ($column == 'left' && $this->page->blocks->region_has_content(BLOCK_POS_LEFT, $this)) {
- echo '<td id="left-column" class="block-region" style="width: ' . $preferredwidthright . 'px; vertical-align: top;">';
- echo $this->container_start();
- echo $this->blocks_for_region(BLOCK_POS_LEFT);
- echo $this->container_end();
- echo '</td>';
-
- } else if ($column == 'middle') {
- echo '<td id="middle-column" style="vertical-align: top;">';
- echo $this->container_start();
- echo $this->skip_link_target();
- echo self::MAIN_CONTENT_TOKEN;
- echo $this->container_end();
- echo '</td>';
-
- } else if ($column == 'right' && $this->page->blocks->region_has_content(BLOCK_POS_RIGHT, $this)) {
- echo '<td id="right-column" class="block-region" style="width: ' . $preferredwidthright . 'px; vertical-align: top;">';
- echo $this->container_start();
- echo $this->blocks_for_region(BLOCK_POS_RIGHT);
- echo $this->container_end();
- echo '</td>';
- }
- }
- echo '</tr></table>';
-
- $menu = str_replace('navmenu', 'navmenufooter', $menu);
- include($THEME->dir . '/footer.html');
-
- $output = ob_get_contents();
+ include($layoutfile);
+ $rendered = ob_get_contents();
ob_end_clean();
-
- // Put in the start of body code. Bit of a hack, put it in before the first
- // <div or <table.
- $divpos = strpos($output, '<div');
- $tablepos = strpos($output, '<table');
- if ($divpos === false || ($tablepos !== false && $tablepos < $divpos)) {
- $pos = $tablepos;
- } else {
- $pos = $divpos;
- }
- $output = substr($output, 0, $divpos) . $this->standard_top_of_body_html() .
- substr($output, $divpos);
-
- // Put in the end token before the end of body.
- $output = str_replace('</body>', self::END_HTML_TOKEN . '</body>', $output);
-
- // Make sure we use the correct doctype.
- $output = preg_replace('/(<!DOCTYPE.+?>)/s', $this->doctype(), $output);
-
- return $output;
+ return $rendered;
}
/**
foreach ($controls as $control) {
$controlshtml[] = $this->output_tag('a', array('class' => 'icon',
'title' => $control['caption'], 'href' => $control['url']),
- $this->output_empty_tag('img', array('src' => $this->old_icon_url($control['icon']),
+ $this->output_empty_tag('img', array('src' => $this->image_url($control['icon'])->out(false, array(), false),
'alt' => $control['caption'])));
}
return $this->output_tag('div', array('class' => 'commands'), implode('', $controlshtml));
$plaintitle = strip_tags($bc->title);
$this->page->requires->js_function_call('new block_hider', array($bc->id, $userpref,
get_string('hideblocka', 'access', $plaintitle), get_string('showblocka', 'access', $plaintitle),
- $this->old_icon_url('t/switch_minus'), $this->old_icon_url('t/switch_plus')));
+ $this->image_url('t/switch_minus')->out(false, array(), false), $this->image_url('t/switch_plus')->out(false, array(), false)));
}
}
if (!empty($iconpath)) {
$icon->image->src = $iconpath;
} else {
- $icon->image->src = $this->old_icon_url('docs');
+ $icon->image->src = $this->image_url('docs')->out(false, array(), false);
}
if (!empty($CFG->doctonewwindow)) {
$image = clone($image);
if (empty($image->src)) {
- $image->src = $this->old_icon_url('spacer');
+ $image->src = $this->image_url('spacer')->out(false, array(), false);
}
$image->prepare();
// Header not yet printed
if (isset($_SERVER['SERVER_PROTOCOL'])) {
- // server protocol should be always present, because this render
- // can not be used from command line or when outputting custom XML
+ // server protocol should be always present, because this render
+ // can not be used from command line or when outputting custom XML
@header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
}
$this->page->set_url(''); // no url
- //$this->page->set_generaltype('form'); //TODO: MDL-20676 blocks on error pages are weird, unfortunately it somehow detect the geenralpagetype from URL :-(
+ //$this->page->set_pagelayout('form'); //TODO: MDL-20676 blocks on error pages are weird, unfortunately it somehow detect the geenralpagetype from URL :-(
$this->page->set_title(get_string('error'));
$output .= $this->header();
}
*/
public function notification($message, $classes = 'notifyproblem') {
return $this->output_tag('div', array('class' =>
- moodle_renderer_base::prepare_classes($classes)), clean_text($message));
+ renderer_base::prepare_classes($classes)), clean_text($message));
}
/**
$oddeven = 1;
$keys = array_keys($table->data);
$lastrowkey = end($keys);
- $output .= $this->output_start_tag('tbody', array('class' => moodle_renderer_base::prepare_classes($table->bodyclasses))) . "\n";
+ $output .= $this->output_start_tag('tbody', array('class' => renderer_base::prepare_classes($table->bodyclasses))) . "\n";
foreach ($table->data as $key => $row) {
if (($row === 'hr') && ($countcols)) {
throw new coding_exception('Heading level must be an integer between 1 and 6.');
}
return $this->output_tag('h' . $level,
- array('id' => $id, 'class' => moodle_renderer_base::prepare_classes($classes)), $text);
+ array('id' => $id, 'class' => renderer_base::prepare_classes($classes)), $text);
}
/**
public function box_start($classes = 'generalbox', $id = '') {
$this->opencontainers->push('box', $this->output_end_tag('div'));
return $this->output_start_tag('div', array('id' => $id,
- 'class' => 'box ' . moodle_renderer_base::prepare_classes($classes)));
+ 'class' => 'box ' . renderer_base::prepare_classes($classes)));
}
/**
public function container_start($classes = '', $id = '') {
$this->opencontainers->push('container', $this->output_end_tag('div'));
return $this->output_start_tag('div', array('id' => $id,
- 'class' => moodle_renderer_base::prepare_classes($classes)));
+ 'class' => renderer_base::prepare_classes($classes)));
}
/**
public function navbar() {
return $this->page->navbar->content();
}
- }
+}
/// RENDERERS
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since Moodle 2.0
*/
-class cli_core_renderer extends moodle_core_renderer {
+class cli_core_renderer extends core_renderer {
/**
* Returns the page header.
* @return string HTML fragment
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since Moodle 2.0
*
- * @property-read string $generaltype the general type of page this is. For example 'normal', 'popup', 'home'.
+ * @property-read string $pagelayout the general type of page this is. For example 'normal', 'popup', 'home'.
* Allows the theme to display things differently, if it wishes to.
* @property-read string $title the title that should go in the <head> section of the HTML of this page.
* @property-read string $heading the main heading that should be displayed at the top of the <body>.
protected $_pagetype = null;
- protected $_generaltype = 'normal';
+ protected $_pagelayout = 'normal';
+
+ /**
+ * List of theme layeout options, these are ignored by core.
+ * To be used in individual theme layout files only.
+ * @var array
+ */
+ protected $_layout_options = array();
protected $_subpage = '';
* This is simply to improve backwards compatability. If old code relies on
* a page class that implements print_header, or complex logic in
* user_allowed_editing then we stash an instance of that other class here,
- * and delegate to it in certani situations.
+ * and delegate to it in certain situations.
*/
protected $_legacypageobject = null;
}
/**
- * Please do not call this method directly, use the ->generaltype syntax. {@link __get()}.
+ * Please do not call this method directly, use the ->pagelayout syntax. {@link __get()}.
* @return string the general type of page this is. For example 'normal', 'popup', 'home'.
* Allows the theme to display things differently, if it wishes to.
*/
- public function get_generaltype() {
- return $this->_generaltype;
+ public function get_pagelayout() {
+ return $this->_pagelayout;
+ }
+
+ /**
+ * Please do not call this method directly, use the ->layout_tions syntax. {@link __get()}.
+ * @return returns arrys with options for layout file
+ */
+ public function get_layout_options() {
+ return $this->_layout_options;
}
/**
* @return blocks_manager the blocks manager object for this page.
*/
public function get_blocks() {
- global $CFG, $THEME;
+ global $CFG;
if (is_null($this->_blocks)) {
if (!empty($CFG->blockmanagerclass)) {
$classname = $CFG->blockmanagerclass;
*/
public function debug_summary() {
$summary = '';
- $summary .= 'General type: ' . $this->generaltype . '. ';
+ $summary .= 'General type: ' . $this->pagelayout . '. ';
if (!during_initial_install()) {
$summary .= 'Context ' . print_context_name($this->context) . ' (context id ' . $this->context->id . '). ';
}
}
/**
- * @param string $generaltype the general type of page this is. For example 'popup', 'home'.
+ * @param string $pagelayout the page layout this is. For example 'popup', 'home'.
* This properly defaults to 'normal', so you only need to call this function if
- * you want something different. The exact range of supported page types is not
- * strictly defined, this value is just passed to the theme. However, at the moment
- * only 'normal', 'popup' amd 'home' are used.
+ * you want something different. The exact range of supported layouts is specified
+ * in the standard theme.
*/
- public function set_generaltype($generaltype) {
- $this->_generaltype = $generaltype;
+ public function set_pagelayout($pagelayout) {
+ $this->_pagelayout = $pagelayout;
}
/**
if (!empty($CFG->loginhttps)) {
$HTTPSPAGEREQUIRED = true;
$CFG->httpswwwroot = str_replace('http:', 'https:', $CFG->wwwroot);
- $CFG->httpsthemewww = str_replace('http:', 'https:', $CFG->themewww);
} else {
$CFG->httpswwwroot = $CFG->wwwroot;
- $CFG->httpsthemewww = $CFG->themewww;
}
}
// Show the messaging popup, if there are messages.
message_popup_window();
- // Add any stylesheets required using the horrible legacy mechanism.
- if (!empty($CFG->stylesheets)) {
- debugging('Some code on this page is using the horrible legacy mechanism $CFG->stylesheets to include links to ' .
- 'extra stylesheets. This is deprecated. Please use $PAGE->requires->css(...) instead.', DEBUG_DEVELOPER);
- foreach ($CFG->stylesheets as $stylesheet) {
- $this->requires->css($stylesheet, true);
- }
- }
-
- // Require theme stylesheets.
- $stylesheets = $this->theme->get_stylesheet_urls();
- foreach ($stylesheets as $stylesheet) {
- $this->requires->css($stylesheet, true);
- }
-
$this->initialise_standard_body_classes();
}
if (is_null($this->_theme)) {
$themename = $this->resolve_theme();
$this->_theme = theme_config::load($themename);
+ $this->_layout_options = $this->_theme->pagelayout_options($this->pagelayout);
}
- $this->_theme->setup_blocks($this->generaltype, $this->blocks);
+ $this->_theme->setup_blocks($this->pagelayout, $this->blocks);
if ($this === $PAGE) {
$THEME = $this->_theme;
$OUTPUT = $this->_theme->get_renderer('core', $this);
- // Support legacy code.
- $this->_theme->setup_legacy_pix_paths();
}
$this->_wherethemewasinitialised = debug_backtrace();
require '../config.php';
$PAGE->set_url(new moodle_url($CFG->wwwroot.'/lib/session-test.php'));
-$PAGE->set_generaltype('form');
+$PAGE->set_pagelayout('form');
error('session test not reimplemented yet'); //DO NOT localize or use print_error()!
//
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+// special support for highly optimised scripts that do not need libraries and DB connection
+if (defined('ABORT_AFTER_CONFIG')) {
+ if (!defined('ABORT_AFTER_CONFIG_CANCEL')) {
+ require_once("$CFG->dirroot/lib/configonlylib.php");
+ return;
+ }
+}
+
/**
* Holds the core settings that affect how Moodle works. Some of its fields
* are set in config.php, and the rest are loaded from the config table.
global $COURSE;
/**
- * $OUTPUT is an instance of moodle_core_renderer or one of its subclasses. Use
+ * $OUTPUT is an instance of core_renderer or one of its subclasses. Use
* it to generate HTML for output.
*
* $OUTPUT is initialised the first time it is used. See {@link bootstrap_renderer}
// Set up some paths.
$CFG->libdir = $CFG->dirroot .'/lib';
-if (!isset($CFG->themedir)) {
- $CFG->themedir = $CFG->dirroot.'/theme';
- $CFG->themewww = $CFG->wwwroot.'/theme';
-}
-
// Set httpswwwroot default value (this variable will replace $CFG->wwwroot
// inside some URLs used in HTTPSPAGEREQUIRED pages.
$CFG->httpswwwroot = $CFG->wwwroot;
-$CFG->httpsthemewww = $CFG->themewww;
require_once($CFG->libdir .'/setuplib.php'); // Functions that MUST be loaded first
get_string('experimentalsettings', 'admin', NULL);
get_string('enableglobalsearch', 'admin', NULL);
get_string('configenableglobalsearch', 'admin', NULL);
-get_string('smartpix', 'admin', NULL);
-get_string('configsmartpix', 'admin', NULL);
get_string('enablehtmlpurifier', 'admin', NULL);
get_string('configenablehtmlpurifier', 'admin', NULL);
get_string('experimentalsplitrestore', 'admin', NULL);
old_get_string('experimentalsettings', 'admin', NULL);
old_get_string('enableglobalsearch', 'admin', NULL);
old_get_string('configenableglobalsearch', 'admin', NULL);
-old_get_string('smartpix', 'admin', NULL);
-old_get_string('configsmartpix', 'admin', NULL);
old_get_string('enablehtmlpurifier', 'admin', NULL);
old_get_string('configenablehtmlpurifier', 'admin', NULL);
old_get_string('experimentalsplitrestore', 'admin', NULL);
}
require_once($CFG->libdir . '/outputlib.php');
-
-/**
- * Unit tests for the pix_icon_finder class.
- *
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-class pix_icon_finder_test extends UnitTestCase {
- public function test_old_icon_url() {
- global $CFG;
- $if = new pix_icon_finder(new theme_config());
- $this->assertEqual($CFG->httpswwwroot . '/pix/i/course.gif', $if->old_icon_url('i/course'));
- }
-
- /* Implement interface method. */
- public function test_mod_icon_url() {
- global $CFG;
- $if = new pix_icon_finder(new theme_config());
- $this->assertEqual($CFG->httpswwwroot . '/mod/quiz/icon.gif', $if->mod_icon_url('icon', 'quiz'));
- }
-}
-
-
-/**
- * Unit tests for the standard_renderer_factory class.
- *
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-class theme_icon_finder_test extends UnitTestCase {
- public function test_old_icon_url_test() {
- global $CFG;
- $theme = new theme_config();
- $theme->name = 'test';
- $if = new theme_icon_finder($theme);
- $this->assertEqual($CFG->httpsthemewww . '/test/pix/i/course.gif', $if->old_icon_url('i/course'));
- }
-
- /* Implement interface method. */
- public function test_mod_icon_url() {
- global $CFG;
- $theme = new theme_config();
- $theme->name = 'test';
- $if = new theme_icon_finder($theme);
- $this->assertEqual($CFG->httpsthemewww . '/test/pix/mod/quiz/icon.gif', $if->mod_icon_url('icon', 'quiz'));
- }
-}
-
-
/**
* Subclass of renderer_factory_base for testing. Implement abstract method and
* count calls, so we can test caching behaviour.
if (!in_array(array($module, $subtype), $this->createcalls)) {
$this->createcalls[] = array($module, $subtype);
}
- return new moodle_core_renderer($page);
+ return new core_renderer($page);
}
- public function standard_renderer_class_for_module($module, $subtype=null) {
- return parent::standard_renderer_class_for_module($module, $subtype);
+ public function standard_renderer_class_for_plugin($module, $subtype=null) {
+ return parent::standard_renderer_class_for_plugin($module, $subtype);
}
}
* @copyright 2009 Tim Hunt
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class moodle_mod_test_renderer extends moodle_core_renderer {
+class mod_test_renderer extends core_renderer {
public function __construct($containerstack, $page) {
parent::__construct($containerstack, $page, null);
}
* @copyright 2009 David Mudrak
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class moodle_mod_test_subtype_renderer extends moodle_core_renderer {
+class mod_test_subtype_renderer extends core_renderer {
public function __construct($containerstack, $page) {
parent::__construct($containerstack, $page, null);
}
}
- public function test_standard_renderer_class_for_module_core() {
+ public function test_standard_renderer_class_for_plugin_core() {
// Set up.
$factory = new testable_renderer_factory();
// Exercise SUT.
- $classname = $factory->standard_renderer_class_for_module('core');
+ $classname = $factory->standard_renderer_class_for_plugin('core');
// Verify outcome
- $this->assertEqual('moodle_core_renderer', $classname);
+ $this->assertEqual('core_renderer', $classname);
}
- public function test_standard_renderer_class_for_module_test() {
+ public function test_standard_renderer_class_for_plugin_test() {
// Set up.
$factory = new testable_renderer_factory();
// Exercise SUT.
- $classname = $factory->standard_renderer_class_for_module('mod_test');
+ $classname = $factory->standard_renderer_class_for_plugin('mod_test');
// Verify outcome
- $this->assertEqual('moodle_mod_test_renderer', $classname);
+ $this->assertEqual('mod_test_renderer', $classname);
}
- public function test_standard_renderer_class_for_module_test_with_subtype() {
+ public function test_standard_renderer_class_for_plugin_test_with_subtype() {
// Set up.
$factory = new testable_renderer_factory();
// Exercise SUT.
- $classname = $factory->standard_renderer_class_for_module('mod_test', 'subtype');
+ $classname = $factory->standard_renderer_class_for_plugin('mod_test', 'subtype');
// Verify outcome
- $this->assertEqual('moodle_mod_test_subtype_renderer', $classname);
+ $this->assertEqual('mod_test_subtype_renderer', $classname);
}
- public function test_standard_renderer_class_for_module_unknown() {
+ public function test_standard_renderer_class_for_plugin_unknown() {
// Set up.
$factory = new testable_renderer_factory();
$this->expectException();
// Exercise SUT.
- $classname = $factory->standard_renderer_class_for_module('something_that_does_not_exist');
+ $classname = $factory->standard_renderer_class_for_plugin('something_that_does_not_exist');
}
}
public function test_get_core_renderer() {
$renderer = $this->factory->get_renderer('core', new moodle_page);
- $this->assertIsA($renderer, 'moodle_core_renderer');
- }
-
- public function test_get_test_renderer() {
- $renderer = $this->factory->get_renderer('mod_test', new moodle_page);
- $this->assertIsA($renderer, 'moodle_mod_test_renderer');
- }
-
- public function test_get_test_subtype_renderer() {
- $renderer = $this->factory->get_renderer('mod_test', new moodle_page, 'subtype');
- $this->assertIsA($renderer, 'moodle_mod_test_subtype_renderer');
- }
-}
-
-
-/**
- * Unit tests for the custom_corners_renderer_factory class.
- *
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-class custom_corners_renderer_factory_test extends UnitTestCase {
-
- public static $includecoverage = array('lib/outputrenderers.php', 'lib/outputcomponents.php');
- protected $factory;
-
- public function setUp() {
- parent::setUp();
- $this->factory = new custom_corners_renderer_factory(null, null);
- }
-
- public function tearDown() {
- $this->factory = null;
- parent::tearDown();
- }
-
- public function test_get_core_renderer() {
- $renderer = $this->factory->get_renderer('core', new moodle_page);
- $this->assertIsA($renderer, 'custom_corners_core_renderer');
+ $this->assertIsA($renderer, 'core_renderer');
}
public function test_get_test_renderer() {
$renderer = $this->factory->get_renderer('mod_test', new moodle_page);
- $this->assertIsA($renderer, 'moodle_mod_test_renderer');
+ $this->assertIsA($renderer, 'mod_test_renderer');
}
public function test_get_test_subtype_renderer() {
$renderer = $this->factory->get_renderer('mod_test', new moodle_page, 'subtype');
- $this->assertIsA($renderer, 'moodle_mod_test_subtype_renderer');
+ $this->assertIsA($renderer, 'mod_test_subtype_renderer');
}
}
* @copyright 2009 Tim Hunt
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class theme_overridden_renderer_factory_test extends UnitTestCase {
+/*class theme_overridden_renderer_factory_test extends UnitTestCase { // TODO: MDL-21138 rewrite theme unit tests
public static $includecoverage = array('lib/outputlib.php');
protected $originalcfgthemedir;
public function setUp() {
global $CFG;
parent::setUp();
+
$this->originalcfgthemedir = $CFG->themedir;
$this->workspace = 'temp/theme_overridden_renderer_factory_fixtures';
}
protected function write_renderers_file($theme, $code) {
- $filename = $theme->dir . '/renderers.php';
+ $filename = $theme->dir . '/lib.php';
file_put_contents($filename, "<?php\n" . $code);
}
$subrenderer = $factory->get_renderer('mod_test', new moodle_page, 'subtype');
// Verify outcome
- $this->assertIsA($renderer, 'moodle_mod_test_renderer');
- $this->assertIsA($subrenderer, 'moodle_mod_test_subtype_renderer');
+ $this->assertIsA($renderer, 'mod_test_renderer');
+ $this->assertIsA($subrenderer, 'mod_test_subtype_renderer');
}
public function test_get_renderer_overridden() {
// Set up - be very careful because the class under test uses require-once. Pick a unique theme name.
$theme = $this->make_theme('testrenderertheme');
$this->write_renderers_file($theme, '
- class testrenderertheme_mod_test_renderer extends moodle_mod_test_renderer {
+ class testrenderertheme_mod_test_renderer extends mod_test_renderer {
}');
$factory = new testable_theme_overridden_renderer_factory($theme, $this->page);
// Verify outcome
$this->assertIsA($renderer, 'testrenderertheme_mod_test_renderer');
- $this->assertIsA($subrenderer, 'moodle_mod_test_subtype_renderer');
+ $this->assertIsA($subrenderer, 'mod_test_subtype_renderer');
}
public function test_get_renderer_overridden_in_parent() {
$parenttheme = $this->make_theme('parentrenderertheme');
$this->write_renderers_file($theme, '');
$this->write_renderers_file($parenttheme, '
- class parentrenderertheme_core_renderer extends moodle_core_renderer {
+ class parentrenderertheme_core_renderer extends core_renderer {
}');
$factory = new testable_theme_overridden_renderer_factory($theme, $this->page);
$theme->parent = 'ptheme';
$parenttheme = $this->make_theme('ptheme');
$this->write_renderers_file($theme, '
- class ctheme_core_renderer extends moodle_core_renderer {
+ class ctheme_core_renderer extends core_renderer {
}');
$this->write_renderers_file($parenttheme, '
- class ptheme_core_renderer extends moodle_core_renderer {
+ class ptheme_core_renderer extends core_renderer {
}');
$factory = new testable_theme_overridden_renderer_factory($theme, $this->page);
// Verify outcome
$this->assertIsA($renderer, 'ctheme_core_renderer');
}
-}
-
-
-/**
- * Test-specific subclass that implements a getter for $searchpaths.
- *
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-class testable_template_renderer_factory extends template_renderer_factory {
-
- public static $includecoverage = array('lib/outputrenderers.php', 'lib/outputcomponents.php');
- public function get_search_paths() {
- return $this->searchpaths;
- }
-}
-
-
-/**
- * Unit tests for the template_renderer_factory class.
- *
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-class template_renderer_factory_test extends UnitTestCase {
-
- public static $includecoverage = array('lib/outputrenderers.php', 'lib/outputcomponents.php');
- protected $originalcfgthemedir;
- protected $workspace;
- protected $page;
- protected $foldertocleanup = null;
-
- public function setUp() {
- global $CFG;
- parent::setUp();
- $this->originalcfgthemedir = $CFG->themedir;
-
- $this->workspace = 'temp/template_renderer_factory_fixtures';
- make_upload_directory($this->workspace);
- $CFG->themedir = $CFG->dataroot . '/' . $this->workspace;
- $this->foldertocleanup = $CFG->themedir;
-
- $this->page = new moodle_page;
- }
-
- public function tearDown() {
- global $CFG;
- if (!empty($this->foldertocleanup)) {
- fulldelete($this->foldertocleanup);
- $this->foldertocleanup = null;
- }
- $CFG->themedir = $this->originalcfgthemedir;
- parent::tearDown();
- }
-
- protected function make_theme($name) {
- global $CFG;
- $theme = new stdClass;
- $theme->name = $name;
- $theme->dir = $CFG->themedir . '/' . $name;
- make_upload_directory($this->workspace . '/' . $name);
- return $theme;
- }
-
- protected function make_theme_template_dir($name, $module = '', $submodule = '') {
- $path = $this->workspace . '/' . $name . '/templates';
- if ($module) {
- $path .= '/' . $module;
- }
- if ($submodule) {
- $path .= '/' . $submodule;
- }
- make_upload_directory($path);
- }
-
- public function test_constructor_standardtemplate() {
- global $CFG;
- // Set up.
- $theme = $this->make_theme('standardtemplate');
- $this->make_theme_template_dir('standardtemplate');
-
- // Exercise SUT.
- $factory = new testable_template_renderer_factory($theme, $this->page);
-
- // Verify outcome
- $this->assertEqual(array($CFG->themedir . '/standardtemplate/templates'),
- $factory->get_search_paths());
- }
-
- public function test_constructor_mytheme() {
- global $CFG;
- // Set up.
- $theme = $this->make_theme('mytheme');
- $this->make_theme_template_dir('mytheme');
- $this->make_theme_template_dir('standardtemplate');
-
- // Exercise SUT.
- $factory = new testable_template_renderer_factory($theme, $this->page);
-
- // Verify outcome
- $this->assertEqual(array(
- $CFG->themedir . '/mytheme/templates',
- $CFG->themedir . '/standardtemplate/templates'),
- $factory->get_search_paths());
- }
-
- public function test_constructor_mytheme_no_templates() {
- global $CFG;
- // Set up.
- $theme = $this->make_theme('mytheme');
- $this->make_theme_template_dir('standardtemplate');
-
- // Exercise SUT.
- $factory = new testable_template_renderer_factory($theme, $this->page);
-
- // Verify outcome
- $this->assertEqual(array($CFG->themedir . '/standardtemplate/templates'),
- $factory->get_search_paths());
- }
-
- public function test_constructor_mytheme_with_parent() {
- global $CFG;
- // Set up.
- $theme = $this->make_theme('mytheme');
- $theme->parent = 'parenttheme';
- $this->make_theme_template_dir('mytheme');
- $this->make_theme_template_dir('parenttheme');
- $this->make_theme_template_dir('standardtemplate');
-
- // Exercise SUT.
- $factory = new testable_template_renderer_factory($theme, $this->page);
-
- // Verify outcome
- $this->assertEqual(array(
- $CFG->themedir . '/mytheme/templates',
- $CFG->themedir . '/parenttheme/templates',
- $CFG->themedir . '/standardtemplate/templates'),
- $factory->get_search_paths());
- }
-
- public function test_constructor_mytheme_with_parent_no_templates() {
- global $CFG;
- // Set up.
- $theme = $this->make_theme('mytheme');
- $theme->parent = 'parenttheme';
- $this->make_theme_template_dir('mytheme');
- $this->make_theme_template_dir('standardtemplate');
-
- // Exercise SUT.
- $factory = new testable_template_renderer_factory($theme, $this->page);
- $subfactory = new testable_template_renderer_factory($theme, $this->page, 'subtype');
-
- // Verify outcome
- $this->assertEqual(array(
- $CFG->themedir . '/mytheme/templates',
- $CFG->themedir . '/standardtemplate/templates'),
- $factory->get_search_paths());
- $this->assertEqual(array(
- $CFG->themedir . '/mytheme/templates',
- $CFG->themedir . '/standardtemplate/templates'),
- $subfactory->get_search_paths());
- }
-
- public function test_get_renderer() {
- global $CFG;
- // Set up.
- $theme = $this->make_theme('mytheme');
- $theme->parent = 'parenttheme';
- $this->make_theme_template_dir('mytheme', 'core');
- $this->make_theme_template_dir('parenttheme', 'mod_test');
- $this->make_theme_template_dir('standardtemplate', 'mod_test');
- $this->make_theme_template_dir('parenttheme', 'mod_test', 'subtype');
- $this->make_theme_template_dir('standardtemplate', 'mod_test', 'subtype');
- $factory = new testable_template_renderer_factory($theme);
-
- // Exercise SUT.
- $renderer = $factory->get_renderer('mod_test', $this->page);
- $subrenderer = $factory->get_renderer('mod_test', $this->page, 'subtype');
-
- // Verify outcome
- $this->assertEqual('moodle_mod_test_renderer', $renderer->get_copied_class());
- $this->assertEqual(array(
- $CFG->themedir . '/parenttheme/templates/mod_test',
- $CFG->themedir . '/standardtemplate/templates/mod_test'),
- $renderer->get_search_paths());
- $this->assertEqual('moodle_mod_test_subtype_renderer', $subrenderer->get_copied_class());
- $this->assertEqual(array(
- $CFG->themedir . '/parenttheme/templates/mod_test/subtype',
- $CFG->themedir . '/standardtemplate/templates/mod_test/subtype'),
- $subrenderer->get_search_paths());
- }
-}
-
+}*/
/**
* Unit tests for the xhtml_container_stack class.
}
}
-
-/**
- * Unit tests for the template_renderer class.
- *
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-class template_renderer_test extends UnitTestCase {
-
- public static $includecoverage = array('lib/outputrenderers.php', 'lib/outputcomponents.php');
- protected $renderer;
- protected $templatefolder;
- protected $savedtemplates;
-
- public function setUp() {
- global $CFG;
- parent::setUp();
- $this->templatefolder = $CFG->dataroot . '/temp/template_renderer_fixtures/test';
- make_upload_directory('temp/template_renderer_fixtures/test');
- $page = new moodle_page;
- $this->renderer = new template_renderer('moodle_mod_test_renderer',
- array($this->templatefolder), $page);
- }
-
- public function tearDown() {
- $this->renderer = null;
- foreach ($this->savedtemplates as $template) {
- unlink($template);
- }
- $this->savedtemplates = array();
- parent::tearDown();
- }
-
- protected function save_template($name, $contents) {
- $filename = $this->templatefolder . '/' . $name . '.php';
- $this->savedtemplates[] = $filename;
- file_put_contents($filename, $contents);
- }
-
- public function test_simple_template() {
- $this->save_template('greeting', '<p>Hello <?php echo $name ?>!</p>');
-
- $html = $this->renderer->greeting('Moodle');
- $this->assertEqual('<p>Hello Moodle!</p>', $html);
- }
-
- public function test_simple_template_default_argument_value() {
- $this->save_template('greeting', '<p>Hello <?php echo $name ?>!</p>');
-
- $html = $this->renderer->greeting();
- $this->assertEqual('<p>Hello world!</p>', $html);
- }
-
- public function test_box_template() {
- $this->save_template('box', '<div class="box"<?php echo $id ?>><?php echo $content ?></div>');
-
- $html = $this->renderer->box('This is a message in a box', 'messagediv');
- $this->assertEqual('<div class="box"messagediv>This is a message in a box</div>', $html);
- }
-
- public function test_box_start_end_templates() {
- $this->save_template('box', '<div class="box"<?php echo $id ?>><?php echo $content ?></div>');
-
- $html = $this->renderer->box_start('messagediv');
- $this->assertEqual('<div class="box"messagediv>', $html);
-
- $html = $this->renderer->box_end();
- $this->assertEqual('</div>', $html);
- }
-}
-
-
/**
- * Unit tests for the moodle_core_renderer class.
+ * Unit tests for the core_renderer class.
*
* @copyright 2009 Tim Hunt
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class moodle_core_renderer_test extends UnitTestCase {
+class core_renderer_test extends UnitTestCase {
public static $includecoverage = array('lib/outputrenderers.php', 'lib/outputcomponents.php');
protected $renderer;
public function setUp() {
parent::setUp();
- $this->renderer = new moodle_core_renderer(new moodle_page);
+ $this->renderer = new core_renderer(new moodle_page);
}
public function test_select_simple() {
'alt' => ''
)), $html);
$spacer = new html_image();
- $spacer->src = $this->renderer->old_icon_url('myspacer');
+ $spacer->src = $this->renderer->image_url('myspacer');
$spacer->alt = 'sometext';
$spacer->add_class('my');
$this->assert(new ContainsTagWithAttributes('img', array(
'class' => 'my image spacer',
- 'src' => $this->renderer->old_icon_url('myspacer'),
+ 'src' => $this->renderer->image_url('myspacer'),
'alt' => 'sometext')), $html);
}
$this->assert(new ContainsTagWithAttribute('div', 'class', 'heading-with-help'), $html);
$this->assert(new ContainsTagWithAttribute('span', 'class', 'helplink'), $html);
$this->assert(new ContainsTagWithAttribute('h2', 'class', 'main help'), $html);
- $this->assert(new ContainsTagWithAttributes('img', array('class' => 'iconhelp image', 'src' => $this->renderer->old_icon_url('help'))), $html);
+ $this->assert(new ContainsTagWithAttributes('img', array('class' => 'iconhelp image', 'src' => $this->renderer->image_url('help'))), $html);
$this->assert(new ContainsTagWithContents('h2', 'Cool help text'), $html);
$helpicon = clone($originalicon);
$this->assert(new ContainsTagWithAttribute('div', 'class', 'heading-with-help'), $html);
$this->assert(new ContainsTagWithAttribute('span', 'class', 'helplink'), $html);
$this->assert(new ContainsTagWithAttribute('h2', 'class', 'main help'), $html);
- $this->assert(new ContainsTagWithAttributes('img', array('class' => 'iconhelp image', 'src' => $this->renderer->old_icon_url('help'))), $html);
+ $this->assert(new ContainsTagWithAttributes('img', array('class' => 'iconhelp image', 'src' => $this->renderer->image_url('help'))), $html);
$this->assert(new ContainsTagWithContents('h2', 'Cool help text'), $html);
}
}
public function test_set_state_normal_path() {
$this->testpage->set_context(get_context_instance(CONTEXT_SYSTEM));
- $this->testpage->set_course($this->create_a_course());
+ $this->testpage->set_course($this->create_a_course());
- $this->assertEqual(moodle_page::STATE_BEFORE_HEADER, $this->testpage->state);
+ $this->assertEqual(moodle_page::STATE_BEFORE_HEADER, $this->testpage->state);
$this->testpage->set_state(moodle_page::STATE_PRINTING_HEADER);
$this->assertEqual(moodle_page::STATE_PRINTING_HEADER, $this->testpage->state);
$this->assertEqual('a title', $this->testpage->title);
}
- public function test_default_generaltype() {
+ public function test_default_pagelayout() {
// Exercise SUT and Validate
- $this->assertEqual('normal', $this->testpage->generaltype);
+ $this->assertEqual('normal', $this->testpage->pagelayout);
}
- public function test_set_generaltype() {
+ public function test_set_pagelayout() {
// Exercise SUT
- $this->testpage->set_generaltype('type');
+ $this->testpage->set_pagelayout('type');
// Validate
- $this->assertEqual('type', $this->testpage->generaltype);
+ $this->assertEqual('type', $this->testpage->pagelayout);
}
}
} else {
if (!CLI_SCRIPT and !$PAGE->headerprinted) {
$strupgrade = get_string('upgradingversion', 'admin');
- $PAGE->set_generaltype('maintenance');
+ $PAGE->set_pagelayout('maintenance');
upgrade_get_javascript();
$PAGE->set_title($strupgrade.' - Moodle '.$CFG->target_release);
$PAGE->set_heading($strupgrade);
return $loggedinas;
}
-/**
- * Tests whether $THEME->rarrow, $THEME->larrow have been set (theme/-/config.php).
- * If not it applies sensible defaults.
- *
- * Accessibility: right and left arrow Unicode characters for breadcrumb, calendar,
- * search forum block, etc. Important: these are 'silent' in a screen-reader
- * (unlike > »), and must be accompanied by text.
- *
- * @global object
- * @uses $_SERVER
- */
-function check_theme_arrows() {
- global $THEME;
-
- if (!isset($THEME->rarrow) and !isset($THEME->larrow)) {
- // Default, looks good in Win XP/IE 6, Win/Firefox 1.5, Win/Netscape 8...
- // Also OK in Win 9x/2K/IE 5.x
- $THEME->rarrow = '►'; // ►
- $THEME->larrow = '◄'; // ◄
- if (empty($_SERVER['HTTP_USER_AGENT'])) {
- $uagent = '';
- } else {
- $uagent = $_SERVER['HTTP_USER_AGENT'];
- }
- if (false !== strpos($uagent, 'Opera')
- || false !== strpos($uagent, 'Mac')) {
- // Looks good in Win XP/Mac/Opera 8/9, Mac/Firefox 2, Camino, Safari.
- // Not broken in Mac/IE 5, Mac/Netscape 7 (?).
- $THEME->rarrow = '▶'; // ▶
- $THEME->larrow = '◀'; // ◀
- }
- elseif (false !== strpos($uagent, 'Konqueror')) {
- $THEME->rarrow = '→'; // →
- $THEME->larrow = '←'; // ←
- }
- elseif (isset($_SERVER['HTTP_ACCEPT_CHARSET'])
- && false === stripos($_SERVER['HTTP_ACCEPT_CHARSET'], 'utf-8')) {
- // (Win/IE 5 doesn't set ACCEPT_CHARSET, but handles Unicode.)
- // To be safe, non-Unicode browsers!
- $THEME->rarrow = '>';
- $THEME->larrow = '<';
- }
-
- /// RTL support - in RTL languages, swap r and l arrows
- if (right_to_left()) {
- $t = $THEME->rarrow;
- $THEME->rarrow = $THEME->larrow;
- $THEME->larrow = $t;
- }
- } else {
- if (strpos($THEME->rarrow, '&')===0 && strrpos($THEME->rarrow, ';')===strlen($THEME->rarrow)-1) {
- $THEME->rarrow = html_entity_decode($THEME->rarrow, ENT_QUOTES, 'utf-8');
- }
- if (strpos($THEME->larrow, '&')===0 && strrpos($THEME->larrow, ';')===strlen($THEME->larrow)-1) {
- $THEME->larrow = html_entity_decode($THEME->larrow, ENT_QUOTES, 'utf-8');
- }
- }
-}
-
-
/**
* Return the right arrow with text ('next'), and optionally embedded in a link.
- * See function above, check_theme_arrows.
*
* @global object
* @param string $text HTML/plain text label (set to blank only for breadcrumb separator cases).
*/
function link_arrow_right($text, $url='', $accesshide=false, $addclass='') {
global $THEME;
- check_theme_arrows();
$arrowclass = 'arrow ';
if (! $url) {
$arrowclass .= $addclass;
/**
* Return the left arrow with text ('previous'), and optionally embedded in a link.
- * See function above, check_theme_arrows.
*
* @global object
* @param string $text HTML/plain text label (set to blank only for breadcrumb separator cases).
*/
function link_arrow_left($text, $url='', $accesshide=false, $addclass='') {
global $THEME;
- check_theme_arrows();
$arrowclass = 'arrow ';
if (! $url) {
$arrowclass .= $addclass;
}
// Include a redirect message, even with a HTTP redirect, because that is recommended practice.
- $PAGE->set_generaltype('embedded'); // No header and footer needed
+ $PAGE->set_pagelayout('embedded'); // No header and footer needed
$CFG->docroot = false; // to prevent the link to moodle docs from being displayed on redirect page.
echo $OUTPUT->redirect_message($encodedurl, $message, $delay, $debugdisableredirect);
exit;
global $CFG, $SITE, $PAGE, $OUTPUT;
$PAGE->set_pagetype('maintenance-message');
- $PAGE->set_generaltype('maintenance');
+ $PAGE->set_pagelayout('maintenance');
$PAGE->set_title(strip_tags($SITE->fullname));
$PAGE->set_heading($SITE->fullname);
echo $OUTPUT->header();
http://developer.yahoo.com/yui
-Changes:
-* MDL-20007 - commented out some styles from reset-fonts-grids.css,
- this is just a temporary hack, we need to find better long term solution
+Changes: NONE
Added to Moodle 13 July 2006
Updated to YUI 0.12.0, 23 November 2006
http://developer.yahoo.net/yui/license.txt
version: 2.7.0
*/
-
-/* moodle hack - we do not want our styles overridden
-html {
- color: #000;
- background: #FFF;
-}
-
-body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td
- {
- margin: 0;
- padding: 0;
-}
-
-table {
- border-collapse: collapse;
- border-spacing: 0;
-}
-
-fieldset,img {
- border: 0;
-}
-
-address,caption,cite,code,dfn,em,strong,th,var,optgroup {
- font-style: inherit;
- font-weight: inherit;
-}
-
-del,ins {
- text-decoration: none;
-}
-
-li {
- list-style: none;
-}
-
-caption,th {
- text-align: left;
-}
-
-h1,h2,h3,h4,h5,h6 {
- font-size: 100%;
- font-weight: normal;
-}
-
-q:before,q:after {
- content: '';
-}
-
-abbr,acronym {
- border: 0;
- font-variant: normal;
-}
-
-sup {
- vertical-align: baseline;
-}
-
-sub {
- vertical-align: baseline;
-}
-
-legend {
- color: #000;
-}
-
-input,button,textarea,select,optgroup,option {
- font-family: inherit;
- font-size: inherit;
- font-style: inherit;
- font-weight: inherit;
-}
-
-input,button,textarea,select { *
- font-size: 100%;
-}
-
-body {
- font: 13px/ 1.231 arial, helvetica, clean, sans-serif; *
- font-size: small; *
- font: x-small;
-}
-
-select,input,button,textarea,button {
- font: 99% arial, helvetica, clean, sans-serif;
-}
-
-table {
- font-size: inherit;
- font: 100%;
-}
-
-pre,code,kbd,samp,tt {
- font-family: monospace; *
- font-size: 108%;
- line-height: 100%;
-}
-
-body {
- text-align: center;
-}
-
-#doc,#doc2,#doc3,#doc4,.yui-t1,.yui-t2,.yui-t3,.yui-t4,.yui-t5,.yui-t6,.yui-t7
- {
- margin: auto;
- text-align: left;
- width: 57.69em; *
- width: 56.25em;
-}
-
-#doc2 {
- width: 73.076em; *
- width: 71.25em;
-}
-
-#doc3 {
- margin: auto 10px;
- width: auto;
-}
-
-#doc4 {
- width: 74.923em; *
- width: 73.05em;
-}
-*/
-.yui-b {
- position: relative;
-}
-
-.yui-b {
- _position: static;
-}
-
-#yui-main .yui-b {
- position: static;
-}
-
-#yui-main,.yui-g .yui-u .yui-g {
- width: 100%;
-}
-
-.yui-t1 #yui-main,.yui-t2 #yui-main,.yui-t3 #yui-main {
- float: right;
- margin-left: -25em;
-}
-
-.yui-t4 #yui-main,.yui-t5 #yui-main,.yui-t6 #yui-main {
- float: left;
- margin-right: -25em;
-}
-
-.yui-t1 .yui-b {
- float: left;
- width: 12.30769em; *
- width: 12.00em;
-}
-
-.yui-t1 #yui-main .yui-b {
- margin-left: 13.30769em; *
- margin-left: 13.05em;
-}
-
-.yui-t2 .yui-b {
- float: left;
- width: 13.8461em; *
- width: 13.50em;
-}
-
-.yui-t2 #yui-main .yui-b {
- margin-left: 14.8461em; *
- margin-left: 14.55em;
-}
-
-.yui-t3 .yui-b {
- float: left;
- width: 23.0769em; *
- width: 22.50em;
-}
-
-.yui-t3 #yui-main .yui-b {
- margin-left: 24.0769em; *
- margin-left: 23.62em;
-}
-
-.yui-t4 .yui-b {
- float: right;
- width: 13.8456em; *
- width: 13.50em;
-}
-
-.yui-t4 #yui-main .yui-b {
- margin-right: 14.8456em; *
- margin-right: 14.55em;
-}
-
-.yui-t5 .yui-b {
- float: right;
- width: 18.4615em; *
- width: 18.00em;
-}
-
-.yui-t5 #yui-main .yui-b {
- margin-right: 19.4615em; *
- margin-right: 19.125em;
-}
-
-.yui-t6 .yui-b {
- float: right;
- width: 23.0769em; *
- width: 22.50em;
-}
-
-.yui-t6 #yui-main .yui-b {
- margin-right: 24.0769em; *
- margin-right: 23.62em;
-}
-
-.yui-t7 #yui-main .yui-b {
- display: block;
- margin: 0 0 1em 0;
-}
-
-#yui-main .yui-b {
- float: none;
- width: auto;
-}
-
-.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u
- {
- float: left;
-}
-
-.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf,.yui-gc .yui-u,.yui-gd .yui-g,.yui-g .yui-gc .yui-u,.yui-ge .yui-u,.yui-ge .yui-g,.yui-gf .yui-g,.yui-gf .yui-u
- {
- float: right;
-}
-
-.yui-g div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first,.yui-ge div.first,.yui-gf div.first,.yui-g .yui-gc div.first,.yui-g .yui-ge div.first,.yui-gc div.first div.first
- {
- float: left;
-}
-
-.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf
- {
- width: 49.1%;
-}
-
-.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u
- {
- width: 32%;
- margin-left: 1.99%;
-}
-
-.yui-gb .yui-u { *
- margin-left: 1.9%; *
- width: 31.9%;
-}
-
-.yui-gc div.first,.yui-gd .yui-u {
- width: 66%;
-}
-
-.yui-gd div.first {
- width: 32%;
-}
-
-.yui-ge div.first,.yui-gf .yui-u {
- width: 74.2%;
-}
-
-.yui-ge .yui-u,.yui-gf div.first {
- width: 24%;
-}
-
-.yui-g .yui-gb div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first
- {
- margin-left: 0;
-}
-
-.yui-g .yui-g .yui-u,.yui-gb .yui-g .yui-u,.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u,.yui-ge .yui-g .yui-u,.yui-gf .yui-g .yui-u
- {
- width: 49%; *
- width: 48.1%; *
- margin-left: 0;
-}
-
-.yui-g .yui-g .yui-u {
- width: 48.1%;
-}
-
-.yui-g .yui-gb div.first,.yui-gb .yui-gb div.first { *
- margin-right: 0; *
- width: 32%;
- _width: 31.7%;
-}
-
-.yui-g .yui-gc div.first,.yui-gd .yui-g {
- width: 66%;
-}
-
-.yui-gb .yui-g div.first { *
- margin-right: 4%;
- _margin-right: 1.3%;
-}
-
-.yui-gb .yui-gc div.first,.yui-gb .yui-gd div.first { *
- margin-right: 0;
-}
-
-.yui-gb .yui-gb .yui-u,.yui-gb .yui-gc .yui-u { *
- margin-left: 1.8%;
- _margin-left: 4%;
-}
-
-.yui-g .yui-gb .yui-u {
- _margin-left: 1.0%;
-}
-
-.yui-gb .yui-gd .yui-u { *
- width: 66%;
- _width: 61.2%;
-}
-
-.yui-gb .yui-gd div.first { *
- width: 31%;
- _width: 29.5%;
-}
-
-.yui-g .yui-gc .yui-u,.yui-gb .yui-gc .yui-u {
- width: 32%;
- _float: right;
- margin-right: 0;
- _margin-left: 0;
-}
-
-.yui-gb .yui-gc div.first {
- width: 66%; *
- float: left; *
- margin-left: 0;
-}
-
-.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf .yui-u {
- margin: 0;
-}
-
-.yui-gb .yui-gb .yui-u {
- _margin-left: .7%;
-}
-
-.yui-gb .yui-g div.first,.yui-gb .yui-gb div.first { *
- margin-left: 0;
-}
-
-.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u { *
- width: 48.1%; *
- margin-left: 0;
-}
-
-.yui-gb .yui-gd div.first {
- width: 32%;
-}
-
-.yui-g .yui-gd div.first {
- _width: 29.9%;
-}
-
-.yui-ge .yui-g {
- width: 24%;
-}
-
-.yui-gf .yui-g {
- width: 74.2%;
-}
-
-.yui-gb .yui-ge div.yui-u,.yui-gb .yui-gf div.yui-u {
- float: right;
-}
-
-.yui-gb .yui-ge div.first,.yui-gb .yui-gf div.first {
- float: left;
-}
-
-.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf div.first { *
- width: 24%;
- _width: 20%;
-}
-
-.yui-gb .yui-ge div.first,.yui-gb .yui-gf .yui-u { *
- width: 73.5%;
- _width: 65.5%;
-}
-
-.yui-ge div.first .yui-gd .yui-u {
- width: 65%;
-}
-
-.yui-ge div.first .yui-gd div.first {
- width: 32%;
-}
-
-#hd:after,#bd:after,#ft:after,.yui-g:after,.yui-gb:after,.yui-gc:after,.yui-gd:after,.yui-ge:after,.yui-gf:after
- {
- content: ".";
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
-}
-
-#hd,#bd,#ft,.yui-g,.yui-gb,.yui-gc,.yui-gd,.yui-ge,.yui-gf {
- zoom: 1;
-}
\ No newline at end of file
+html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var,optgroup{font-style:inherit;font-weight:inherit;}del,ins{text-decoration:none;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:baseline;}sub{vertical-align:baseline;}legend{color:#000;}input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;}input,button,textarea,select{*font-size:100%;}body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}select,input,button,textarea,button{font:99% arial,helvetica,clean,sans-serif;}table{font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}body{text-align:center;}#doc,#doc2,#doc3,#doc4,.yui-t1,.yui-t2,.yui-t3,.yui-t4,.yui-t5,.yui-t6,.yui-t7{margin:auto;text-align:left;width:57.69em;*width:56.25em;}#doc2{width:73.076em;*width:71.25em;}#doc3{margin:auto 10px;width:auto;}#doc4{width:74.923em;*width:73.05em;}.yui-b{position:relative;}.yui-b{_position:static;}#yui-main .yui-b{position:static;}#yui-main,.yui-g .yui-u .yui-g{width:100%;}.yui-t1 #yui-main,.yui-t2 #yui-main,.yui-t3 #yui-main{float:right;margin-left:-25em;}.yui-t4 #yui-main,.yui-t5 #yui-main,.yui-t6 #yui-main{float:left;margin-right:-25em;}.yui-t1 .yui-b{float:left;width:12.30769em;*width:12.00em;}.yui-t1 #yui-main .yui-b{margin-left:13.30769em;*margin-left:13.05em;}.yui-t2 .yui-b{float:left;width:13.8461em;*width:13.50em;}.yui-t2 #yui-main .yui-b{margin-left:14.8461em;*margin-left:14.55em;}.yui-t3 .yui-b{float:left;width:23.0769em;*width:22.50em;}.yui-t3 #yui-main .yui-b{margin-left:24.0769em;*margin-left:23.62em;}.yui-t4 .yui-b{float:right;width:13.8456em;*width:13.50em;}.yui-t4 #yui-main .yui-b{margin-right:14.8456em;*margin-right:14.55em;}.yui-t5 .yui-b{float:right;width:18.4615em;*width:18.00em;}.yui-t5 #yui-main .yui-b{margin-right:19.4615em;*margin-right:19.125em;}.yui-t6 .yui-b{float:right;width:23.0769em;*width:22.50em;}.yui-t6 #yui-main .yui-b{margin-right:24.0769em;*margin-right:23.62em;}.yui-t7 #yui-main .yui-b{display:block;margin:0 0 1em 0;}#yui-main .yui-b{float:none;width:auto;}.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{float:left;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf,.yui-gc .yui-u,.yui-gd .yui-g,.yui-g .yui-gc .yui-u,.yui-ge .yui-u,.yui-ge .yui-g,.yui-gf .yui-g,.yui-gf .yui-u{float:right;}.yui-g div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first,.yui-ge div.first,.yui-gf div.first,.yui-g .yui-gc div.first,.yui-g .yui-ge div.first,.yui-gc div.first div.first{float:left;}.yui-g .yui-u,.yui-g .yui-g,.yui-g .yui-gb,.yui-g .yui-gc,.yui-g .yui-gd,.yui-g .yui-ge,.yui-g .yui-gf{width:49.1%;}.yui-gb .yui-u,.yui-g .yui-gb .yui-u,.yui-gb .yui-g,.yui-gb .yui-gb,.yui-gb .yui-gc,.yui-gb .yui-gd,.yui-gb .yui-ge,.yui-gb .yui-gf,.yui-gc .yui-u,.yui-gc .yui-g,.yui-gd .yui-u{width:32%;margin-left:1.99%;}.yui-gb .yui-u{*margin-left:1.9%;*width:31.9%;}.yui-gc div.first,.yui-gd .yui-u{width:66%;}.yui-gd div.first{width:32%;}.yui-ge div.first,.yui-gf .yui-u{width:74.2%;}.yui-ge .yui-u,.yui-gf div.first{width:24%;}.yui-g .yui-gb div.first,.yui-gb div.first,.yui-gc div.first,.yui-gd div.first{margin-left:0;}.yui-g .yui-g .yui-u,.yui-gb .yui-g .yui-u,.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u,.yui-ge .yui-g .yui-u,.yui-gf .yui-g .yui-u{width:49%;*width:48.1%;*margin-left:0;}.yui-g .yui-g .yui-u{width:48.1%;}.yui-g .yui-gb div.first,.yui-gb .yui-gb div.first{*margin-right:0;*width:32%;_width:31.7%;}.yui-g .yui-gc div.first,.yui-gd .yui-g{width:66%;}.yui-gb .yui-g div.first{*margin-right:4%;_margin-right:1.3%;}.yui-gb .yui-gc div.first,.yui-gb .yui-gd div.first{*margin-right:0;}.yui-gb .yui-gb .yui-u,.yui-gb .yui-gc .yui-u{*margin-left:1.8%;_margin-left:4%;}.yui-g .yui-gb .yui-u{_margin-left:1.0%;}.yui-gb .yui-gd .yui-u{*width:66%;_width:61.2%;}.yui-gb .yui-gd div.first{*width:31%;_width:29.5%;}.yui-g .yui-gc .yui-u,.yui-gb .yui-gc .yui-u{width:32%;_float:right;margin-right:0;_margin-left:0;}.yui-gb .yui-gc div.first{width:66%;*float:left;*margin-left:0;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf .yui-u{margin:0;}.yui-gb .yui-gb .yui-u{_margin-left:.7%;}.yui-gb .yui-g div.first,.yui-gb .yui-gb div.first{*margin-left:0;}.yui-gc .yui-g .yui-u,.yui-gd .yui-g .yui-u{*width:48.1%;*margin-left:0;}.yui-gb .yui-gd div.first{width:32%;}.yui-g .yui-gd div.first{_width:29.9%;}.yui-ge .yui-g{width:24%;}.yui-gf .yui-g{width:74.2%;}.yui-gb .yui-ge div.yui-u,.yui-gb .yui-gf div.yui-u{float:right;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf div.first{float:left;}.yui-gb .yui-ge .yui-u,.yui-gb .yui-gf div.first{*width:24%;_width:20%;}.yui-gb .yui-ge div.first,.yui-gb .yui-gf .yui-u{*width:73.5%;_width:65.5%;}.yui-ge div.first .yui-gd .yui-u{width:65%;}.yui-ge div.first .yui-gd div.first{width:32%;}#hd:after,#bd:after,#ft:after,.yui-g:after,.yui-gb:after,.yui-gc:after,.yui-gd:after,.yui-ge:after,.yui-gf:after{content:".";display:block;height:0;clear:both;visibility:hidden;}#hd,#bd,#ft,.yui-g,.yui-gb,.yui-gc,.yui-gd,.yui-ge,.yui-gf{zoom:1;}
\ No newline at end of file
$context = get_context_instance(CONTEXT_SYSTEM);
$PAGE->set_course($SITE);
+$PAGE->set_pagelayout('form');
/// Initialize variables
$errormsg = '';
}
if ($user->deleted) {
- $PAGE->set_generaltype('popup');
+ $PAGE->set_pagelayout('popup');
$PAGE->set_title(get_string('discussion', 'message').': '.fullname($user));
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('userdeleted'), 1);
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><?php echo get_string('discussion', 'message').': '.fullname($user) ?></title>
- <link rel="shortcut icon" href="<?php echo $CFG->wwwroot.'/theme/'.$PAGE->theme->name; ?>/favicon.ico" />
+ <link rel="shortcut icon" href="<?php echo $CFG->wwwroot.'/theme/'.$PAGE->theme->name; ?>/pix/favicon.ico" />
</head>
<frameset rows="110,*,0,220">
<noframes><body><?php
$userfullname = fullname($user);
$mefullname = fullname($USER);
- $PAGE->set_generaltype('popup');
+ $PAGE->set_pagelayout('popup');
$PAGE->set_title(get_string('discussion', 'message').': '.fullname($user));
echo $OUTPUT->header();
/// Popup a window if required and quit (usually from external links).
if ($popup) {
- $PAGE->set_generaltype('popup');
+ $PAGE->set_pagelayout('popup');
$OUTPUT->header();
echo $PAGE->requires->js_function_call('openpopup', Array('/message/index.php', 'message', 'menubar=0,location=0,scrollbars,status,resizable,width=400,height=500', 0))->asap();
redirect("$CFG->wwwroot/", '', 0);
$PAGE->set_periodic_refresh_delay($CFG->message_contacts_refresh);
}
-$PAGE->set_generaltype('popup');
+$PAGE->set_pagelayout('popup');
$PAGE->set_title(get_string('messages', 'message').' - '.format_string($SITE->fullname));
echo $OUTPUT->header();
echo '<table cellspacing="2" cellpadding="2" border="0" width="95%" class="boxaligncenter">';
@header('Content-Type: text/html; charset=utf-8');
-$PAGE->set_generaltype('popup');
+$PAGE->set_pagelayout('popup');
$PAGE->set_url(new moodle_url($CFG->wwwroot.'/message/messages.php'));
$PAGE->set_title(get_string('messages', 'message').' - '.format_string($SITE->fullname));
echo $OUTPUT->header();
print_error('disabled', 'message');
}
-$PAGE->set_generaltype('popup');
+$PAGE->set_pagelayout('popup');
$PAGE->set_title(get_string('messages', 'message').' - '.format_string($SITE->fullname));
$PAGE->set_url(new moodle_url($CFG->wwwroot.'/message/refresh.php'));
header('Expires: Sun, 28 Dec 1997 09:32:45 GMT');
if (has_capability('moodle/site:sendmessage', get_context_instance(CONTEXT_SYSTEM))) {
- $PAGE->set_generaltype('popup');
+ $PAGE->set_pagelayout('popup');
$PAGE->set_title('send');
$PAGE->requires->js('message/message.js');
}
//$PAGE->set_title('Message History');
-$PAGE->set_generaltype('popup');
+$PAGE->set_pagelayout('popup');
echo $OUTPUT->header();
echo '<table width="100%" cellpadding="0" cellspacing="0"><tr>';
echo '<td width="100">';
$assignmentinstance = new assignment_online($cm->id, $assignment, $cm, $course);
if ($submission = $assignmentinstance->get_submission($user->id)) {
- $PAGE->set_generaltype('popup');
+ $PAGE->set_pagelayout('popup');
$PAGE->set_title(fullname($user,true).': '.$assignment->name);
echo $OUTPUT->header();
echo $OUTPUT->box_start('generalbox boxaligcenter', 'dates');
+++ /dev/null
-#messages-list, #users-list{list-style-type:none;padding:0;margin:0}
-#chat-header {
- background: transparent;
- font-size: 200%;
- overflow: hidden;
-}
-#chat-header p {
- display:inline;
- font-size: 50%;
- color: grey;
-}
-.time{
- font-weight: bold;
-}
-.user{
- color:blue;
-}
-.chat-event{
- text-align:center;
- color:grey;
-}
-.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd {
- background: transparent;
-}
-.yui-layout-unit-top {
- background: #FFE39D;
-}
-.yui-layout-unit-right {
- border-top: 5px solid white;
- background: #FFD46B;
-}
-.yui-layout-unit-bottom {
- border-top: 5px solid white;
- background: #FFCB44;
-}
-.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-unit-right {
- background: white;
-}
-.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd {
- border:0;
-}
-.yui-skin-sam .yui-layout .yui-layout-hd {
- border:0;
-}
$str_send = get_string('send', 'chat');
$str_themes = get_string('themes');
-$PAGE->set_generaltype('popup');
+$PAGE->set_pagelayout('popup');
$PAGE->set_title('Chat');
$PAGE->requires->yui_lib('dragdrop');
$PAGE->requires->yui_lib('resize');
$PAGE->requires->js('mod/chat/gui_ajax/script.js');
$PAGE->requires->yui_lib('animation')->in_head();
-$PAGE->requires->css('mod/chat/gui_ajax/theme/'.$theme.'/chat.css');
$PAGE->add_body_class('yui-skin-sam');
-$PAGE->set_generaltype('embedded');
+$PAGE->set_pagelayout('embedded');
echo $OUTPUT->header();
$intro = format_text($chat->intro, $chat->introformat);
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
require_login($course->id, false, $cm);
require_capability('mod/chat:chat',$context);
-$PAGE->set_generaltype('form');
-$PAGE->requires->css('mod/chat/chat.css');
+$PAGE->set_pagelayout('form');
/// Check to see if groups are being used here
if ($groupmode = groups_get_activity_groupmode($cm)) { // Groups are being used
//Setup course, lang and theme
$PAGE->set_course($course);
$PAGE->requires->js('mod/chat/gui_header_js/chat_gui_header.js')->in_head();
-$PAGE->set_generaltype('embedded');
+$PAGE->set_pagelayout('embedded');
$PAGE->set_focuscontrol('input_chat_message');
$PAGE->set_cacheable(false);
echo $OUTPUT->header();
/// required stylesheets
$stylesheetshtml = '';
-foreach ($CFG->stylesheets as $stylesheet) {
+/*foreach ($CFG->stylesheets as $stylesheet) {
+ //TODO: MDL-21120
$stylesheetshtml .= '<link rel="stylesheet" type="text/css" href="'.$stylesheet.'" />';
-}
+}*/
// use ob to be able to send Content-Length headers
// needed for Keep-Alive to work
/// required stylesheets
$stylesheetshtml = '';
-foreach ($CFG->stylesheets as $stylesheet) {
+/*foreach ($CFG->stylesheets as $stylesheet) {
+ //TODO: MDL-21120
$stylesheetshtml .= '<link rel="stylesheet" type="text/css" href="'.$stylesheet.'" />';
-}
+}*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
print_error('invaliduser');
}
-$PAGE->set_generaltype('embedded');
+$PAGE->set_pagelayout('embedded');
$USER->description = '';
+++ /dev/null
-.mod-choice .results {
- border-collapse: separate;
-}
-
-.mod-choice .results .data {
- border-width:1px;
- border-style:solid;
- border-color:#999;
-}
global $OUTPUT;
$str = '<a href="field.php?d='.$this->data->id.'&fid='.$this->field->id.'&mode=display&sesskey='.sesskey().'">';
- $str .= '<img src="'.$OUTPUT->mod_icon_url('/field/' . $this->type . '/icon', 'data') . '" ';
+ $str .= '<img src="'.$OUTPUT->old_icon_url('/field/' . $this->type . '/icon', 'data') . '" ';
$str .= 'height="'.$this->iconheight.'" width="'.$this->iconwidth.'" alt="'.$this->type.'" title="'.$this->type.'" /></a>';
return $str;
}
if ($detail) {
$modname = $modnames[$activity->type];
echo '<div class="title">';
- echo "<img src=\"" . $OUTPUT->mod_icon_url('icon', $activity->type) . "\" ".
+ echo "<img src=\"" . $OUTPUT->old_icon_url('icon', $activity->type) . "\" ".
"class=\"icon\" alt=\"$modname\" />";
echo "<a href=\"$CFG->wwwroot/mod/feedback/view.php?id={$activity->cmid}\">{$activity->name}</a>";
echo '</div>';
}
- echo '<div class="title">';
+ echo '<div class="title">';
echo '</div>';
echo '<div class="user">';
$item->template=0;
if (isset($data->templateid)) {
- $item->template = intval($data->templateid);
+ $item->template = intval($data->templateid);
}
$itemname = trim($data->itemname);
$item->required=0;
if (isset($data->required)) {
- $item->required=$data->required;
+ $item->required=$data->required;
}
}else {
$item->name = $item->name;
feedback_init_feedback_session();
if(empty($SESSION->feedback->errors)) {
- return;
+ return;
}
echo $OUTPUT->box_start('generalbox errorboxcontent boxaligncenter boxwidthnormal');
* @return string html link
*/
function folder_get_file_link($file, $folder, $context) {
- global $CFG;
+ global $CFG, $OUTPUT;
$strfile = get_string('file');
$strdownload = get_string('download');
- $icon = mimeinfo_from_type("icon", $file->get_mimetype());
$urlbase = "$CFG->wwwroot/pluginfile.php";
$path = '/'.$context->id.'/folder_content/'.$folder->revision.$file->get_filepath().$file->get_filename();
$viewurl = file_encode_url($urlbase, $path, false);
$downloadurl = file_encode_url($urlbase, $path, true);
- $downloadurl = " <a href=\"$downloadurl\" title=\"" . get_string('downloadfile') . "\"><img src=\"$CFG->pixpath/t/down.gif\" class=\"iconsmall\" alt=\"$strdownload\" /></a>";
- return "<a href=\"$viewurl\" title=\"\"><img src=\"$CFG->pixpath/f/$icon\" class=\"icon\" alt=\"$strfile\" /> ".s($file->get_filename()).'</a>'.$downloadurl;
+ $downicon = $OUTPUT->old_icon_url('t/down');
+ $mimeicon = $OUTPUT->old_icon_url(file_mimetype_icon($file->get_mimetype()));
+
+ $downloadurl = " <a href=\"$downloadurl\" title=\"" . get_string('downloadfile') . "\"><img src=\"$downicon\" class=\"iconsmall\" alt=\"$strdownload\" /></a>";
+ return "<a href=\"$viewurl\" title=\"\"><img src=\"$mimeicon\" class=\"icon\" alt=\"$strfile\" /> ".s($file->get_filename()).'</a>'.$downloadurl;
}
/**
+++ /dev/null
-#mod-forum-subscribers .subscriberdiv,
-#mod-forum-subscribers .subscribertable {
- width:100%;
- background-color:#EEEEEE;
- border:1px solid #BBBBBB;
-}
-#mod-forum-subscribers .subscriberdiv,
-#mod-forum-subscribers .subscribertable tr td {
- vertical-align:top;
- padding:0.2em 0.3em;
-}
-#mod-forum-subscribers .subscribertable tr td.existing {
- width:42%;
-}
-#mod-forum-subscribers .subscribertable tr td.actions {
- width:16%;
- padding-top:3em;
-}
-#mod-forum-subscribers .subscribertable tr td.actions .actionbutton {
- margin:0.3em 0;
- padding:0.5em 0;
- width:100%;
-}
-#mod-forum-subscribers .subscribertable tr td.potential {
- width:42%;
-}
\ No newline at end of file
$headerdata->userprefs = '<a target="_blank" href="'.$headerdata->userprefs.'">'.get_string('digestmailprefs', 'forum').'</a>';
$posthtml = "<head>";
- foreach ($CFG->stylesheets as $stylesheet) {
+/* foreach ($CFG->stylesheets as $stylesheet) {
+ //TODO: MDL-21120
$posthtml .= '<link rel="stylesheet" type="text/css" href="'.$stylesheet.'" />'."\n";
- }
+ }*/
$posthtml .= "</head>\n<body id=\"email\">\n";
$posthtml .= '<p>'.get_string('digestmailheader', 'forum', $headerdata).'</p><br /><hr size="1" noshade="noshade" />';
$canunsubscribe = ! forum_is_forcesubscribed($forum);
$posthtml = '<head>';
- foreach ($CFG->stylesheets as $stylesheet) {
+/* foreach ($CFG->stylesheets as $stylesheet) {
+ //TODO: MDL-21120
$posthtml .= '<link rel="stylesheet" type="text/css" href="'.$stylesheet.'" />'."\n";
- }
+ }*/
$posthtml .= '</head>';
$posthtml .= "\n<body id=\"email\">\n\n";
echo '<div class="title">';
if ($detail) {
$aname = s($activity->name);
- echo "<img src=\"" . $OUTPUT->mod_icon_url('icon', $activity->type) . "\" ".
+ echo "<img src=\"" . $OUTPUT->old_icon_url('icon', $activity->type) . "\" ".
"class=\"icon\" alt=\"{$aname}\" />";
}
echo "<a href=\"$CFG->wwwroot/mod/forum/discuss.php?d={$activity->content->discussion}"
$strsubscribers = get_string("subscribers", "forum");
$PAGE->navbar->add($strsubscribers);
$PAGE->set_title($strsubscribers);
-$PAGE->requires->css('mod/forum/forum.css');
if (has_capability('mod/forum:managesubscriptions', $context)) {
$PAGE->set_button(forum_update_subscriptions_button($course->id, $id));
if ($edit != -1) {
$mainglossary = $DB->get_record('glossary', array('mainglossary'=>1,'course'=>$course->id));
if ( $mainglossary ) { // if there is a main glossary defined, allow to export the current entry
$output = true;
- $return .= ' <a title="'.get_string('exporttomainglossary','glossary') . '" href="exportentry.php?id='.$entry->id.'&prevmode='.$mode.'&hook='.urlencode($hook).'"><img src="export.gif" class="iconsmall" alt="'.get_string('exporttomainglossary','glossary').$altsuffix.'" /></a>';
+ $return .= ' <a title="'.get_string('exporttomainglossary','glossary') . '" href="exportentry.php?id='.$entry->id.'&prevmode='.$mode.'&hook='.urlencode($hook).'"><img src="'.$OUTPUT->old_icon_url('export', 'glossary').'" class="iconsmall" alt="'.get_string('exporttomainglossary','glossary').$altsuffix.'" /></a>';
}
}
if ( $entry->sourceglossaryid ) {
- $icon = "minus.gif"; // graphical metaphor (minus) for deleting an imported entry
+ $icon = $OUTPUT->old_icon_url('minus', 'glossary'); // graphical metaphor (minus) for deleting an imported entry
} else {
$icon = $OUTPUT->old_icon_url('t/delete');
}
$neworder = '&sortorder=asc';
$newordertitle = get_string('changeto', 'glossary', $asc);
}
- $icon = " <img src=\"$sortorder.gif\" class=\"icon\" alt=\"$newordertitle\" />";
+ $icon = " <img src=\"".$OUTPUT->old_icon_url($sortorder, 'glossary')."\" class=\"icon\" alt=\"$newordertitle\" />";
} else {
if ( $sortkey != 'CREATION' and $sortkey != 'UPDATE' and
$sortkey != 'FIRSTNAME' and $sortkey != 'LASTNAME' ) {
} else {
$newordertitle = $desc;
$neworder = '&sortorder=desc';
- $icon = ' <img src="asc.gif" class="icon" alt="'.$newordertitle.'" />';
+ $icon = ' <img src="'.$OUTPUT->old_icon_url('asc', 'glossary').'" class="icon" alt="'.$newordertitle.'" />';
}
}
$ficon = '';
if (has_capability('mod/glossary:manageentries', $context) or $glossary->allowprintview) {
// print_box_start('printicon');
echo '<span class="wrap printicon">';
- echo " <a title =\"". get_string("printerfriendly","glossary") ."\" href=\"print.php?id=$cm->id&mode=$mode&hook=".urlencode($hook)."&sortkey=$sortkey&sortorder=$sortorder&offset=$offset\"><img class=\"icon\" src=\"print.gif\" alt=\"". get_string("printerfriendly","glossary") . "\" /></a>";
+ echo " <a title =\"". get_string("printerfriendly","glossary") ."\" href=\"print.php?id=$cm->id&mode=$mode&hook=".urlencode($hook)."&sortkey=$sortkey&sortorder=$sortorder&offset=$offset\"><img class=\"icon\" src=\"".$OUTPUT->old_icon_url('print', 'glossary')."\" alt=\"". get_string("printerfriendly","glossary") . "\" /></a>";
echo '</span>';
// print_box_end();
}
if ($detail) {
// activity icon
- $src = "" . $OUTPUT->mod_icon_url('icon', $activity->type) . "";
+ $src = "" . $OUTPUT->old_icon_url('icon', $activity->type) . "";
print '<img src="'.$src.'" class="icon" alt="'.$activity->type.'" /> ';
// link to activity
$PAGE->requires->yui_lib('dragdrop')->in_head();
$PAGE->requires->yui_lib('resize')->in_head();
$PAGE->requires->js('mod/imscp/functions.js')->in_head();
-$PAGE->requires->css('mod/imscp/style.css');
$PAGE->requires->string_for_js('navigation', 'imscp');
$PAGE->requires->string_for_js('toc', 'imscp');
$PAGE->requires->string_for_js('hide', 'moodle');
$PAGE->requires->string_for_js('show', 'moodle');
-// TODO: ugly hack for a page layout without footer and blocks
-$PAGE->set_generaltype('topframe');
+//TODO: find some better way to disable blocks and minimise footer - pagetype just for this does not seem like a good solution
+//$PAGE->set_pagelayout('maxcontent');
$PAGE->set_title($course->shortname.': '.$imscp->name);
$PAGE->set_heading($course->fullname);
}
/// Header setup
- $this->page->requires->css('mod/lesson/lesson.css');
$this->page->set_title($title);
$this->page->set_heading($this->page->course->fullname);
$this->page->set_button($buttons);
$options = empty($page->displayoptions) ? array() : unserialize($page->displayoptions);
if ($inpopup and $page->display == RESOURCELIB_DISPLAY_POPUP) {
- $PAGE->set_generaltype('popup');
+ $PAGE->set_pagelayout('popup');
$PAGE->set_title($course->shortname.': '.$page->name);
if (!empty($options['printheading'])) {
$PAGE->set_heading($page->name);
list($thispageurl, $contexts, $cmid, $cm, $quiz, $pagevars) =
question_edit_setup('editq', true);
$PAGE->set_url('mod/quiz/edit.php', $thispageurl->params());
-$PAGE->set_generaltype('form');
+$PAGE->set_pagelayout('form');
$defaultcategoryobj = question_make_default_categories($contexts->all());
$defaultcategoryid = $defaultcategoryobj->id;
*/
function quiz_print_randomquestion(&$question, &$pageurl, &$quiz, $quiz_qbanktool) {
global $DB, $QTYPES, $THEME, $OUTPUT;
- check_theme_arrows();
echo '<div class="quiz_randomquestion">';
if (!$category = $DB->get_record('question_categories', array('id' => $question->category))) {
if ($detail) {
$modname = $modnames[$activity->type];
echo '<div class="title">';
- echo "<img src=\"" . $OUTPUT->mod_icon_url('icon', $activity->type) . "\" ".
+ echo "<img src=\"" . $OUTPUT->old_icon_url('icon', $activity->type) . "\" ".
"class=\"icon\" alt=\"$modname\" />";
echo "<a href=\"$CFG->wwwroot/mod/quiz/view.php?id={$activity->cmid}\">{$activity->name}</a>";
echo '</div>';
if (!$table->is_downloading()) {
// Only print headers if not asked to download data
- $PAGE->requires->css('mod/quiz/report/responses/styles.css');
$this->print_header_and_tabs($cm, $course, $quiz, 'responses', '');
}
$frame = optional_param('frameset', 'main', PARAM_ALPHA);
if ($frame === 'top') {
- $PAGE->set_generaltype('topframe');
+ $PAGE->set_pagelayout('frametop');
resource_print_header($resource, $cm, $course);
resource_print_heading($resource, $cm, $course);
resource_print_intro($resource, $cm, $course);
if (isset($_COOKIE['hide:SCORMitem'.$nextsco->id])) {
$icon = 'plus';
}
- $result->toc .= '<a href="javascript:expandCollide(\'img'.$sublist.'\',\'s'.$sublist.'\','.$nextsco->id.');"><img id="img'.$sublist.'" src="'.$OUTPUT->mod_icon_url('pix/' . $icon, 'scorm').'" alt="'.$strexpand.'" title="'.$strexpand.'"/></a>';
+ $result->toc .= '<a href="javascript:expandCollide(\'img'.$sublist.'\',\'s'.$sublist.'\','.$nextsco->id.');"><img id="img'.$sublist.'" src="'.$OUTPUT->old_icon_url('pix/' . $icon, 'scorm').'" alt="'.$strexpand.'" title="'.$strexpand.'"/></a>';
} else if ($isvisible) {
- $result->toc .= '<img src="'.$OUTPUT->mod_icon_url('pix/spacer', 'scorm').'" alt="" />';
+ $result->toc .= '<img src="'.$OUTPUT->old_icon_url('pix/spacer', 'scorm').'" alt="" />';
}
if (empty($sco->title)) {
$sco->title = $sco->identifier;
$usertrack = $usertracks[$sco->identifier];
$strstatus = get_string($usertrack->status,'scorm');
if ($sco->scormtype == 'sco') {
- $statusicon = '<img src="'.$OUTPUT->mod_icon_url('pix/' . $usertrack->status, 'scorm').'" alt="'.$strstatus.'" title="'.$strstatus.'" />';
+ $statusicon = '<img src="'.$OUTPUT->old_icon_url('pix/' . $usertrack->status, 'scorm').'" alt="'.$strstatus.'" title="'.$strstatus.'" />';
} else {
- $statusicon = '<img src="'.$OUTPUT->mod_icon_url('pix/assetc', 'scorm').'" alt="'.get_string('assetlaunched','scorm').'" title="'.get_string('assetlaunched','scorm').'" />';
+ $statusicon = '<img src="'.$OUTPUT->old_icon_url('pix/assetc', 'scorm').'" alt="'.get_string('assetlaunched','scorm').'" title="'.get_string('assetlaunched','scorm').'" />';
}
if (($usertrack->status == 'notattempted') || ($usertrack->status == 'incomplete') || ($usertrack->status == 'browsed')) {
}
$strsuspended = get_string('suspended','scorm');
if (isset($usertrack->{'cmi.core.exit'}) && ($usertrack->{'cmi.core.exit'} == 'suspend')) {
- $statusicon = '<img src="'.$OUTPUT->mod_icon_url('pix/suspend', 'scorm').'" alt="'.$strstatus.' - '.$strsuspended.'" title="'.$strstatus.' - '.$strsuspended.'" />';
+ $statusicon = '<img src="'.$OUTPUT->old_icon_url('pix/suspend', 'scorm').'" alt="'.$strstatus.' - '.$strsuspended.'" title="'.$strstatus.' - '.$strsuspended.'" />';
}
} else {
if ($play && empty($scoid)) {
}
$incomplete = true;
if ($sco->scormtype == 'sco') {
- $statusicon = '<img src="'.$OUTPUT->mod_icon_url('pix/notattempted', 'scorm').'" alt="'.get_string('notattempted','scorm').'" title="'.get_string('notattempted','scorm').'" />';
+ $statusicon = '<img src="'.$OUTPUT->old_icon_url('pix/notattempted', 'scorm').'" alt="'.get_string('notattempted','scorm').'" title="'.get_string('notattempted','scorm').'" />';
} else {
- $statusicon = '<img src="'.$OUTPUT->mod_icon_url('pix/asset', 'scorm').'" alt="'.get_string('asset','scorm').'" title="'.get_string('asset','scorm').'" />';
+ $statusicon = '<img src="'.$OUTPUT->old_icon_url('pix/asset', 'scorm').'" alt="'.get_string('asset','scorm').'" title="'.get_string('asset','scorm').'" />';
}
}
if ($sco->id == $scoid) {
if (isset($_COOKIE['hide:SCORMitem'.$nextsco->id])) {
$icon = 'plus';
}
- $result->toc .= '<a href="javascript:expandCollide(\'img'.$sublist.'\',\'s'.$sublist.'\','.$nextsco->id.');"><img id="img'.$sublist.'" src="'.$OUTPUT->mod_icon_url('pix/' . $icon, 'scorm').'" alt="'.$strexpand.'" title="'.$strexpand.'"/></a>';
+ $result->toc .= '<a href="javascript:expandCollide(\'img'.$sublist.'\',\'s'.$sublist.'\','.$nextsco->id.');"><img id="img'.$sublist.'" src="'.$OUTPUT->old_icon_url('pix/' . $icon, 'scorm').'" alt="'.$strexpand.'" title="'.$strexpand.'"/></a>';
} else if ($isvisible) {
- $result->toc .= '<img src="'.$OUTPUT->mod_icon_url('pix/spacer', 'scorm').'" alt="" />';
+ $result->toc .= '<img src="'.$OUTPUT->old_icon_url('pix/spacer', 'scorm').'" alt="" />';
}
if (empty($sco->title)) {
$sco->title = $sco->identifier;
$usertrack = $usertracks[$sco->identifier];
$strstatus = get_string($usertrack->status,'scorm');
if ($sco->scormtype == 'sco') {
- $statusicon = '<img src="'.$OUTPUT->mod_icon_url('pix/'.$usertrack->status, 'scorm').'" alt="'.$strstatus.'" title="'.$strstatus.'" />';
+ $statusicon = '<img src="'.$OUTPUT->old_icon_url('pix/'.$usertrack->status, 'scorm').'" alt="'.$strstatus.'" title="'.$strstatus.'" />';
} else {
- $statusicon = '<img src="'.$OUTPUT->mod_icon_url('pix/assetc/', 'scorm').'" alt="'.get_string('assetlaunched','scorm').'" title="'.get_string('assetlaunched','scorm').'" />';
+ $statusicon = '<img src="'.$OUTPUT->old_icon_url('pix/assetc/', 'scorm').'" alt="'.get_string('assetlaunched','scorm').'" title="'.get_string('assetlaunched','scorm').'" />';
}
if (($usertrack->status == 'notattempted') || ($usertrack->status == 'incomplete') || ($usertrack->status == 'browsed')) {
$strsuspended = get_string('suspended','scorm');
if (isset($usertrack->{'cmi.core.exit'}) && ($usertrack->{'cmi.core.exit'} == 'suspend')) {
if($usertrack->status !='completed') {
- $statusicon = '<img src="'.$OUTPUT->mod_icon_url('pix/suspend', 'scorm').'" alt="'.$strstatus.' - '.$strsuspended.'" title="'.$strstatus.' - '.$strsuspended.'" />';
+ $statusicon = '<img src="'.$OUTPUT->old_icon_url('pix/suspend', 'scorm').'" alt="'.$strstatus.' - '.$strsuspended.'" title="'.$strstatus.' - '.$strsuspended.'" />';
}
}
} else {
}
$incomplete = true;
if ($sco->scormtype == 'sco') {
- $statusicon = '<img src="'.$OUTPUT->mod_icon_url('pix/notattempted', 'scorm').'" alt="'.get_string('notattempted','scorm').'" title="'.get_string('notattempted','scorm').'" />';
+ $statusicon = '<img src="'.$OUTPUT->old_icon_url('pix/notattempted', 'scorm').'" alt="'.get_string('notattempted','scorm').'" title="'.get_string('notattempted','scorm').'" />';
} else {
- $statusicon = '<img src="'.$OUTPUT->mod_icon_url('pix/asset', 'scorm').'" alt="'.get_string('asset','scorm').'" title="'.get_string('asset','scorm').'" />';
+ $statusicon = '<img src="'.$OUTPUT->old_icon_url('pix/asset', 'scorm').'" alt="'.get_string('asset','scorm').'" title="'.get_string('asset','scorm').'" />';
}
}
if ($sco->id == $scoid) {
$icon = 'plus';
}
$result->toc .= "\t\t".'<li><a href="javascript:expandCollide(\'img'.$sublist.'\',\'s'.$sublist.'\','.$nextsco->id.');">'.
- '<img id="img'.$sublist.'" src="'.$OUTPUT->mod_icon_url('pix/'.$icon, 'scorm').'" alt="'.$strexpand.'" title="'.$strexpand.'"/></a>';
+ '<img id="img'.$sublist.'" src="'.$OUTPUT->old_icon_url('pix/'.$icon, 'scorm').'" alt="'.$strexpand.'" title="'.$strexpand.'"/></a>';
} else if ($isvisible) {
- $result->toc .= "\t\t".'<li><img src="'.$OUTPUT->mod_icon_url('pix/spacer', 'scorm').'" alt="" />';
+ $result->toc .= "\t\t".'<li><img src="'.$OUTPUT->old_icon_url('pix/spacer', 'scorm').'" alt="" />';
}
if (empty($sco->title)) {
$sco->title = $sco->identifier;
$usertrack = $usertracks[$sco->identifier];
$strstatus = get_string($usertrack->status,'scorm');
if ($sco->scormtype == 'sco') {
- $statusicon = '<img src="'.$OUTPUT->mod_icon_url('pix/'.$usertrack->status, 'scorm').'" alt="'.$strstatus.'" title="'.$strstatus.'" />';
+ $statusicon = '<img src="'.$OUTPUT->old_icon_url('pix/'.$usertrack->status, 'scorm').'" alt="'.$strstatus.'" title="'.$strstatus.'" />';
} else {
- $statusicon = '<img src="'.$OUTPUT->mod_icon_url('pix/assetc', 'scorm').'" alt="'.get_string('assetlaunched','scorm').'" title="'.get_string('assetlaunched','scorm').'" />';
+ $statusicon = '<img src="'.$OUTPUT->old_icon_url('pix/assetc', 'scorm').'" alt="'.get_string('assetlaunched','scorm').'" title="'.get_string('assetlaunched','scorm').'" />';
}
if (($usertrack->status == 'notattempted') || ($usertrack->status == 'incomplete') || ($usertrack->status == 'browsed')) {
$strsuspended = get_string('suspended','scorm');
if (isset($usertrack->{'cmi.core.exit'}) && ($usertrack->{'cmi.core.exit'} == 'suspend')) {
if($usertrack->status !='completed') {
- $statusicon = '<img src="'.$OUTPUT->mod_icon_url('pix/suspend', 'scorm').'" alt="'.$strstatus.' - '.$strsuspended.'" title="'.$strstatus.' - '.$strsuspended.'" />';
+ $statusicon = '<img src="'.$OUTPUT->old_icon_url('pix/suspend', 'scorm').'" alt="'.$strstatus.' - '.$strsuspended.'" title="'.$strstatus.' - '.$strsuspended.'" />';
}
}
} else {
$scoid = $sco->id;
}
if ($sco->scormtype == 'sco') {
- $statusicon = '<img src="'.$OUTPUT->mod_icon_url('pix/notattempted', 'scorm').'" alt="'.get_string('notattempted','scorm').'" title="'.get_string('notattempted','scorm').'" />';
+ $statusicon = '<img src="'.$OUTPUT->old_icon_url('pix/notattempted', 'scorm').'" alt="'.get_string('notattempted','scorm').'" title="'.get_string('notattempted','scorm').'" />';
$incomplete = true;
} else {
- $statusicon = '<img src="'.$OUTPUT->mod_icon_url('pix/asset', 'scorm').'" alt="'.get_string('asset','scorm').'" title="'.get_string('asset','scorm').'" />';
+ $statusicon = '<img src="'.$OUTPUT->old_icon_url('pix/asset', 'scorm').'" alt="'.get_string('asset','scorm').'" title="'.get_string('asset','scorm').'" />';
}
}
if (($nextsco !== false) && ($sco->parent != $nextsco->parent) && (($level==0) || (($level>0) && ($nextsco->parent == $sco->identifier)))) {
$sublist++;
} else {
- $report .= '<img src="'.$OUTPUT->mod_icon_url('pix/spacer', 'scorm').'" alt="" />';
+ $report .= '<img src="'.$OUTPUT->old_icon_url('pix/spacer', 'scorm').'" alt="" />';
}
if ($sco->launch) {
$usertrack->status = 'notattempted';
}
$strstatus = get_string($usertrack->status,'scorm');
- $report .= "<img src='".$OUTPUT->mod_icon_url('pix/'.$usertrack->status, 'scorm')."' alt='$strstatus' title='$strstatus' />";
+ $report .= "<img src='".$OUTPUT->old_icon_url('pix/'.$usertrack->status, 'scorm')."' alt='$strstatus' title='$strstatus' />";
if ($usertrack->timemodified != 0) {
if ($usertrack->timemodified > $lastmodify) {
$lastmodify = $usertrack->timemodified;
}
} else {
if ($sco->scormtype == 'sco') {
- $report .= '<img src="'.$OUTPUT->mod_icon_url('pix/notattempted', 'scorm').'" alt="'.get_string('notattempted','scorm').'" title="'.get_string('notattempted','scorm').'" />';
+ $report .= '<img src="'.$OUTPUT->old_icon_url('pix/notattempted', 'scorm').'" alt="'.get_string('notattempted','scorm').'" title="'.get_string('notattempted','scorm').'" />';
} else {
- $report .= '<img src="'.$OUTPUT->mod_icon_url('pix/asset', 'scorm').'" alt="'.get_string('asset','scorm').'" title="'.get_string('asset','scorm').'" />';
+ $report .= '<img src="'.$OUTPUT->old_icon_url('pix/asset', 'scorm').'" alt="'.get_string('asset','scorm').'" title="'.get_string('asset','scorm').'" />';
}
}
$report .= " $sco->title $score$totaltime</li>\n";
location = "<?php echo $result ?>";
}
else {
- document.body.innerHTML = "<p><?php echo get_string('activityloading', 'scorm');?> <span id='countdown'><?php echo $delayseconds ?></span> <?php echo get_string('numseconds');?>. <img src='<?php echo $OUTPUT->mod_icon_url('pix/wait', 'scorm') ?>'><p>";
+ document.body.innerHTML = "<p><?php echo get_string('activityloading', 'scorm');?> <span id='countdown'><?php echo $delayseconds ?></span> <?php echo get_string('numseconds');?>. <img src='<?php echo $OUTPUT->old_icon_url('pix/wait', 'scorm') ?>'><p>";
var e = document.getElementById("countdown");
var cSeconds = parseInt(e.innerHTML);
var timer = setInterval(function() {
$detailslink = ' ';
}
$strstatus = get_string($trackdata->status,'scorm');
- $row[] = '<img src="'.$OUTPUT->mod_icon_url('pix/' . $trackdata->status, 'scorm').'" alt="'.$strstatus.'" title="'.
+ $row[] = '<img src="'.$OUTPUT->old_icon_url('pix/' . $trackdata->status, 'scorm').'" alt="'.$strstatus.'" title="'.
$strstatus.'" /> '.format_string($sco->title);
$row[] = get_string($trackdata->status,'scorm');
$row[] = $trackdata->total_time;
$trackdata->total_time = '';
}
$strstatus = get_string($trackdata->status,'scorm');
- echo '<img src="'.$$OUTPUT->mod_icon_url('pix/'.$trackdata->status, 'scorm').'" alt="'.$strstatus.'" title="'.
+ echo '<img src="'.$$OUTPUT->old_icon_url('pix/'.$trackdata->status, 'scorm').'" alt="'.$strstatus.'" title="'.
$strstatus.'" /> '.$trackdata->total_time.'<br />'.$scoreview.'<br />';
echo '</div>'."\n";
echo '<hr /><h2>'.get_string('details','scorm').'</h2>';
* migrate custom resource module subtypes into separate modules
* migrate to new comments subsystem
* use new $PAGE and $OUTPUT instead of old weblib functions
+* theme changes: move plugin styles into mod/xxx/styles.css and use new css markers for images,
+ move all images into new mod/xxx/pix/ directory and use new outputlib api
+ move module icon to mod/xxx/pix/icon.gif
+
optional - no changes needed in older code:
* portfolio support
$frame = optional_param('frameset', 'main', PARAM_ALPHA);
if ($frame === 'top') {
- $PAGE->set_generaltype('topframe');
+ $PAGE->set_pagelayout('frametop');
url_print_header($url, $cm, $course);
url_print_heading($url, $cm, $course);
url_print_intro($url, $cm, $course);
$PAGE->set_context(get_context_instance(CONTEXT_USER, $USER->id));
$PAGE->set_url('my/index.php');
+ $PAGE->set_pagelayout('my');
$PAGE->set_blocks_editing_capability('moodle/my:manageblocks');
if (($edit != -1) and $PAGE->user_allowed_editing()) {
+++ /dev/null
-<?php
-// Outputs pictures from theme or core pix folder. Only used if $CFG->smartpix is
-// turned on.
-
-$matches=array(); // Reusable array variable for preg_match
-
-// This does NOT use config.php. This is because doing that makes database requests
-// which cause this to take longer (I benchmarked this at 16ms, 256ms with config.php)
-// A version using normal Moodle functions is included in comment at end in case we
-// want to switch to it in future.
-
-function error($text,$notfound=false) {
- header($notfound ? 'HTTP/1.0 404 Not Found' : 'HTTP/1.0 500 Internal Server Error');
- header('Content-Type: text/plain');
- print $text;
- exit;
-}
-
-// Nicked from moodlelib clean_param
-function makesafe($param) {
- $param = str_replace('\\\'', '\'', $param);
- $param = str_replace('\\"', '"', $param);
- $param = str_replace('\\', '/', $param);
- $param = preg_replace('/[[:cntrl:]]|[<>"`\|\':]/', '', $param);
- $param = preg_replace('/\.\.+/', '', $param);
- $param = preg_replace('~//+~', '/', $param);
- return preg_replace('~/(\./)+~', '/', $param);
-}
-
-// Nicked from weblib
-/**
- * Remove query string from url
- *
- * Takes in a URL and returns it without the querystring portion
- *
- * @param string $url the url which may have a query string attached
- * @return string
- */
-function strip_querystring($url) {
-
- if ($commapos = strpos($url, '?')) {
- return substr($url, 0, $commapos);
- } else {
- return $url;
- }
-}
-
-// get query string
-function get_query($name) {
- if (!empty($_SERVER['REQUEST_URI'])) {
- return explode($name, $_SERVER['REQUEST_URI']);
- } else if (!empty($_SERVER['QUERY_STRING'])) {
- return array('', '?'. $_SERVER['QUERY_STRING']);
- } else {
- return false;
- }
-}
-// Nicked from weblib then cutdown
-/**
- * Extracts file argument either from file parameter or PATH_INFO.
- * @param string $scriptname name of the calling script
- * @return string file path (only safe characters)
- */
-function get_file_argument_limited($scriptname) {
- $relativepath = FALSE;
-
- // first try normal parameter (compatible method == no relative links!)
- if(isset($_GET['file'])) {
- return makesafe($_GET['file']);
- }
-
- // then try extract file from PATH_INFO (slasharguments method)
- if (!empty($_SERVER['PATH_INFO'])) {
- $path_info = $_SERVER['PATH_INFO'];
- // check that PATH_INFO works == must not contain the script name
- if (!strpos($path_info, $scriptname)) {
- return makesafe(rawurldecode($path_info));
- }
- }
-
- // now if both fail try the old way
- // (for compatibility with misconfigured or older buggy php implementations)
- $arr = get_query($scriptname);
- if (!empty($arr[1])) {
- return makesafe(rawurldecode(strip_querystring($arr[1])));
- }
-
- error('Unexpected PHP set up. Turn off the smartpix config option.');
-}
-
-// We do need to get dirroot from config.php
-if(!$config=@file_get_contents(dirname(__FILE__).'/../config.php')) {
- error("Can't open config.php");
-}
-$configlines=preg_split('/[\r\n]+/',$config);
-foreach($configlines as $configline) {
- if(preg_match('/^\s?\$CFG->dirroot\s*=\s*[\'"](.*?)[\'"]\s*;/',$configline,$matches)) {
- $dirroot=$matches[1];
- }
- if(preg_match('/^\s?\$CFG->dataroot\s*=\s*[\'"](.*?)[\'"]\s*;/',$configline,$matches)) {
- $dataroot=$matches[1];
- }
- if(isset($dirroot) && isset($dataroot)) {
- break;
- }
-}
-if(!(isset($dirroot) && isset($dataroot))) {
- error('No line in config.php like $CFG->dirroot=\'/somewhere/whatever\';');
-}
-
-// Split path - starts with theme name, then actual image path inside pix
-$path=get_file_argument_limited('smartpix.php');
-$match=array();
-if(!preg_match('|^/([a-zA-Z0-9_\-.]+)/([a-zA-Z0-9/_\-.]+)$|',$path,$match)) {
- error('Unexpected request format');
-}
-list($junk,$theme,$path)=$match;
-
-// Check file type
-if(preg_match('/\.png$/',$path)) {
- $mimetype='image/png';
-} else if(preg_match('/\.gif$/',$path)) {
- $mimetype='image/gif';
-} else if(preg_match('/\.jpe?g$/',$path)) {
- $mimetype='image/jpeg';
-} else {
- // Note that this is a security feature as well as a lack of mime type
- // support :) Means this can't accidentally serve files from places it
- // shouldn't. Without it, you can actually access any file inside the
- // module code directory.
- error('Request for non-image file');
-}
-
-// Find actual location of image as $file
-$file=false;
-if(file_exists($possibility="$dirroot/theme/$theme/pix/$path")) {
- // Found the file in theme, stop looking
- $file=$possibility;
-} else {
- // Is there a parent theme?
- while(true) {
- require("$dirroot/theme/$theme/config.php"); // Sets up $THEME
- if(!$THEME->parent) {
- break;
- }
- $theme=$THEME->parent;
- if(file_exists($possibility="$dirroot/theme/$theme/pix/$path")) {
- $file=$possibility;
- // Found in parent theme
- break;
- }
- }
- if(!$file) {
- if(preg_match('|^mod/|',$path)) {
- if(!file_exists($possibility="$dirroot/$path")) {
- error('Requested image not found.',true);
- }
- } else {
- if(!file_exists($possibility="$dirroot/pix/$path")) {
- error('Requested image not found.',true);
- }
- }
- $file=$possibility;
- }
-}
-
-// Now we have a file that exists. Not using send_file since it requires
-// proper $CFG etc.
-
-// Handle If-Modified-Since
-$filedate=filemtime($file);
-$ifmodifiedsince=isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? $_SERVER['HTTP_IF_MODIFIED_SINCE'] : false;
-if($ifmodifiedsince && strtotime($ifmodifiedsince)>=$filedate) {
- header('HTTP/1.0 304 Not Modified');
- exit;
-}
-header('Last-Modified: '.gmdate('D, d M Y H:i:s',$filedate).' GMT');
-
-// As I'm not loading config table from DB, this is hardcoded here; expiry
-// 4 hours, unless the hacky file reduceimagecache.dat exists in dataroot
-if(file_exists($reducefile=$dataroot.'/reduceimagecache.dat')) {
- $lifetime=file_read_contents($reducefile);
-} else {
- $lifetime=4*60*60;
-}
-
-// Send expire headers
-header('Cache-Control: max-age='.$lifetime);
-header('Expires: '. gmdate('D, d M Y H:i:s', time() + $lifetime) .' GMT');
-
-// Type
-header('Content-Type: '.$mimetype);
-header('Content-Length: '.filesize($file));
-
-// Output file
-$handle=fopen($file,'r');
-fpassthru($handle);
-fclose($handle);
-
-// Slower Moodle-style version follows:
-
-//// Outputs pictures from theme or core pix folder. Only used if $CFG->smartpix is
-//// turned on.
-//
-//define('NO_MOODLE_COOKIES', true); // session not used here
-//require_once('../config.php');
-//require_once('../lib/filelib.php');
-//global $CFG;
-//
-//$matches=array(); // Reusable array variable for preg_match
-//
-//// Split path - starts with theme name, then actual image path inside pix
-//$path=get_file_argument('smartpix.php');
-//$match=array();
-//if(!preg_match('|^/([a-z0-9_\-.]+)/([a-z0-9/_\-.]+)$|',$path,$match)) {
-// error('Unexpected request format');
-//}
-//list($junk,$theme,$path)=$match;
-//
-//// Check file type - this is not needed for the MIME types as we could
-//// get those by the existing function, but it provides an extra layer of security
-//// as otherwise this script could be used to view all files within dirroot/mod
-//if(preg_match('/\.png$/',$path)) {
-// $mimetype='image/png';
-//} else if(preg_match('/\.gif$/',$path)) {
-// $mimetype='image/gif';
-//} else if(preg_match('/\.jpe?g$/',$path)) {
-// $mimetype='image/jpeg';
-//} else {
-// error('Request for non-image file');
-//}
-//
-//// Find actual location of image as $file
-//$file=false;
-//if(file_exists($possibility="$CFG->dirroot/theme/$theme/pix/$path")) {
-// // Found the file in theme, stop looking
-// $file=$possibility;
-//} else {
-// // Is there a parent theme?
-// while(true) {
-// require("$CFG->dirroot/theme/$theme/config.php"); // Sets up $THEME
-// if(!$THEME->parent) {
-// break;
-// }
-// $theme=$THEME->parent;
-// if(file_exists($possibility="$CFG->dirroot/theme/$theme/pix/$path")) {
-// $file=$possibility;
-// // Found in parent theme
-// break;
-// }
-// }
-// if(!$file) {
-// if(preg_match('|^mod/|',$path)) {
-// if(!file_exists($possibility="$CFG->dirroot/$path")) {
-// error('Requested image not found.');
-// }
-// } else {
-// if(!file_exists($possibility="$CFG->dirroot/pix/$path")) {
-// error('Requested image not found.');
-// }
-// }
-// $file=$possibility;
-// }
-//}
-//
-//// Handle If-Modified-Since because send_file doesn't
-//$filedate=filemtime($file);
-//$ifmodifiedsince=isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? $_SERVER['HTTP_IF_MODIFIED_SINCE'] : false;
-//if($ifmodifiedsince && strtotime($ifmodifiedsince)>=$filedate) {
-// header('HTTP/1.0 304 Not Modified');
-// exit;
-//}
-//// Don't need to set last-modified, send_file does that
-//
-//if (empty($CFG->filelifetime)) {
-// $lifetime = 86400; // Seconds for files to remain in caches
-//} else {
-// $lifetime = $CFG->filelifetime;
-//}
-//send_file($file,preg_replace('|^.*/|','',$file),$lifetime);
// TODO log this page view.
- $localcss = '<link rel="stylesheet" type="text/css" href="'.$CFG->wwwroot.
- '/lib/yui/container/assets/container.css" />';
$context = $contexts->lowest();
$streditingquestions = get_string('editquestions', "quiz");
if ($cm!==null) {
$pageurl->param('quizid', $quizid);
}
$PAGE->set_url($pageurl);
- $PAGE->set_generaltype('popup');
+ $PAGE->set_pagelayout('popup');
// Test if we are continuing an attempt at a question
$continue = optional_param('continue', 0, PARAM_BOOL);
if (file_exists($plugindir . '/script.php')) {
$PAGE->requires->js($plugindirrel . '/script.php');
}
-
- if (file_exists($plugindir . '/styles.css')) {
- $PAGE->requires->css($plugindirrel . '/styles.css');
- }
- if (file_exists($plugindir . '/styles.php')) {
- $PAGE->requires->css($plugindirrel . '/styles.php');
- }
}
/**
require_login();
// disable blocks in this page
-$PAGE->set_generaltype('embedded');
+$PAGE->set_pagelayout('embedded');
// general parameters
$action = optional_param('action', '', PARAM_ALPHA);
$PAGE->requires->yui_lib('button')->in_head();
$PAGE->requires->yui_lib('selector')->in_head();
- //TODO: remove following after we moe the content of file
- // proper place (==themes)
- $PAGE->requires->css('repository/repository.css');
-
//TODO: remove the ->in_head() once we refactor the inline script tags in repo code
$PAGE->requires->js('repository/repository.src.js')->in_head();
+
}
/**
'size' => 0,
'date' => '',
'source'=> $params,
- 'thumbnail' => $OUTPUT->old_icon_url($icon)
+ 'thumbnail' => $OUTPUT->old_icon_url($icon),
);
$list[] = $node;
}
+++ /dev/null
-/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */
-/* copy from yui/examples/treeview/assets/css/folders/tree.css */
-/* first or middle sibling, no children */
-.ygtvtn { background: url(../pix/y/tn.gif) 0 0 no-repeat; width:17px; height:22px; }
-/* first or middle sibling, collapsable */
-.ygtvtm { background: url(../pix/y/tm.gif) 0 0 no-repeat; width:34px; height:22px; cursor:pointer }
-/* first or middle sibling, collapsable, hover */
-.ygtvtmh { background: url(../pix/y/tmh.gif) 0 0 no-repeat; width:34px; height:22px; cursor:pointer }
-/* first or middle sibling, expandable */
-.ygtvtp { background: url(../pix/y/tp.gif) 0 0 no-repeat; width:34px; height:22px; cursor:pointer }
-/* first or middle sibling, expandable, hover */
-.ygtvtph { background: url(../pix/y/tph.gif) 0 0 no-repeat; width:34px; height:22px; cursor:pointer }
-/* last sibling, no children */
-.ygtvln { background: url(../pix/y/ln.gif) 0 0 no-repeat; width:17px; height:22px; }
-/* Last sibling, collapsable */
-.ygtvlm { background: url(../pix/y/lm.gif) 0 0 no-repeat; width:34px; height:22px; cursor:pointer }
-/* Last sibling, collapsable, hover */
-.ygtvlmh { background: url(../pix/y/lmh.gif) 0 0 no-repeat; width:34px; height:22px; cursor:pointer }
-/* Last sibling, expandable */
-.ygtvlp { background: url(../pix/y/lp.gif) 0 0 no-repeat; width:34px; height:22px; cursor:pointer }
-/* Last sibling, expandable, hover */
-.ygtvlph { background: url(../pix/y/lph.gif) 0 0 no-repeat; width:34px; height:22px; cursor:pointer }
-/* Loading icon */
-.ygtvloading { background: url(../pix/y/loading.gif) 0 0 no-repeat; width:16px; height:22px; }
-/* the style for the empty cells that are used for rendering the depth
- * of the node */
-.ygtvdepthcell { background: url(../pix/y/vline.gif) 0 0 no-repeat; width:17px; height:22px; }
-.ygtvblankdepthcell { width:17px; height:22px; }
-/* the style of the div around each node */
-.ygtvitem { }
-.ygtvitem table{ margin-bottom:0; }
-.ygtvitem td { border:none;padding:0; }
-/* the style of the div around each node's collection of children */
-.ygtvchildren { }
-* html .ygtvchildren { height:1%; }
-/* the style of the text label in ygTextNode */
-.ygtvlabel, .ygtvlabel:link, .ygtvlabel:visited, .ygtvlabel:hover { margin-left:2px; text-decoration: none; }
-
-
-.file-picker{font-size:12px;}
-.file-picker strong{background:#FFFFCC}
-.file-picker a{color: #336699}
-.file-picker a:hover{background:#003366;color:white}
-.fp-panel{padding:0;margin:0; text-align:left;}
-.fp-login-form{text-align:center}
-.fp-searchbar{float:right}
-.fp-viewbar{width:300px;float:left}
-.fp-toolbar{padding: .8em;background: #FFFFCC;text-align:center;margin: 3px}
-.fp-toolbar a{padding: 0 .5em}
-.fp-list{list-style-type:none;padding:0;float:left;width:100%;margin:0;}
-.fp-list li{border-bottom:1px dotted gray;margin-bottom: 1em;}
-.fp-repo-name{display:block;padding: .5em;margin-bottom: .5em}
-.fp-pathbar{margin: .4em;border-bottom: 1px dotted gray;}
-.fp-pathbar a{padding: .4em;}
-.fp-rename-form{text-align:center}
-.fp-rename-form p{margin: 1em;}
-.fp-upload-form{margin: 2em 0;text-align:center}
-.fp-upload-btn{clear:both;margin-top: 2em;}
-.fp-upload-btn a{cursor: default;background: white;border:1px solid gray;color:black;padding: .5em}
-.fp-upload-btn a:hover {background: grey;color:white}
-.fp-paging{margin:1em .5em; clear:both;text-align:center;line-height: 2.5em;}
-.fp-paging a{padding: .5em;border: 1px solid #CCC}
-.fp-paging a.cur_page{border: 1px solid blue}
-.fp-popup{text-align:center}
-.fp-grid{float:left;text-align:center;}
-.fp-grid div{overflow: hidden}
-.fp-grid p{margin:0;padding:0;background: #FFFFCC}
-.fp-grid .label{height:48px;text-align:center}
-.fp-grid span{color:gray}
-.fp-error {padding: 2em 0; margin: 3em 5px;text-align:center;background: #FFBBBB}
-.fp-msg {padding: 2em 0; margin: 3em 5px;text-align:center;background: green}
-/* file picker search dialog */
-div.bd{text-align:left}
-
-
-/* TODO: Fix IE6 somehow
-.yui-skin-sam .yui-panel .hd{}
-*/
if ($listing->doctype == 'user'){ // A special handle for users
$icon = $OUTPUT->user_picture(moodle_user_picture($listing->userid, 0));
} else {
- $iconpath = $OUTPUT->mod_icon_url('icon', $listing->doctype);
+ $iconpath = $OUTPUT->old_icon_url('icon', $listing->doctype);
$icon = "<img align=\"top\" src=\"".$iconpath."\" class=\"activityicon\" alt=\"\"/>";
}
- $coursename = $DB->get_field('course', 'fullname', array('id' => $listing->courseid));
+ $coursename = $DB->get_field('course', 'fullname', array('id' => $listing->courseid));
$courseword = mb_convert_case(get_string('course', 'moodle'), MB_CASE_LOWER, 'UTF-8');
$course = ($listing->doctype != 'user') ? '<strong> ('.$courseword.': \''.$coursename.'\')</strong>' : '' ;
$PAGE->set_subpage($tag->id);
$PAGE->set_context($systemcontext);
$PAGE->set_blocks_editing_capability('moodle/tag:editblocks');
-$PAGE->set_generaltype('form');
+$PAGE->set_pagelayout('form');
$PAGE->requires->yui_lib('animation');
$PAGE->requires->yui_lib('autocomplete');
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$themename = basename(dirname(__FILE__));
-require_once(dirname(__FILE__) . '/../../theme/styles.php');
\ No newline at end of file
+die('Not converted yet...');
--- /dev/null
+<?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle 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 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle 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.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+
+
+/**
+ * Configuration for Moodle's standard theme.
+ *
+ * DO NOT COPY THIS INTO NEW THEMES! Instead use some other theme as a base
+ * for your experiments.
+ *
+ * Options related to theme customisations can be found at
+ * http://phpdocs.moodle.org/HEAD/moodlecore/theme_config.html
+ *
+ * For an overview of how Moodle themes work, Please see
+ * http://docs.moodle.org/en/Developement:How_Moodle_outputs_HTML
+ *
+ * @package moodlecore
+ * @copyright 2009 Tim Hunt
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
+$THEME->parents = array();
+
+$THEME->sheets = array(
+ 'pagelayout',
+ 'core',
+ 'blocks',
+ 'course',
+ 'block_calendar_month',
+);
+
+$THEME->editor_sheets = array();
+
+$THEME->layouts = array(
+ // Most pages - if we encounter an unknown or a missing page type, this one is used.
+ 'normal' => array(
+ 'theme' => 'base',
+ 'file' => 'general.php',
+ 'regions' => array('side-pre', 'side-post'),
+ 'defaultregion' => 'side-post'
+ ),
+ // Course page
+ 'course' => array(
+ 'theme' => 'base',
+ 'file' => 'general.php',
+ 'regions' => array('side-pre', 'side-post'),
+ 'defaultregion' => 'side-post'
+ ),
+ // The site home page.
+ 'home' => array(
+ 'theme' => 'base',
+ 'file' => 'home.php',
+ 'regions' => array('side-pre', 'side-post'),
+ 'defaultregion' => 'side-post'
+ ),
+ // Server administration scripts.
+ 'admin' => array(
+ 'theme' => 'base',
+ 'file' => 'general.php',
+ 'regions' => array('side-pre'),
+ 'defaultregion' => 'side-pre'
+ ),
+ // My moodle page
+ 'my' => array(
+ 'theme' => 'base',
+ 'file' => 'general.php',
+ 'regions' => array('side-pre', 'side-post'),
+ 'defaultregion' => 'side-post'
+ ),
+
+ // Settings form pages, like course of module settings.
+ 'form' => array(
+ 'theme' => 'base',
+ 'file' => 'general.php',
+ 'regions' => array(),
+ ),
+ // Pages that appear in pop-up windows - no navigation, no blocks, no header.
+ 'popup' => array(
+ 'theme' => 'base',
+ 'file' => 'general.php',
+ 'regions' => array(),
+ 'options' => array('nofooter'=>true),
+ ),
+ // No blocks and minimal footer - used for legacy frame layouts only!
+ 'frametop' => array(
+ 'theme' => 'base',
+ 'file' => 'general.php',
+ 'regions' => array(),
+ 'options' => array('nofooter'),
+ ),
+ // Embeded pages, like iframe embeded in moodleform
+ 'embedded' => array(
+ 'theme' => 'base',
+ 'file' => 'embedded.php',
+ 'regions' => array(),
+ 'options' => array('nofooter'=>true, 'nonavbar'=>true),
+ ),
+ // Used during upgrade and install, and for the 'This site is undergoing maintenance' message.
+ // This must not have any blocks, and it is good idea if it does not have links to
+ // other places - for example there should not be a home link in the footer...
+ 'maintenance' => array(
+ 'theme' => 'base',
+ 'file' => 'general.php',
+ 'regions' => array(),
+ 'options' => array('nofooter'=>true, 'nonavbar'=>true),
+ ),
+);
+
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
<title><?php echo $PAGE->title ?></title>
- <link rel="shortcut icon" href="<?php echo $CFG->themewww .'/'. current_theme() ?>/favicon.ico" />
+ <link rel="shortcut icon" href="<?php echo $OUTPUT->old_icon_url('favicon', 'theme')?>" />
<?php echo $OUTPUT->standard_head_html() ?>
</head>
<body id="<?php echo $PAGE->pagetype ?>" class="<?php echo $PAGE->bodyclasses ?>">
<?php echo $OUTPUT->standard_top_of_body_html() ?>
<div id="page">
+
<!-- END OF HEADER -->
+
<div id="content" class="clearfix">
- [MAIN CONTENT GOES HERE]
+ <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
</div>
<!-- START OF FOOTER -->
- <div id="footer" class="clearfix">
- </div>
</div>
<?php echo $OUTPUT->standard_end_of_body_html() ?>
</body>
-</html>
+</html>
\ No newline at end of file
--- /dev/null
+<?php
+
+$regionsinfo = 'pagelayout';
+if ($PAGE->blocks->region_has_content('side-pre', $OUTPUT)) {
+ $regionsinfo .= '-pre';
+}
+if ($PAGE->blocks->region_has_content('side-post', $OUTPUT)) {
+ $regionsinfo .= '-post';
+}
+
+echo $OUTPUT->doctype() ?>
+<html <?php echo $OUTPUT->htmlattributes() ?>>
+<head>
+ <title><?php echo $PAGE->title ?></title>
+ <link rel="shortcut icon" href="<?php echo $OUTPUT->old_icon_url('favicon', 'theme')?>" />
+ <?php echo $OUTPUT->standard_head_html() ?>
+</head>
+<body id="<?php echo $PAGE->pagetype ?>" class="<?php echo $PAGE->bodyclasses ?>">
+<?php echo $OUTPUT->standard_top_of_body_html() ?>
+
+<div id="page" class="<?php echo $regionsinfo ?>">
+
+<?php if ($PAGE->heading) { ?>
+ <div id="header" class="clearfix">
+ <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
+ <div class="headermenu"><?php echo $PAGE->headingmenu ?></div>
+ </div>
+<?php } ?>
+
+<?php if (empty($PAGE->layout_options['nonavbar']) and $PAGE->has_navbar()) { // This is the navigation bar with breadcrumbs ?>
+ <div class="navbar clearfix">
+ <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
+ <div class="navbutton"><?php echo $PAGE->button; ?></div>
+ </div>
+<?php } ?>
+<!-- END OF HEADER -->
+
+ <div class="regions-outer clearfix">
+ <div id="regions">
+ <div class="regions-inner">
+ <div class="contentwrap">
+ <div id="content">
+ <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
+ </div>
+ </div>
+ <?php if ($PAGE->blocks->region_has_content('side-pre', $OUTPUT)) { ?>
+ <div id="region-side-pre" class="block-region">
+ <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
+ </div>
+ <?php } ?>
+ <?php if ($PAGE->blocks->region_has_content('side-post', $OUTPUT)) { ?>
+ <div id="region-side-post" class="block-region">
+ <?php echo $OUTPUT->blocks_for_region('side-post') ?>
+ </div>
+ <?php } ?>
+ </div>
+ </div>
+ </div>
+
+<!-- START OF FOOTER -->
+ <?php if (empty($PAGE->layout_options['nofooter'])) { ?>
+ <div id="footer" class="clearfix">
+ <p class="helplink">
+ <?php echo page_doc_link(get_string('moodledocslink')) ?>
+ </p>
+
+ <?php
+ echo $OUTPUT->login_info();
+ echo $OUTPUT->home_link();
+ echo $OUTPUT->standard_footer_html();
+ ?>
+ </div>
+ <?php } ?>
+</div>
+<?php echo $OUTPUT->standard_end_of_body_html() ?>
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+<?php
+
+$regionsinfo = 'pagelayout';
+if ($PAGE->blocks->region_has_content('side-pre', $OUTPUT)) {
+ $regionsinfo .= '-pre';
+}
+if ($PAGE->blocks->region_has_content('side-post', $OUTPUT)) {
+ $regionsinfo .= '-post';
+}
+
+echo $OUTPUT->doctype() ?>
+<html <?php echo $OUTPUT->htmlattributes() ?>>
+<head>
+ <title><?php echo $PAGE->title ?></title>
+ <link rel="shortcut icon" href="<?php echo $OUTPUT->old_icon_url('favicon', 'theme')?>" />
+ <meta name="description" content="<?php echo strip_tags(format_text($SITE->summary, FORMAT_HTML)) ?>" />
+ <?php echo $OUTPUT->standard_head_html() ?>
+</head>
+<body id="<?php echo $PAGE->pagetype ?>" class="<?php echo $PAGE->bodyclasses ?>">
+<?php echo $OUTPUT->standard_top_of_body_html() ?>
+
+<div id="page" class="<?php echo $regionsinfo ?>">
+
+ <div id="header-home" class="clearfix">
+ <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
+ <div class="headermenu"><?php
+ if ($PAGE->headingmenu) {
+ echo $PAGE->headingmenu;
+ } else {
+ echo $OUTPUT->login_info();
+ }
+ ?></div>
+ </div>
+<!-- END OF HEADER -->
+
+ <div class="regions-outer clearfix">
+ <div id="regions">
+ <div class="regions-inner">
+ <div class="contentwrap">
+ <div id="content">
+ <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
+ </div>
+ </div>
+ <?php if ($PAGE->blocks->region_has_content('side-pre', $OUTPUT)) { ?>
+ <div id="region-side-pre" class="block-region">
+ <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
+ </div>
+ <?php } ?>
+ <?php if ($PAGE->blocks->region_has_content('side-post', $OUTPUT)) { ?>
+ <div id="region-side-post" class="block-region">
+ <?php echo $OUTPUT->blocks_for_region('side-post') ?>
+ </div>
+ <?php } ?>
+ </div>
+ </div>
+ </div>
+
+<!-- START OF FOOTER -->
+ <div id="footer" class="clearfix">
+ <p class="helplink">
+ <?php echo page_doc_link(get_string('moodledocslink')) ?>
+ </p>
+
+ <?php
+ echo $OUTPUT->login_info();
+ echo $OUTPUT->home_link();
+ echo $OUTPUT->standard_footer_html();
+ ?>
+ </div>
+</div>
+<?php echo $OUTPUT->standard_end_of_body_html() ?>
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+.block_calendar_month table.minicalendar {
+ width: 100%;
+}
+
+.block_calendar_month table.minicalendar td {
+ text-align: center;
+}
+
+/*Accessibility: controls now div and span, 20:60:20% or 12:76:12% */
+.block_calendar_month .calendar-controls .previous,
+.block_calendar_month .calendar-controls .next,
+.block_calendar_month .calendar-controls .current {
+ display: block;
+ float: left;
+ width: 12%;
+}
+
+.block_calendar_month .calendar-controls .previous {
+ text-align: left;
+}
+
+.block_calendar_month .calendar-controls .current {
+ text-align: center;
+ width: 76%;
+}
+
+.block_calendar_month .calendar-controls .next {
+ text-align: right;
+}
--- /dev/null
+
+/** General **/
+
+.block-region .hidden .content {
+ display: none;
+}
+
+.sideblock .header .hide-show-image {
+ float:right;
+}
+
+.sideblock div.column {
+ margin:0px;
+ margin-right:4px;
+ padding:0px;
+}
+
+.sideblock div.column.c0 {
+ float: left;
+}
+
+.sideblock div.column.c1 {
+ display: inline;
+}
+
+.sideblock .content .c0 img.icon {
+ margin:0px;
+}
+
+.sideblock .content .list, .unlist, .inline-list {
+ list-style:none;
+ padding:0;
+ margin:0;
+}
+
+.sideblock .content .list {
+ width: 100%;
+}
+
+.sideblock .content .list li {
+ clear: left;
+}
+
+.sideblock .content .inline-list li, .inline-list li {
+ display: inline;
+}
+
+.sideblock .content ul.list li.listentry {
+ clear:both;
+}
+
+.sideblock .content div.info {
+ text-align:center;
+}
+
+.sideblock .footer {
+ margin-bottom: 4px;
+ text-align:center;
+ clear:both;
+}
+
+.sideblock img.userpicture {
+ width:16px;
+ height:16px;
+ margin-right:4px;
+}
+
+.sideblock.beingmoved {
+ border-width: 2px;
+ border-style: dashed;
+}
+
+/** Navigation and settings block **/
+.ie6 .sideblock .block_tree,
+.ie7 .sideblock .block_tree {
+ overflow-x:scroll;
+}
+.block_tree {
+ list-style: none;
+ padding-left:0px;
+}
+.block_tree ul {
+ margin-left: 0px;
+ padding-left:16px;
+ list-style: none;
+}
+.sideblock .block_tree {
+ overflow-x:auto;
+ overflow-y:visible;
+}
+.block_tree .tree_item {
+ white-space:nowrap;
+ margin:2px 0px;
+ padding-left: 16px;
+ margin:3px 0px;
+ white-space:nowrap;
+ text-align:left;
+}
+.ie6 .block_tree .tree_item {
+ width:100%;
+}
+.block_tree .tree_item.branch {
+ background-image: url([[pix:t/expanded]]);
+ background-position: center left;
+ background-repeat: no-repeat;
+}
+.block_tree .root_node.leaf {
+ padding-left:0px;
+}
+.block_tree .current_branch {
+ font-weight:bold;
+}
+
+.jsenabled .sideblock_js_sidebarpopout,
+.jsenabled .block_tree .collapsed ul {
+ display: none;
+}
+.jsenabled .block_tree .tree_item.branch {
+ cursor:pointer;
+}
+.jsenabled .block_tree .collapsed .tree_item.branch {
+ background-image: url([[pix:t/collapsed]]);
+}
+.jsenabled .block_tree .tree_item.emptybranch {
+ background-image: url([[pix:t/collapsed_empty]]);
+ background-position: center left;
+ background-repeat: no-repeat;
+}
+.block_tree_box .requiresjs {
+ display:none;
+}
+.jsenabled .block_tree_box .requiresjs {
+ display:inline;
+}
--- /dev/null
+/***
+ * Accessibility features
+ **/
+
+/*Accessibility: text 'seen' by screen readers but not visual users. */
+.accesshide {
+ position:absolute;
+ top:-100000px;
+ left:10px;
+ font-weight:normal;
+ font-size:1em;
+}
+span.hide,
+div.hide {
+ display:none;
+}
+
+/*Accessibility: Skip block link, for keyboard-only users. */
+a.skip-block, a.skip {
+ position: absolute;
+ top: -1000em;
+ font-size: 0.85em;
+}
+a.skip-block:focus, a.skip-block:active,
+a.skip:focus, a.skip:active {
+ position: static;
+ display: block;
+}
+.skip-block-to {
+ display: block;
+ height: 1px;
+ overflow: hidden;
+}
+
+a.skip-block {
+ text-decoration:none;
+}
+
+/***
+ * General
+ **/
+
+.clearer {
+ clear:both;
+ margin:0;
+ padding:0;
+ height:1px;
+ border:none;
+ background:transparent;
+ display:block;
+}
+
+.clearfix:after {
+ min-width: 0;
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+}
+
+.generalbox {
+ border-width: 1px;
+ border-style: solid;
+}
+
+.boxaligncenter {
+ margin-left:auto;
+ margin-right:auto;
+}
+
+.boxalignright {
+ margin-left:auto;
+ margin-right:0;
+}
+
+.boxalignleft {
+ margin-left:0;
+ margin-right:auto;
+}
+
+.boxwidthnarrow {
+ width: 30%
+}
+
+.boxwidthnormal {
+ width: 50%
+}
+
+.boxwidthwide {
+ width: 80%
+}
+
+.mdl-align {
+ text-align: center;
+}
+.mdl-left {
+ text-align: left;
+}
+.mdl-right {
+ text-align: right;
+}
+
+/***
+ * Header
+ **/
+
+.breadcrumb ul {
+ padding:0;
+ margin:0;
+ text-indent:0;
+ list-style:none;
+}
+.breadcrumb li {
+ display:inline;
+}
+
+.navbar .navbutton div,
+.navbar .navbutton form {
+ display:inline;
+}
+
+/***
+ ** Course stuff
+ **/
+
+.section_add_menus .horizontal div,
+.section_add_menus .horizontal form {
+ display:inline;
+}
+
+.course-content .section .activity img.activityicon {
+ vertical-align:middle;
+ height:16px;
+ width:16px;
+}
--- /dev/null
+
+#page {
+ /* 100% page width */
+ margin: auto 0px;
+ width: auto;
+}
+
+/***
+ * Three column layout
+ * based on: http://matthewjamestaylor.com/blog/ultimate-3-column-holy-grail-pixels.htm
+ ***/
+
+.pagelayout-pre-post .regions-outer {
+ position:relative; /* This fixes the IE7 overflow hidden bug and stops the layout jumping out of place */
+ clear:both;
+ float:left;
+ width:100%; /* width of whole page */
+ overflow:hidden; /* This chops off any overhanging divs */
+}
+
+.pagelayout-pre-post #regions {
+ float:left;
+ width:200%;
+ margin-left:-200px; /* Width of right column */
+ position:relative;
+ right:100%;
+ /* content background colour goes here */
+}
+.pagelayout-pre-post .regions-inner {
+ float:left;
+ width:100%;
+ margin-left:-50%;
+ position:relative;
+ left:400px; /* Left column width + right column width */
+ /* side-pre background colour goes here */
+}
+.pagelayout-pre-post .contentwrap {
+ float:left;
+ width:50%;
+ position:relative;
+ right:200px; /* Width of left column */
+ padding-bottom:1em; /* Centre column bottom padding. Leave it out if it's zero */
+}
+.pagelayout-pre-post #content {
+ margin:0 205px; /* Centre column side padding:
+ Left padding = left column width + centre column left padding width
+ Right padding = right column width + centre column right padding width */
+ position:relative;
+ left:200%;
+ overflow:hidden;
+}
+.pagelayout-pre-post #region-side-pre {
+ float:left;
+ float:right; /* This overrides the float:left above */
+ width:190px; /* Width of left column content (left column width minus left and right padding) */
+ position:relative;
+ right:5px; /* Width of the left-had side padding on the left column */
+}
+.pagelayout-pre-post #region-side-post {
+ float:left;
+ float:right; /* This overrides the float:left above */
+ width:190px; /* Width of right column content (right column width minus left and right padding) */
+ margin-right:15px; /* Width of right column right-hand padding + left column left and right padding */
+ position:relative;
+ left:50%;
+ /* side-post background colour goes here */
+}
+
+/***
+ * Two column layout (blocks left)
+ * based on: http://matthewjamestaylor.com/blog/ultimate-2-column-left-menu-pixels.htm
+ ***/
+
+.pagelayout-pre .regions-outer {
+ width: 100%;
+}
+.pagelayout-pre #regions {
+ position:relative; /* This fixes the IE7 overflow hidden bug and stops the layout jumping out of place */
+ clear:both;
+ float:left;
+ width:100%; /* width of whole page */
+ overflow:hidden; /* This chops off any overhanging divs */
+}
+.pagelayout-pre .regions-inner {
+ float:left;
+ width:200%;
+ position:relative;
+ left:200px;
+ /* content background colour goes here */
+}
+.pagelayout-pre .contentwrap {
+ float:right;
+ width:50%;
+ position:relative;
+ right:200px;
+ padding-bottom:1em;
+}
+.pagelayout-pre #content {
+ margin:0 5px 0 205px;
+ position:relative;
+ right:100%;
+ overflow:hidden;
+}
+.pagelayout-pre #region-side-pre {
+ float:left;
+ width:190px;
+ position:relative;
+ right:195px;
+ /* side-pre background colour goes here */
+}
+
+/***
+ * Two column layout (blocks right)
+ * based on: http://matthewjamestaylor.com/blog/ultimate-2-column-right-menu-pixels.htm
+ ***/
+
+.pagelayout-pre .regions-outer {
+ width: 100%;
+}
+.pagelayout-post #regions {
+ position:relative; /* This fixes the IE7 overflow hidden bug and stops the layout jumping out of place */
+ clear:both;
+ float:left;
+ width:100%; /* width of whole page */
+ overflow:hidden; /* This chops off any overhanging divs */
+}
+.pagelayout-post .regions-inner {
+ float:left;
+ width:200%;
+ margin-left:-200px;
+ position:relative;
+ right:100%;
+ background:#fff;
+}
+.pagelayout-post .contentwrap {
+ float:left;
+ width:50%;
+ position:relative;
+ left:50%;
+ padding-bottom:1em;
+}
+.pagelayout-post #content {
+ margin:0 5px 0 205px;
+ overflow:hidden;
+}
+.pagelayout-post #region-side-post {
+ float:right;
+ width:190px;
+ position:relative;
+ left:195px;
+}
+
+/***
+ * One columns layout - no blocks
+ ***/
+
+.pagelayout .regions-outer {
+ width: 100%;
+}
+.pagelayout #content {
+ margin: 0 5px 0 5px;
+}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$themename = basename(dirname(__FILE__));
-require_once(dirname(__FILE__) . '/../../theme/styles.php');
\ No newline at end of file
+die('Not converted yet...');
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$themename = basename(dirname(__FILE__));
-require_once(dirname(__FILE__) . '/../../theme/styles.php');
\ No newline at end of file
+die('Not converted yet...');
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$themename = basename(dirname(__FILE__));
-require_once(dirname(__FILE__) . '/../../theme/styles.php');
\ No newline at end of file
+die('Not converted yet...');
--- /dev/null
+<?php
+
+/**
+ * This is a slight variatoin on the standard_renderer_factory that uses
+ * custom_corners_core_renderer instead of moodle_core_renderer.
+ *
+ * This generates the slightly different HTML that the custom_corners theme expects.
+ *
+ * @copyright 2009 Tim Hunt
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @deprecated Required to make the old $THEME->customcorners setting work.
+ */
+class custom_corners_renderer_factory extends standard_renderer_factory {
+ public function __construct($theme) {
+ parent::__construct($theme);
+ global $CFG;
+ require_once($CFG->themedir . '/custom_corners/renderers.php');
+ }
+ /* Implement the subclass method. */
+ public function get_renderer($module, $page, $subtype=null) {
+ if ($module == 'core') {
+ return new custom_corners_core_renderer($page);
+ }
+ return parent::get_renderer($module, $page, $subtype);
+ }
+}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$themename = basename(dirname(__FILE__));
-require_once(dirname(__FILE__) . '/../../theme/styles.php');
\ No newline at end of file
+die('Not converted yet...');
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$themename = basename(dirname(__FILE__));
-require_once(dirname(__FILE__) . '/../../theme/styles.php');
\ No newline at end of file
+die('Not converted yet');
\ No newline at end of file
--- /dev/null
+<?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle 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 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle 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.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * This file is responsible for serving the one theme and plugin images.
+ *
+ * @package moodlecore
+ * @copyright 2009 Petr Skoda (skodak) {@link http://skodak.org}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+// we need just the values from config.php and minlib.php
+define('ABORT_AFTER_CONFIG', true);
+require('../config.php'); // this stops immediately at the beginning of lib/setup.php
+
+$themename = min_optional_param('theme', 'standard', 'SAFEDIR');
+$component = min_optional_param('component', 'moodle', 'SAFEDIR');
+$image = min_optional_param('image', '', 'SAFEPATH');
+$rev = min_optional_param('rev', -1, 'INT');
+
+if (empty($component) or empty($image)) {
+ image_not_found();
+}
+
+if (!file_exists("$CFG->dirroot/theme/$themename/config.php") and !file_exists("$CFG->dataroot/theme/$themename/config.php")) {
+ image_not_found();
+}
+
+$candidatelocation = "$CFG->dataroot/cache/theme/$themename/pix/$component";
+
+if ($rev > -1) {
+ if (file_exists("$candidatelocation/$image.error")) {
+ // this is a major speedup if there are multiple missing images,
+ // the only problem is that random requests may pollute our cache.
+ image_not_found();
+ }
+ $cacheimage = false;
+ if (file_exists("$candidatelocation/$image.gif")) {
+ $cacheimage = "$candidatelocation/$image.gif";
+ } else if (file_exists("$candidatelocation/$image.png")) {
+ $cacheimage = "$candidatelocation/$image.png";
+ } else if (file_exists("$candidatelocation/$image.jpg")) {
+ $cacheimage = "$candidatelocation/$image.jpg";
+ } else if (file_exists("$candidatelocation/$image.jpeg")) {
+ $cacheimage = "$candidatelocation/$image.jpeg";
+ } else if (file_exists("$candidatelocation/$image.ico")) {
+ $cacheimage = "$candidatelocation/$image.ico";
+ }
+ if ($cacheimage) {
+ if (!empty($_SERVER['HTTP_IF_NONE_MATCH'])) {
+ // we do not actually need to verify the etag value because our files
+ // never change in cache because we increment the rev parameter
+ header('HTTP/1.1 304 Not Modified');
+ die;
+ }
+ send_cached_image($cacheimage, $rev);
+ }
+}
+
+//=================================================================================
+// ok, now we need to start normal moodle script, we need to load all libs and $DB
+define('ABORT_AFTER_CONFIG_CANCEL', true);
+
+define('NO_MOODLE_COOKIES', true); // Session not used here
+define('NO_UPGRADE_CHECK', true); // Ignore upgrade check
+
+require("$CFG->dirroot/lib/setup.php");
+
+$theme = theme_config::load($themename);
+$imagefile = $theme->resolve_image_location($image, $component);
+
+$rev = theme_get_revision();
+
+if (empty($imagefile) or !is_readable($imagefile)) {
+ if ($rev > -1) {
+ // make note we can not find this file
+ $cacheimage = "$candidatelocation/$image.error";
+ $fp = fopen($cacheimage, 'w');
+ fclose($fp);
+ }
+ image_not_found();
+}
+
+
+if ($rev > -1) {
+ $pathinfo = pathinfo($imagefile);
+ $cacheimage = "$candidatelocation/$image.".$pathinfo['extension'];
+ if (!file_exists($cacheimage)) {
+ check_dir_exists(dirname($cacheimage), true, true);
+ copy($imagefile, $cacheimage);
+ }
+ send_cached_image($cacheimage, $rev);
+
+} else {
+ send_uncached_image($imagefile);
+}
+
+
+//=================================================================================
+//=== utility functions ==
+// we are not using filelib because we need to fine tune all header
+// parameters to get the best performance.
+
+function send_cached_image($imagepath, $rev) {
+ $lifetime = 60*60*24*3;
+ $pathinfo = pathinfo($imagepath);
+ $imagename = $pathinfo['filename'].'.'.$pathinfo['extension'];
+
+ switch($pathinfo['extension']) {
+ case 'gif' : $mimetype = 'image/gif'; break;
+ case 'png' : $mimetype = 'image/png'; break;
+ case 'jpg' : $mimetype = 'image/jpeg'; break;
+ case 'jpeg' : $mimetype = 'image/jpeg'; break;
+ case 'ico' : $mimetype = 'image/vnd.microsoft.icon'; break;
+ default: $mimetype = 'document/unknown';
+ }
+
+ header('Etag: '.md5("$rev/$imagepath"));
+ header('Content-Disposition: inline; filename="'.$imagename.'"');
+ header('Last-Modified: '. gmdate('D, d M Y H:i:s', filemtime($imagepath)) .' GMT');
+ header('Expires: '. gmdate('D, d M Y H:i:s', time() + $lifetime) .' GMT');
+ header('Pragma: ');
+ header('Accept-Ranges: none');
+ header('Content-Type: '.$mimetype);
+ header('Content-Length: '.filesize($imagepath));
+
+ while (@ob_end_flush()); //flush the buffers - save memory and disable sid rewrite
+ readfile($imagepath);
+ die;
+}
+
+function send_uncached_image($imagepath) {
+ $pathinfo = pathinfo($imagepath);
+ $imagename = $pathinfo['filename'].'.'.$pathinfo['extension'];
+
+ switch($pathinfo['extension']) {
+ case 'gif' : $mimetype = 'image/gif'; break;
+ case 'png' : $mimetype = 'image/png'; break;
+ case 'jpg' : $mimetype = 'image/jpeg'; break;
+ case 'jpeg' : $mimetype = 'image/jpeg'; break;
+ case 'ico' : $mimetype = 'image/vnd.microsoft.icon'; break;
+ default: $mimetype = 'document/unknown';
+ }
+
+ header('Content-Disposition: inline; filename="'.$imagename.'"');
+ header('Last-Modified: '. gmdate('D, d M Y H:i:s', time()) .' GMT');
+ header('Expires: '. gmdate('D, d M Y H:i:s', time() + 2) .' GMT');
+ header('Pragma: ');
+ header('Accept-Ranges: none');
+ header('Content-Type: '.$mimetype);
+ header('Content-Length: '.filesize($imagepath));
+
+ while (@ob_end_flush()); //flush the buffers - save memory and disable sid rewrite
+ readfile($imagepath);
+ die;
+}
+
+function image_not_found() {
+ header('HTTP/1.0 404 not found');
+ die('Image was not found, sorry.');
+}
\ No newline at end of file
require_once(dirname(__FILE__) . '/../config.php');
require_once($CFG->libdir . '/adminlib.php');
-$choose = optional_param('choose', '', PARAM_FILE);
+$choose = optional_param('choose', '', PARAM_SAFEDIR);
+$reset = optional_param('reset', 0, PARAM_BOOL);
admin_externalpage_setup('themeselector');
unset($SESSION->theme);
-if ($choose and confirm_sesskey()) {
+if ($reset and confirm_sesskey()) {
+ theme_reset_all_caches();
+
+} else if ($choose and confirm_sesskey()) {
// The user has chosen one theme from the list of all themes, show a
// 'You have chosen a new theme' confirmation page.
- if (!is_dir($CFG->themedir .'/'. $choose)) {
- print_error('themenotinstall');
- }
+ $theme = theme_config::load($choose);
+ $choose = $theme->name;
set_config('theme', $choose);
admin_externalpage_print_header();
echo $OUTPUT->heading(get_string('themesaved'));
- $readmehtml = $CFG->themedir . '/' . $choose . '/README.html';
- $readmetxt = $CFG->themedir . '/' . $choose . '/README.txt';
- if (is_readable($readmehtml)) {
- echo $OUTPUT->box_start();
- readfile($readmehtml);
- echo $OUTPUT->box_end();
-
- } else if (is_readable($readmetxt)) {
- echo $OUTPUT->box_start();
- $text = file_get_contents($readmetxt);
- echo format_text($text, FORMAT_MOODLE);
- echo $OUTPUT->box_end();
- }
+ echo $OUTPUT->box_start();
+ $text = get_string('choosereadme', 'theme_'.$CFG->theme);
+ echo format_text($text, FORMAT_MOODLE);
+ echo $OUTPUT->box_end();
echo $OUTPUT->continue_button($CFG->wwwroot . '/' . $CFG->admin . '/index.php');
admin_externalpage_print_header('themeselector');
echo $OUTPUT->heading(get_string('themes'));
+echo $OUTPUT->button(html_form::make_button('index.php', array('sesskey'=>sesskey(),'reset'=>1), get_string('themeresetcaches', 'admin')));
+
$table = new html_table();
$table->id = 'adminthemeselector';
$table->head = array(get_string('theme'), get_string('info'));
$themes = get_plugin_list('theme');
-$sesskey = sesskey();
+
foreach ($themes as $themename => $themedir) {
// Load the theme config.
try {
$theme = theme_config::load($themename);
- } catch (coding_exception $e) {
+ } catch (Exception $e) {
// Bad theme, just skip it for now.
continue;
}
+ if ($themename !== $theme->name) {
+ //obsoleted or broken theme, just skip for now
+ continue;
+ }
// Build the table row, and also a list of items to go in the second cell.
$row = array();
$infoitems = array();
- // Preview link.
- $infoitems['preview'] = '<a href="preview.php?preview=' . $themename . '">' . get_string('preview') . '</a>';
- // First cell (a preview) and also a link to the screenshot, if there is one.
- $screenshotpath = '';
- if (file_exists($theme->dir . '/screenshot.png')) {
- $screenshotpath = $themename . '/screenshot.png';
- } else if (file_exists($theme->dir . '/screenshot.jpg')) {
- $screenshotpath = $themename . '/screenshot.jpg';
- }
- if ($screenshotpath) {
- $infoitems['screenshot'] = '<a href="' . $CFG->themewww .'/'. $screenshotpath . '">' .
- get_string('screenshot') . '</a>';
- }
-
- // Link to the themes's readme.
- $readmeurl = '';
- if (file_exists($theme->dir . '/README.html')) {
- $readmeurl = $CFG->themewww .'/'. $themename .'/README.html';
- } else if (file_exists($theme->dir . '/README.txt')) {
- $readmeurl = $CFG->themewww .'/'. $themename .'/README.txt';
- }
- if ($readmeurl) {
- $link = html_link::make($readmeurl, get_string('info'));
- $link->add_action(new popup_action('click', $link->url, $themename));
- $infoitems['readme'] = $OUTPUT->link($link);
- }
+ // link to the screenshot, now mandatory - the image path is hardcoded because we need image from other themes, not the current one
+ $screenshotpath = "$CFG->wwwroot/theme/image.php?theme=$themename&image=screenshot&component=theme";
// Contents of the first screenshot/preview cell.
- if ($screenshotpath) {
- $row[] = '<object type="text/html" data="' . $CFG->themewww .'/' . $screenshotpath .
- '" height="200" width="400">' . $themename . '</object>';
- } else {
- $row[] = '<object type="text/html" data="preview.php?preview=' . $themename .
- '" height="200" width="400">' . $themename . '</object>';
- }
+ $row[] = "<img src=\"$screenshotpath\" alt=\"$themename\" />";
// Contents of the second cell.
$infocell = $OUTPUT->heading($themename, 3);
- if ($infoitems) {
- $infocell .= "<ul>\n<li>" . implode("</li>\n<li>", $infoitems) . "</li>\n</ul>\n";
- }
if ($themename != $CFG->theme) {
- $infocell .= $OUTPUT->button(html_form::make_button('index.php', array('choose' => $themename, 'sesskey' => $sesskey),
- get_string('choose'), 'get'));
+ $infocell .= $OUTPUT->button(html_form::make_button('index.php', array('choose' => $themename, 'sesskey' => sesskey()), get_string('choose'), 'get'));
}
$row[] = $infocell;
echo $OUTPUT->table($table);
echo $OUTPUT->footer();
-?>
+
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$themename = basename(dirname(__FILE__));
-require_once(dirname(__FILE__) . '/../../theme/styles.php');
\ No newline at end of file
+die('Not converted yet...');
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$themename = basename(dirname(__FILE__));
-require_once(dirname(__FILE__) . '/../../theme/styles.php');
\ No newline at end of file
+die('Not converted yet...');
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$themename = basename(dirname(__FILE__));
-require_once(dirname(__FILE__) . '/../../theme/styles.php');
\ No newline at end of file
+die('Not converted yet...');
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$themename = basename(dirname(__FILE__));
-require_once(dirname(__FILE__) . '/../../theme/styles.php');
\ No newline at end of file
+die('Not converted yet...');
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$themename = basename(dirname(__FILE__));
-require_once(dirname(__FILE__) . '/../../theme/styles.php');
\ No newline at end of file
+die('Not converted yet...');
\ No newline at end of file
+++ /dev/null
-<?php
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle 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 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle 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.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
-/**
- * This page alows you to preview an arbitrary theme before selecting it.
- */
-
-require_once("../config.php");
-
-$preview = optional_param('preview','standard',PARAM_FILE); // which theme to show
-
-if (!file_exists($CFG->themedir .'/'. $preview)) {
- $preview = 'standard';
-}
-
-$PAGE->set_url(new moodle_url($CFG->wwwroot.'/theme/preview.php', array('preview'=>$preview)));
-
-require_login();
-
-require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
-
-$PAGE->force_theme($preview);
-
-$strthemes = get_string('themes');
-$strpreview = get_string('preview');
-
-$PAGE->navbar->add($strthemes);
-$PAGE->navbar->add($strpreview);
-$PAGE->set_title("$SITE->shortname: $strpreview");
-$PAGE->set_heading($SITE->fullname);
-
-echo $OUTPUT->header();
-echo $OUTPUT->box_start();
-echo $OUTPUT->heading($preview);
-echo $OUTPUT->box_end();
-echo $OUTPUT->footer();
+++ /dev/null
-<h3>STANDARD THEME</h3>
-<hr />
-
-<p>Moodle's default theme is a very neutral grey/white theme.</p>
-
-<p>This theme is always the most up-to date.</p>
-
-<p>Programmers working on Moodle should always design for this
-theme, and add new styles to this theme.</p>
-
-<p>By default, these styles are automatically loaded before any other
-themes, so that all custom themes need to do is to define their
-own styles to augment or overwrite particular standard styles.</p>
-
-<p>In this way custom themes are not "left behind" by Moodle upgrades.</p>
/**
* Configuration for Moodle's standard theme.
*
- * There is documentation of all the things that can be configured here at
+ * DO NOT COPY THIS INTO NEW THEMES! Instead use some other theme as a base
+ * for your experiments.
+ *
+ * Options related to theme customisations can be found at
* http://phpdocs.moodle.org/HEAD/moodlecore/theme_config.html
*
* For an overview of how Moodle themes work, Please see
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$THEME->sheets = array('styles_layout', 'styles_fonts', 'styles_color');
-
-$THEME->parent = null;
-$THEME->parentsheets = false;
-$THEME->standardsheets = true;
-$THEME->pluginsheets = array('mod', 'block', 'format', 'gradereport');
+$THEME->parents = array();
-$THEME->metainclude = false;
-$THEME->parentmetainclude = false;
-$THEME->standardmetainclude = true;
+// TODO: All old styles are now moved into this standard theme because
+// we need to go through all these and fix them.
+// This means we will gradually put these back into plugins
+// directories
+$THEME->sheets = array('styles_layout', 'styles_fonts', 'styles_color', 'styles_moz',
+ 'block_blog_tags',
+ 'block_calendar_month',
+ 'block_calendar_upcoming',
+ 'block_course_summary',
+ 'block_login',
+ 'block_news_items',
+ 'block_quiz_results',
+ 'block_rss_client',
+ 'block_search_forums',
+ 'block_tags',
+ 'blog_tags',
+ 'gradebook',
+ 'mod_assignment',
+ 'mod_chat',
+ 'mod_choice',
+ 'mod_data',
+ 'mod_feedback',
+ 'mod_folder',
+ 'mod_forum',
+ 'mod_glossary',
+ 'mod_lesson',
+ 'mod_page',
+ 'mod_quiz',
+ 'mod_resource',
+ 'mod_scorm',
+ 'mod_survey',
+ 'mod_wiki',
+);
-$THEME->custompix = false;
+$THEME->editor_sheets = array('styles_tinymce');
$THEME->layouts = array(
- // Most pages. Put this first, so if we encounter an unknown page type, this is used.
+ // Most pages - if we encounter an unknown or a missing page type, this one is used.
'normal' => array(
- 'layout' => 'layout.php',
+ 'theme' => 'standard',
+ 'file' => 'normal.php',
+ 'regions' => array('side-pre', 'side-post'),
+ 'defaultregion' => 'side-post'
+ ),
+ // Course page
+ 'course' => array(
+ 'theme' => 'standard',
+ 'file' => 'normal.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-post'
),
// The site home page.
'home' => array(
- 'layout' => 'layout-home.php',
+ 'theme' => 'standard',
+ 'file' => 'home.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-post'
),
+ // Server administration scripts.
+ 'admin' => array(
+ 'theme' => 'standard',
+ 'file' => 'normal.php',
+ 'regions' => array('side-pre'),
+ 'defaultregion' => 'side-pre'
+ ),
+ // My moodle page
+ 'my' => array(
+ 'theme' => 'standard',
+ 'file' => 'normal.php',
+ 'regions' => array('side-pre', 'side-post'),
+ 'defaultregion' => 'side-post'
+ ),
+
// Settings form pages, like course of module settings.
'form' => array(
- 'layout' => 'layout.php',
+ 'theme' => 'standard',
+ 'file' => 'normal.php',
'regions' => array(),
),
- // Pages that appear in pop-up windows.
+ // Pages that appear in pop-up windows - no navigation, no blocks, no header.
'popup' => array(
- 'layout' => 'layout-popup.php',
+ 'theme' => 'standard',
+ 'file' => 'minimal.php',
'regions' => array(),
),
- // Legacy frameset pages
- 'topframe' => array(
- 'layout' => 'layout-topframe.php',
+ // No blocks and minimal footer - used for legacy frame layouts only!
+ 'frametop' => array(
+ 'theme' => 'standard',
+ 'file' => 'frametop.php',
+ 'regions' => array(),
+ ),
+ // Embeded pages, like iframe embeded in moodleform
+ 'embedded' => array(
+ 'theme' => 'standard',
+ 'file' => 'embedded.php',
'regions' => array(),
),
// Used during upgrade and install, and for the 'This site is undergoing maintenance' message.
// This must not have any blocks, and it is good idea if it does not have links to
- // other places - for example there should not be a home link in the footer..
+ // other places - for example there should not be a home link in the footer...
'maintenance' => array(
- 'layout' => 'layout-popup.php',
+ 'theme' => 'standard',
+ 'file' => 'minimal.php',
'regions' => array(),
),
- // Embeded pages, like iframe embeded in moodleform
- 'embedded' => array(
- 'layout' => 'layout-embedded.php',
- 'regions' => array(),
- )
);
-$THEME->resource_mp3player_colors =
- 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.
- 'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.
- 'font=Arial&fontColour=3333FF&buffer=10&waitForPlay=no&autoPlay=yes';
-$THEME->filter_mediaplugin_colors =
- 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.
- 'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.
- 'waitForPlay=yes';
-
-//$THEME->rarrow = '►' //OR '→';
-//$THEME->larrow = '◄' //OR '←';
-//$CFG->block_search_button = link_arrow_right(get_string('search'), $url='', $accesshide=true);
-
-$THEME->navmenuwidth = 50;
-// You can use this to control the cutoff point for strings
-// in the navmenus (list of activities in popup menu etc)
-// Default is 50 characters wide.
-
-$THEME->makenavmenulist = false;
-// By setting this to true, then you will have access to a
-// new variable in your header.html and footer.html called
-// $navmenulist ... this contains a simple XHTML menu of
-// all activities in the current course, mostly useful for
-// creating popup navigation menus and so on.
+++ /dev/null
-<?php
-
- echo $OUTPUT->container_end(); // content container
-
- echo $OUTPUT->container_start('footer');
-
- echo '<p class="helplink">';
- echo page_doc_link(get_string('moodledocslink'));
- echo '</p>';
-
-
- if ($navigation and false) { ?>
- <div class="navbar clearfix">
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
- <div class="menu"><?php echo $menu; ?></div>
- </div>
-<?php }
-
- echo $loggedinas;
- echo $homelink;
-
- if (!empty($performanceinfo)) {
- echo $performanceinfo;
- }
-
- if (debugging()) { ?>
- <div class="validators"><ul>
- <li><a href="http://validator.w3.org/check?verbose=1&ss=1&uri=<?php echo urlencode(qualified_me()) ?>">Validate HTML</a></li>
- <li><a href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=-1&url1=<?php echo urlencode(qualified_me()) ?>">Section 508 Check</a></li>
- <li><a href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=0&warnp2n3e=1&url1=<?php echo urlencode(qualified_me()) ?>">WCAG 1 (2,3) Check</a></li>
- </ul></div>
-<?php }
-
- echo $OUTPUT->container_end();
-?>
-
-</div>
-</body>
-</html>
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html<?php echo $direction ?>>
-<head>
- <?php echo $meta ?>
- <meta name="keywords" content="moodle, <?php echo $title ?> " />
- <title><?php echo $title ?></title>
- <link rel="shortcut icon" href="<?php echo $CFG->themewww .'/'. current_theme() ?>/favicon.ico" />
- <?php include("$CFG->javascript"); ?>
-</head>
-
-<body<?php
- echo " $bodytags";
- if ($focus) {
- echo " onload=\"setfocus()\"";
- }
- ?>>
-
-<div id="page">
-
-<?php //Accessibility: 'headermain' is now H1, see theme/standard/styles_layout.css: .headermain
- if ($home) { // This is what gets printed on the home page only
-?>
- <?php echo $OUTPUT->container_start('clearfix header-home'); ?>
- <h1 class="headermain"><?php echo $heading ?></h1>
- <div class="headermenu"><?php echo $menu ?></div>
- <?php echo $OUTPUT->container_end(); ?>
-<?php } else if ($heading) { // This is what gets printed on any other page with a heading
-?>
- <?php echo $OUTPUT->container_start('clearfix header'); ?>
- <h1 class="headermain"><?php echo $heading ?></h1>
- <div class="headermenu"><?php echo $menu ?></div>
- <?php echo $OUTPUT->container_end(); ?>
-<?php } ?>
-<?php //Accessibility: breadcrumb trail/navbar now a DIV, not a table.
- if ($navigation) { // This is the navigation bar with breadcrumbs ?>
- <div class="navbar clearfix">
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
- <div class="navbutton"><?php echo $button; ?></div>
- </div>
-<?php } else if ($heading) { // If no navigation, but a heading, then print a line
-?>
- <hr />
-<?php } ?>
- <!-- END OF HEADER -->
- <?php echo $OUTPUT->container_start('content'); ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
<title><?php echo $PAGE->title ?></title>
- <link rel="shortcut icon" href="<?php echo $CFG->themewww .'/'. current_theme() ?>/favicon.ico" />
+ <link rel="shortcut icon" href="<?php echo $OUTPUT->old_icon_url('favicon', 'theme')?>" />
<?php echo $OUTPUT->standard_head_html() ?>
</head>
<body id="<?php echo $PAGE->pagetype ?>" class="<?php echo $PAGE->bodyclasses ?>">
<!-- END OF HEADER -->
<div id="content" class="clearfix">
- [MAIN CONTENT GOES HERE]
+ <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
</div>
<!-- START OF FOOTER -->
<div id="footer" class="clearfix">
- <?php echo $OUTPUT->standard_footer_html() ?>
</div>
</div>
<?php echo $OUTPUT->standard_end_of_body_html() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
<title><?php echo $PAGE->title ?></title>
- <link rel="shortcut icon" href="<?php echo $CFG->themewww .'/'. current_theme() ?>/favicon.ico" />
+ <link rel="shortcut icon" href="<?php echo $OUTPUT->old_icon_url('favicon', 'theme')?>" />
<?php echo $OUTPUT->standard_head_html() ?>
</head>
<body id="<?php echo $PAGE->pagetype ?>" class="<?php echo $PAGE->bodyclasses ?>">
<!-- END OF HEADER -->
<div id="content" class="clearfix">
- [MAIN CONTENT GOES HERE]
+ <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
</div>
<!-- START OF FOOTER -->
<div id="footer" class="clearfix">
- <?php echo $OUTPUT->standard_footer_html() ?>
</div>
</div>
<?php echo $OUTPUT->standard_end_of_body_html() ?>
<?php echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
- <?php echo $OUTPUT->standard_head_html() ?>
<title><?php echo $PAGE->title ?></title>
- <link rel="shortcut icon" href="<?php echo $CFG->themewww .'/'. current_theme() ?>/favicon.ico" />
+ <link rel="shortcut icon" href="<?php echo $OUTPUT->old_icon_url('favicon', 'theme')?>" />
<meta name="description" content="<?php echo strip_tags(format_text($SITE->summary, FORMAT_HTML)) ?>" />
+ <?php echo $OUTPUT->standard_head_html() ?>
</head>
<body id="<?php echo $PAGE->pagetype ?>" class="<?php echo $PAGE->bodyclasses ?>">
<?php echo $OUTPUT->standard_top_of_body_html() ?>
<div id="header-home" class="clearfix">
<h1 class="headermain"><?php echo $PAGE->heading ?></h1>
<div class="headermenu"><?php
+ echo $OUTPUT->login_info();
if ($PAGE->headingmenu) {
echo $PAGE->headingmenu;
- } else {
- echo $OUTPUT->login_info();
}
?></div>
</div>
</td>
<?php } ?>
<td id="content">
- [MAIN CONTENT GOES HERE]
+ <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
</td>
<?php if ($PAGE->blocks->region_has_content('side-post', $OUTPUT)) { ?>
<td id="region-side-post" class="block-region">
--- /dev/null
+<?php echo $OUTPUT->doctype() ?>
+<html <?php echo $OUTPUT->htmlattributes() ?>>
+<head>
+ <title><?php echo $PAGE->title ?></title>
+ <link rel="shortcut icon" href="<?php echo $OUTPUT->old_icon_url('favicon', 'theme')?>" />
+ <?php echo $OUTPUT->standard_head_html() ?>
+</head>
+<body id="<?php echo $PAGE->pagetype ?>" class="<?php echo $PAGE->bodyclasses ?>">
+<?php echo $OUTPUT->standard_top_of_body_html() ?>
+
+<div id="page">
+
+<?php if ($PAGE->heading) { ?>
+ <div id="header" class="clearfix">
+ <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
+ <div class="headermenu"><?php echo $PAGE->headingmenu ?></div>
+ </div>
+ <hr />
+<?php } ?>
+<!-- END OF HEADER -->
+
+ <div id="content" class="clearfix">
+ <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
+ </div>
+
+<!-- START OF FOOTER -->
+ <div id="footer" class="clearfix">
+ <?php echo $OUTPUT->standard_footer_html() ?>
+ </div>
+</div>
+<?php echo $OUTPUT->standard_end_of_body_html() ?>
+</body>
+</html>
\ No newline at end of file
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
<title><?php echo $PAGE->title ?></title>
- <link rel="shortcut icon" href="<?php echo $CFG->themewww .'/'. current_theme() ?>/favicon.ico" />
+ <link rel="shortcut icon" href="<?php echo $OUTPUT->old_icon_url('favicon', 'theme')?>" />
<?php echo $OUTPUT->standard_head_html() ?>
</head>
<body id="<?php echo $PAGE->pagetype ?>" class="<?php echo $PAGE->bodyclasses ?>">
</td>
<?php } ?>
<td id="content">
- [MAIN CONTENT GOES HERE]
+ <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
</td>
<?php if ($PAGE->blocks->region_has_content('side-post', $OUTPUT)) { ?>
<td id="region-side-post" class="block-region">
+++ /dev/null
-<!--[if IE 7]>
- <link rel="stylesheet" type="text/css" href="<?php echo $CFG->httpsthemewww ?>/standard/styles_ie7.css" />
-<![endif]-->
-<!--[if IE 6]>
- <link rel="stylesheet" type="text/css" href="<?php echo $CFG->httpsthemewww ?>/standard/styles_ie6.css" />
-<![endif]-->
+++ /dev/null
-/*******************************************************************
- rtl.css
-
- This CSS file contains all layout definitions that are required for
- right-to-left languages. It overrides definitions in other fils to
- move right-floating blocks to the left, align text to the right,
- swap left and right margins, etc.
-
- *******************************************************************/
-
-body, td, li, div {
- direction: rtl;
-}
-
-/* required for chat windows */
-
-.ltr-input {
- direction: ltr;
-}
-
-/* for input that require LTR, e.g. filenames or URLs */
-
-.headermain, h1.headermain {
- float: right;
-}
-
-.headermenu {
- float: left;
- text-align: left;
-}
-
-.navbar .breadcrumb {
- float: right;
-}
-
-.breadcrumb {
- padding-left: 0px;
- padding-right: 3px;
-}
-
-.navbar .navbutton, .navbar .menu {
- float: left;
-}
-
-.navbar .navbutton {
- padding-left: 3px;
- padding-right: 0px;
-}
-
-/* login window */
-
-.loginbox.twocolumns .signuppanel {
- float: left;
-}
-
-.loginbox.twocolumns .loginpanel {
- float: right;
-}
-
-.loginbox .loginform .form-label {
- float: right;
- text-align: left;
-}
-
-.loginbox .loginform .form-input {
- float: left;
-}
-
-.loginbox .loginform {
- text-align: right;
-}
-
-.loginbox .signuppanel .subcontent {
- text-align: right;
-}
-
-.categorylist .category.number {
- text-align: left;
-}
-
-.calendar-controls .previous, .calendar-controls .current, .calendar-controls .next {
- float: right;
-}
-
-.coursebox .summary {
- float: left;
- text-align: right;
-}
-
-.coursebox .info {
- float: right;
- text-align: right;
-}
-
-.categorylist .category.number {
- text-align:left;
-}
-
-.calendar-controls .previous {
- text-align: right;
-}
-
-.calendar-controls .next {
- text-align: left;
-}
-
-.reportlink {
- text-align: left;
-}
-
-form.mform fieldset legend {
- margin-left: 0px;
- margin-right: 0.5em;
-}
-
-form.mform div.felement, form.mform fieldset.felement {
- margin: 5px 10pt 0pt 0px;
-}
-
-form.mform .fitemtitle {
- margin: 5px 10pt 0pt 0px;
-}
-
-.advancedbutton {
- text-align: left;
-}
-
-form.mform .fdescription.required {
- text-align: left;
-}
-
-/* language selectors */
-
-#chooselang_jump {
- direction: ltr;
-}
-
-/* on firefox the main layout-table might be pushed to the right by editing buttons **** */
-
-#layout-table {
- clear: both;
-}
-
-/* admin > appearance > themes > theme settings */
-
-#adminsettings .form-label {
- float: right;
- text-align: left;
-}
-
-#adminsettings .form-setting {
- text-align: right;
- margin-right: 13em;
- margin-left: 0px;
-}
-
-#adminsettings .form-description {
- margin: 0.5em 13em 0em 0pt;
- text-align: right;
-}
-
-#id_lang {
- direction: ltr;
-}
-
-/* admin > lang > language pack selection */
-
-select#pack {
- direction: ltr;
-}
-
-select#uninstalllang {
- direction: ltr;
-}
-
-/* in forums, fix top and bottom navigation bars' buttons */
-li form .invisiblefieldset {
- display: inline;
-}
-
-.mod-forum .indent {
- margin-right: 30px;
- margin-left: 0px;
-}
-
-.glossarypost {
- text-align: right;
-}
-
-.glossarypost .entryheader {
- text-align: right;
-}
-
-h1, h2, h3, h4 {
- text-align: right;
- padding-left: 0px;
- padding-right: 5px;
-}
-
-/* lessons */
-
-.mod-lesson .invisiblefieldset.fieldsetfix tr {
- text-align: right;
-}
-
-.mod-lesson .contents {
- text-align: right;
-}
-
-.sideblock .header .hide-show {
- float: left;
-}
-
-.sideblock .content h3, .sideblock .content h2 {
- text-align: right;
-}
-
-.sideblock .footer {
- text-align: right;
-}
-
-.mod-lesson .skip {
- left: 10em;
- top: -1000em;
-}
-
-/* blocks */
-
-h1.main, h2.main, h3.main, h4.main, h5.main, h6.main {
- text-align: right;
-}
-
-.entrylowersection .icons, .entrylowersection .ratings {
- text-align: left;
- padding-left: 5px;
- padding-right: 0px;
-}
-
-.block_calendar_upcoming .event .date {
- text-align: left;
- direction: ltr;
-}
-
-.block_admin_tree .admintree .depth1 {
- padding-right:16px;
-}
-
-.block_admin_tree .admintree .depth2 {
- padding-right:32px;
-}
-
-.block_admin_tree .admintree .depth3 {
- padding-right:48px;
-}
-
-.block_admin_tree .admintree .depth4 {
- padding-right:64px;
-}
-
-.block_admin_tree .admintree {
- text-align: right;
-}
-
-/* online users block */
-.sideblock img.userpicture {
- margin-right:inherit;
- margin-left:4px;
-}
-
-.block_online_users .listentry div.user,
-.block_messages .listentry div.user {
- float:right;
-}
-
-body#admin-blocks table.generaltable th.c0, body#admin-blocks table.generaltable td.c0, body#admin-filters table.generaltable th.c0, body#admin-filters table.generaltable td.c0, body#admin-modules table.generaltable th.c0, body#admin-modules table.generaltable td.c0, body#admin-auth table.generaltable th.c0, body#admin-auth table.generaltable td.c0 {
- text-align: right;
-}
-
-#mod-chat-gui_header_js-jsupdate
-.chat-event,
-#mod-chat-gui_header_js-jsupdate
-.fdate_time_selector {
- direction: ltr;
-}
-
-.chat-event .text, .chat-message .text {
- text-align: right;
-}
-
-/* participants */
-
-body#user-index table#participants td, body#user-index table#participants th {
- text-align: right;
-}
-
-/* Admin > Security */
-
-#adminsettings label {
- text-align: left;
-}
-
-#adminsettings select, #adminsettings input {
- margin: 0pt 5pt 0pt 5pt;
-}
-
-#adminsettings .description {
- margin: 0pt 160px 0pt 1em;
-}
-
-#adminsettings .form-group {
- float: right;
-}
-
-/* Courses backup */
-
-#admin-backup_sche_hour .form-group {
- direction: ltr;
- float: right;
-}
-
-/* backup_sche_hour */
-
-form.mform div.felement, form.mform fieldset.felement {
- float: right;
- text-align: right;
- margin-right: 10px;
- margin-left: 0px;
-}
-
-.que .info {
- float: right;
-}
-
-.que .prompt {
- float: right;
-}
-
-.que {
- text-align: right;
-}
-
-.invisiblefieldset {
- display: block;
-}
-
-body#mod-quiz-report table#attempts .header {
- text-align: right;
-}
-
-#mod-quiz-mod #reviewoptionshdr fieldset.fgroup span {
- clear: right;
- float: right;
-}
-
-#mod-quiz-mod #reviewoptionshdr .fitemtitle {
- text-align: right;
-}
-
-#mod-quiz-edit div.sideblock{
- float:left;
-}
-#mod-quiz-edit div.quizcontents {
- clear:none;
-}
-#mod-quiz-edit div.quizpage span.pagetitle{
- float:right;
-}
-#mod-quiz-edit div.question div.qnum{
- float:right;
- padding-right:0;
- padding-left:0.3em;
-}
-
-#mod-quiz-edit div.question div.content div.points,
- #mod-quiz-edit div.question div.content div.qorder{
- left:50px;
- right:auto;
-
-}
-#mod-quiz-edit div.question div.content div.questioncontrols{
- right:auto;
- left:0.3em;
-}
-#mod-quiz-edit div.question div.content div.questioncontrols{
- text-align:left;
-}
-
-#mod-quiz-edit div.reorder .reordercontrols .moveselectedonpage{
- clear:left;
- float:left;
-}
-
-#mod-quiz-edit div.reorder .reordercontrols .addnewpagesafterselected,#mod-quiz-edit .repaginatecommand{
- float:left;
- clear:left;
- padding-right:auto;
- padding-left:1em;
-}
-
-#mod-quiz-edit div.reorder .reordercontrols .deleteselected{
- float:left;
- margin-right:auto;
- margin-left:1em;
-}
-
-#mod-quiz-edit div.reorder .reordercontrols{
- padding-right:auto;
- padding-left:1em;
-}
-#mod-quiz-edit div.reorder .reordercontrols .moveselectedonpage{
- text-align:left;
-}
-#mod-quiz-edit div.question div.qnum{
- text-align:left;
-}
-#mod-quiz-edit div.reorder div.question div.qnum{
- text-align:left;
-}
-
-
-
-#mod-quiz-edit .editq div.question div.content .randomquestioncategory a{
- float:right;
-}
-#mod-quiz-edit div.editq div.question div.content .singlequestion a .questionname,
-#mod-quiz-edit div.editq div.question div.content .singlequestion a .questiontext{
- float:right;
-}
-#mod-quiz-edit div.question div.content .questiontype{
- clear:right;
- float:right;
-}
-#mod-quiz-edit .editq div.questioncontentcontainer div.singlequestion img{
- float:right;
- padding-left:0.3em;
-}
-#mod-quiz-edit .editq div.question div.content .questionpreview{
- float:right;
-}
-#mod-quiz-edit div.quizpage .pagecontent{
- float:right;
- margin-left:auto;
- margin-right:0.3em;
-
- border-left:none;
- -webkit-border-radius:0.6em;
- border-radius:0.6em;
- -moz-border-radius:0.6em;
-
- margin-right:0.3em;
- border-right:solid #777 thin;
- -webkit-border-radius-bottomright:0;
- -webkit-border-radius-topright:0;
- border-radius-bottomright:0;
- border-radius-topright:0;
- -moz-border-radius-bottomright:0;
- -moz-border-radius-topright:0;
-}
-#mod-quiz-edit div.editq div.question div.content{
- float:right;
- -webkit-border-radius:0.6em;
- border-radius:0.6em;
- -moz-border-radius:0.6em;
- -webkit-border-radius-bottomright:0;
- -webkit-border-radius-topright:0;
- border-radius-bottomright:0;
- border-radius-topright:0;
- -moz-border-radius-bottomright:0;
- -moz-border-radius-topright:0;
-
-}
-
-#mod-quiz-edit .reorder div.question div.content{
- float:right;
- -webkit-border-radius:0.3em;
- border-radius:0.3em;
- -moz-border-radius:0.3em;
- -webkit-border-radius-bottomright:0;
- -webkit-border-radius-topright:0;
- border-radius-bottomright:0;
- border-radius-topright:0;
- -moz-border-radius-bottomright:0;
- -moz-border-radius-topright:0;
-}
-#mod-quiz-edit div.quizpage .pagecontent .pagestatus{
- -webkit-border-radius:0.3em;
- border-radius:0.3em;
- -moz-border-radius:0.3em;
- -webkit-border-radius-bottomright:0;
- -webkit-border-radius-topright:0;
- border-radius-bottomright:0;
- border-radius-topright:0;
- -moz-border-radius-bottomright:0;
- -moz-border-radius-topright:0;
-}
-#mod-quiz-edit .pagecontrols{
- margin-left:auto;
- margin-right:0.5em;
-}
-#mod-quiz-edit .pagecontrols .singlebutton{
- float:right;
-}
-#mod-quiz-edit div.quizpage .pagecontent form.randomquestionform{
- padding-right:1em;
-}
-#mod-quiz-edit div.question{
- clear:right;
-}
-
-#mod-quiz-edit h2.main{
- padding-left:1em;
- padding-right:inherit;
-}
-
-#mod-quiz-edit .quizpagedelete{
- right:auto;
- left:0.2em;
-}
-
-
-/* survey */
-#surveyform th {
- text-align: right;
-}
-
-.logtable th {
- text-align: right;
-}
-
-form.mform .fitemtitle {
- float: right;
- text-align: left;
- margin-right: 10px;
- margin-left: 0px;
-}
-
-.course-view .section td.right {
- border-left-width: 1px;
- border-left-style: solid;
- border-right-width: 0px;
- border-right-style: none;
-}
-
-.form-setting .form-time {
- direction: ltr;
- float:right;
-}
-
-/* ========================
- for tabs support
- ======================== */
-
-.tabrow0 a span {
- background: transparent url(pix/tab/right.gif) no-repeat right top !important;
-}
-
-.tabrow0 a {
- background: transparent url(pix/tab/left.gif) no-repeat left top !important;
-}
-
-.tabrow0 a:hover {
- background-image: transparent url(pix/tab/left_hover.gif) no-repeat left top !important;
-}
-
-.tabrow0 a:hover span {
- background-image: transparent url(pix/tab/right_hover.gif) no-repeat right top !important;
-}
-
-.tabrow1 li a {
- background: none !important;
-}
-
-.tabrow0 a span {
- padding-left: 0px !important;
- padding-right: 14px !important;
- #padding-left: 14px !important; /* IE only. The # hides from firefox */
- #padding-right: 0px !important; /* IE only. The # hides from firefox */
-}
-
-* html body .tabrow0 a { /* IE6 only. Exploit IE's "star html selector bug" to apply to IE6 ONLY */
- #display: inline-block !important;
- #padding: 8px 0 0 13px !important;
-}
-
-.tabrow0 div,
-.tabrow0 ul { /* IE7 only. The # hides from firefox. The following rule will override this for IE6 */
- #top: 2.6em !important;
-}
-
-* html body .tabrow0 div,
-* html body .tabrow0 ul { /* IE6 only. Exploit IE's "star html selector bug" to apply to IE6 ONLY */
- top: 4.2em !important;
-}
-
-@media all and (min-width: 0px) { /* Opera only, the floating # will hide this from Safari */
- .tabrow0 a {
- padding-right: 14px;
- padding-left: 0;
- }
-
- .tabrow0 a span {
- padding-left: 14px !important;
- padding-right: 0 !important;
- }
- #
-}
-
-
-
-/* ========================
- overrides styles_ie6
- ======================== */
-
-FORM.mform INPUT {
- margin-left: 5px !important;
- margin-right: -5px !important;
-}
-
-/* ========================
- for htmlarea editor
- ======================== */
-
-.htmlarea {
- direction: rtl;
-}
-
-.htmlarea * select {
- max-width: 100px;
-}
-
-.navigation option {
- text-align:right;
-}
-
-#navmenupopup option,
-#navmenufooterpopup option {
- padding: 2px 20px 2px 5px;
- background-position: center right;
-}
-
-.grade-report-grader table#user-grades th.user {
- text-align:right;
-}
--- /dev/null
+.block_calendar_month .cal_popup_caption,
+.block_calendar_month .cal_popup_fg div {
+ font-size: 0.85em !important;
+}
+
+.block_calendar_month .filters {
+ font-size:0.75em;
+ padding: 5px;
+}
+
+.block_calendar_month .filters table {
+ border-collapse:separate;
+ border-spacing: 2px;
+ padding: 2px;
+}
+
+.block_calendar_month .event_global,
+.block_calendar_month .event_course,
+.block_calendar_month .event_group,
+.block_calendar_month .event_user {
+ border-width: 2px;
+ border-style: solid;
+}
--- /dev/null
+.block_course_summary .content {
+ padding:10px;
+}
+
+.block_course_summary .editbutton {
+ text-align:right;
+}
margin: 4px;
font-weight: bold;
font-size: 1.1em;
-}
+}
\ No newline at end of file
--- /dev/null
+.block_rss_client .link {
+ border-top:1px solid;
+ border-top-color:#DDDDDD;
+ padding-bottom:5px;
+ font-size:0.82em;
+}
+
+.block_rss_client .description {
+ color:#555555;
+ font-size:0.78em;
+ padding-left:10px;
+ padding-bottom:8px;
+}
+
+.block_rss_client .title {
+ font-size:1.0em;
+}
+
+.block_rss_client .image {
+}
+
+.blockconfigtable #rssfeeds {
+ margin-left: auto;
+ margin-right: auto;
+ background-color: blue;
+}
+
+.blockconfigtable #rssfeeds td.actions {
+ text-align: center;
+ vertical-align: middle;
+ padding: 10px;
+}
+
+.blockconfigtable #rssfeeds td.feed {
+ vertical-align: middle;
+ padding: 5px;
+}
+
+.blockconfigtable #rssfeeds .title {
+ font-weight: bold;
+ margin-bottom: 2px;
+}
+
+.blockconfigtable #rssfeeds .url, .blockconfigtable #rssfeeds .description {
+ font-size: 0.8em;
+}
+
+.blockconfigtable #rssfeeds tr.r0 {
+ background-color: #ffffff;
+}
+
+.blockconfigtable #rssfeeds tr.r1 {
+ background-color: #f0f0f0;
+}
--- /dev/null
+/*
+ * CSS for course tags
+ * @author j.beedell@open.ac.uk July07
+ *
+ * Styles for block_tags.php
+ */
+
+.coursetag_form_wrapper {
+ margin: auto;
+ width: 13em;
+}
+
+.coursetag_form_positioner {
+ position: relative;
+ margin: 5px 0 0 0;
+ height: 25px;
+}
+
+.coursetag_form_input1 {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 1;
+}
+
+.coursetag_form_input2 {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 2;
+}
+
+.coursetag_form_input3 {
+ position: absolute;
+ top: 3px;
+ left: 12.8em;
+ display: none;
+}
+
+.coursetag_form_input1a {
+ background-color: white;
+ border: 1px solid #999;
+ width: 12em;
+ padding: 2px;
+}
+
+.coursetag_form_input2a {
+ background: transparent;
+ color: #669954;
+ border: 1px solid #999;
+ width: 12em;
+ padding: 2px;
+}
+
+.coursetag_morelink {
+ float: right;
+ font-size: 0.8em;
+ margin: -5px 5px 5px 0;
+}
+
+.coursetag_list {
+ padding-top: 4px;
+}
+
+/* Styles for coursetag_edit.php */
+
+.coursetag_edit_centered {
+ position: relative;
+ width: 600px;
+ margin: 20px auto;
+}
+
+.coursetag_edit_row {
+ margin: 5px 0 5px 0;
+ height: 30px;
+}
+
+.coursetag_edit_left {
+ position: relative;
+ float: left;
+ padding: 3px 5px;
+}
+
+.coursetag_edit_right {
+ position: relative;
+ float: left;
+ padding: 3px 0px;
+}
+
+.coursetag_edit_input3 {
+ position: relative;
+ left: 10.5em;
+ display: none;
+}
+
+/* Styles for coursetag_more.php */
+
+.coursetag_more_title {
+ margin: 30px 30px -25px 30px;
+}
+
+.coursetag_more_tags {
+ margin: 30px;
+}
+
+.coursetag_more_large {
+ font-size: 120%
+}
+
+.coursetag_more_small {
+ font-size: 80%
+}
+
+.coursetag_more_link {
+ font-size: 80%;
+}
--- /dev/null
+.block_blog_tags .s20 {
+ font-size: 1.5em;
+ font-weight: bold;
+}
+
+.block_blog_tags .s19 {
+ font-size: 1.5em;
+}
+
+.block_blog_tags .s18 {
+ font-size: 1.4em;
+ font-weight: bold;
+}
+
+.block_blog_tags .s17 {
+ font-size: 1.4em;
+}
+
+.block_blog_tags .s16 {
+ font-size: 1.3em;
+ font-weight: bold;
+}
+
+.block_blog_tags .s15 {
+ font-size: 1.3em;
+}
+
+.block_blog_tags .s14 {
+ font-size: 1.2em;
+ font-weight: bold;
+}
+
+.block_blog_tags .s13 {
+ font-size: 1.2em;
+}
+
+.block_blog_tags .s12,
+.block_blog_tags .s11 {
+ font-size: 1.1em;
+ font-weight: bold;
+}
+
+.block_blog_tags .s10,
+.block_blog_tags .s9 {
+ font-size: 1.1em;
+}
+
+.block_blog_tags .s8,
+.block_blog_tags .s7 {
+ font-size: 1em;
+ font-weight: bold;
+}
+
+.block_blog_tags .s6,
+.block_blog_tags .s5 {
+ font-size: 1em;
+}
+
+.block_blog_tags .s4,
+.block_blog_tags .s3 {
+ font-size: 0.9em;
+ font-weight: bold;
+}
+
+.block_blog_tags .s2,
+.block_blog_tags .s1 {
+ font-size: 0.9em;
+}
width: 80px;
}
-.child {
+grade-edit-tree .child {
background-image: url(img/ln.gif);
}
-.hidden {
+grade-edit-tree .hidden {
display: none;
}
-.shown {
+grade-edit-tree .shown {
}
-img.iconsmall {
+grade-edit-tree img.iconsmall {
margin-left: 4px;
}
-img.icon {
+grade-edit-tree img.icon {
margin-right: 5px;
}
margin-right: auto;
}
-.buttons {
+grade-edit-tree .buttons {
margin: 20px;
text-align: center;
width: 100%;
}
-.buttons .singlebutton {
+grade-edit-tree .buttons .singlebutton {
display: inline;
padding: 5px;
}
background-color: #EEEEEE !important;
}
-.level1 {
+grade-edit-tree .level1 {
background-color: #f3dfd0 !important;
width: 10px;
}
-.level2 {
+grade-edit-tree .level2 {
background-color: #d0dbf3 !important;
width: 10px;
}
-.level3 {
+grade-edit-tree .level3 {
background-color: #d0f3d6 !important;
width: 10px;
}
-.level4 {
+grade-edit-tree .level4 {
background-color: #f0f0aa !important;
width: 10px;
}
-.level5 {
+grade-edit-tree .level5 {
background-color: #ebdef6 !important;
width: 10px;
}
--- /dev/null
+.userpicture,
+.picture user,
+.picture teacher {
+ width:35px;
+ height: 35px;
+ vertical-align:top;
+}
+.modform {
+ text-align:center;
+}
+#wordcount {
+ text-align: right;
+}
+
+#mod-assignment-submissions .feedback .content,
+#mod-assignment-submissions .feedback .topic,
+#mod-assignment-submissions .feedback .picture
+{
+ padding: 10px;
+ border-width:1px;
+ border-style:solid;
+ border-color:#DDDDDD;
+}
+
+#mod-assignment-submissions form#options div {
+ text-align:right;
+ margin-left:auto;
+ margin-right:20px;
+}
+
+.mod-assignment .feedback .files {
+ float: right;
+ background-color: #EFEFEF;
+ padding:5px;
+}
+
+.mod-assignment .feedback .grade,
+.mod-assignment .feedback .outcome,
+.mod-assignment .feedback .finalgrade {
+ float: right;
+}
+
+.mod-assignment .feedback .disabledfeedback {
+ width: 500px;
+ height: 250px;
+}
+
+.mod-assignment .feedback .from {
+ float: left;
+}
+
+.mod-assignment .feedback .time {
+ font-size: 0.8em;
+}
+
+.mod-assignment .late {
+ color: red;
+}
+
+.mod-assignment .files img {
+ margin-right: 4px;
+}
+
+.mod-assignment .files a {
+ white-space:nowrap;
+}
+
+#mod-assignment-submissions .generaltable .r1 {
+ background-color: #FFFFFF;
+}
+
+#mod-assignment-submissions .header .commands {
+ display: inline;
+}
+
+#mod-assignment-submissions .s0 {
+ background: #FFD991;
+}
+
+#mod-assignment-submissions table.submissions td,
+#mod-assignment-submissions table.submissions th
+{
+ border-width: 1px;
+ border-style: solid;
+ border-color: #DDDDDD;
+ vertical-align: middle;
+ padding-left: 5px;
+ padding-right: 5px;
+}
+
+#mod-assignment-submissions .submissions .grade {
+ text-align: right;
+ font-weight:bold;
+}
+
+#mod-assignment-submissions .picture {
+ width: 35px;
+}
+
+#mod-assignment-submissions .fullname {
+ text-align: left;
+}
+
+#mod-assignment-submissions .timemodified,
+#mod-assignment-submissions .timemarked
+{
+ text-align: left;
+ font-size: 0.9em;
+}
+
+#mod-assignment-submissions .status {
+ text-align: center;
+}
+
+#mod-assignment-submissions .submissions .outcome,
+#mod-assignment-submissions .submissions .finalgrade {
+ text-align: right;
+}
+
+#mod-assignment-view #online .singlebutton {
+ text-align: center;
+}
+
+#mod-assignment-view #dates {
+ font-size: 0.8em;
+ margin-top: 30px;
+ margin-bottom: 30px;
+}
+
+#mod-assignment-view #dates .c0{
+ text-align:right;
+ font-weight:bold;
+}
+
+#mod-assignment-view .feedback {
+ border-width:1px;
+ border-style:solid;
+ border-color:#DDDDDD;
+ margin-top: 15px;
+ width: 80%;
+ margin-left: 10%;
+ margin-right: 10%;
+}
+
+#mod-assignment-view .feedback .topic {
+ padding: 4px;
+ border-style:solid;
+ border-width: 0px;
+ border-bottom-width: 1px;
+ border-color:#DDDDDD;
+}
+
+#mod-assignment-view .feedback .fullname {
+ font-weight: bold;
+}
+
+#mod-assignment-view .feedback .date {
+ font-size: 0.8em;
+}
+
+#mod-assignment-view .feedback .content {
+ padding: 4px;
+}
+
+#mod-assignment-view .feedback .grade {
+ text-align: right;
+ font-weight:bold;
+}
+
+#mod-assignment-view .feedback .left {
+ width: 35px;
+ padding: 4px;
+ text-align: center;
+ vertical-align: top;
+}
+
+#mod-assignment-submissions .qgprefs #optiontable {
+ text-align:right;
+ margin-left:auto;
+}
+
+#mod-assignment-submissions .fgcontrols {
+ margin-top: 1em;
+ text-align:center;
+}
+
+#mod-assignment-submissions .fgcontrols .fastgbutton{
+ margin-top: 0.5em;
+}
+
+/***
+ *** Modules: Assignment
+ ***/
+
+#mod-assignment-index .cell {
+ font-size:0.8em;
+}
+
+#wordcount {
+ font-size: 0.8em;
+}
+
--- /dev/null
+
+/***
+ *** Modules: Chat
+ ***/
+
+#messages-list, #users-list{list-style-type:none;padding:0;margin:0}
+#chat-header {
+ background: transparent;
+ font-size: 200%;
+ overflow: hidden;
+}
+#chat-header p {
+ display:inline;
+ font-size: 50%;
+ color: grey;
+}
+.mod-lesson .time{
+ font-weight: bold;
+}
+.mod-lesson .user{
+ color:blue;
+}
+.mod-lesson .chat-event{
+ text-align:center;
+ color:grey;
+}
+.mod-lesson .yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd {
+ background: transparent;
+}
+.mod-lesson .yui-layout-unit-top {
+ background: #FFE39D;
+}
+.mod-lesson .yui-layout-unit-right {
+ border-top: 5px solid white;
+ background: #FFD46B;
+}
+.mod-lesson .yui-layout-unit-bottom {
+ border-top: 5px solid white;
+ background: #FFCB44;
+}
+.mod-lesson .yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-unit-right {
+ background: white;
+}
+.mod-lesson .yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd {
+ border:0;
+}
+.mod-lesson .yui-skin-sam .yui-layout .yui-layout-hd {
+ border:0;
+}
+
+
+.nextchatsession {
+ text-align:center;
+}
+
+#mod-chat-gui_header_js-jsupdate {
+ margin:10px
+}
+#mod-chat-gui_header_js-jsupdate .chat-event,
+#mod-chat-gui_header_js-jsupdate .chat-message {
+ width:100%;
+ padding:0;
+ margin-top:7px
+}
+
+#mod-chat-view #chatcurrentusers .chatuserdetails {
+ vertical-align: middle;
+}
+
+#mod-chat-view #enterlink {
+ text-align: center;
+ margin-left: auto;
+ margin-right: auto;
+ width: 50%;
+}
+
+.chat-event .picture,
+.chat-message .picture {
+ width:40px;
+ vertical-align:top;
+}
+.chat-event .text,
+.chat-message .text {
+ text-align: left;
+}
+
+#mod-chat-gui_basic #participants ul {
+ margin:0px;
+ padding:0px;
+ list-style-type:none;
+}
+
+#mod-chat-gui_basic #participants ul li {
+ display:inline;
+ margin-right:10px;
+}
+
+#mod-chat-gui_basic #participants ul li .userinfo {
+ display:inline;
+}
+
+#mod-chat-gui_basic #messages dl {
+ padding:0px;
+ margin:1px;
+}
+
+#mod-chat-gui_basic #messages dd,
+#mod-chat-gui_basic #messages dt {
+ margin-left:0px;
+ margin-right:5px;
+ padding:0px;
+ display:inline;
+}
+
+body.mod-chat-gui_ajax .yui-layout-doc .yui-layout-unit .yui-layout-wrap .yui-layout-hd h2 {
+ font-size:100%;
+ padding:0px;
+ font-weight:normal;
+}
+
+/***
+ *** Modules: Chat
+ ***/
+
+#mod-chat-index .cell {
+ font-size:0.8em;
+}
+
+
+#mod-chat-gui_basic h1 {
+ font-size:1.4em;
+}
+
+#mod-chat-gui_basic #participants .idle {
+ font-size:0.6em;
+}
+
+#mod-chat-view #chatcurrentusers .chatuserdetails {
+ font-size: 0.6em;
+}
+
+/***
+ *** Modules: Chat
+ ***/
+
+#mod-chat-gui_basic .text,
+#mod-chat-gui_header_js-jsupdate .text {
+ color:#000
+}
+
+#mod-chat-gui_basic .event,
+#mod-chat-gui_basic .title,
+#mod-chat-gui_header_js-jsupdate .event,
+#mod-chat-gui_header_js-jsupdate .title {
+ color:#888
+}
+
+#mod-chat-gui_header_js-chatinput .wait {
+ background: #dddddd;
+}
+
+#mod-chat-view #chatcurrentusers .idletime {
+ color: #888888;
+}
--- /dev/null
+.mod-choice .results {
+ border-collapse: separate;
+}
+
+.mod-choice .results .data {
+ border-width:1px;
+ border-style:solid;
+ border-color:#999;
+}
+
+.mod-choice .button {
+ text-align:center;
+}
+
+.mod-choice .attemptcell {
+ width:5px;
+ white-space: nowrap;
+}
+
+.mod-choice .anonymous,
+.mod-choice .names {
+ margin-left:auto;
+ margin-right:auto;
+}
+
+.mod-choice .downloadreport {
+ border:0px;
+ margin-left:auto;
+ margin-right:auto;
+}
+
+.mod-choice .choiceresponse {
+ width:100%;
+}
+.mod-choice .choiceresponse .picture {
+ width:10px;
+ white-space: nowrap;
+}
+
+.mod-choice .choiceresponse .fullname {
+ width:100%;
+ white-space: nowrap;
+}
+
+.mod-choice .results.data {
+ vertical-align:top;
+ white-space: nowrap;
+}
+
+
+#mod-choice-index .cell {
+ font-size:0.8em;
+}
+
+
+
--- /dev/null
+.fieldadd,
+.sortdefault,
+.defaulttemplate {
+ text-align:center;
+}
+.datapreferences {
+ text-align:center;
+}
+
+table.presets {
+ margin-left: auto;
+ margin-right: auto;
+}
+
+#mod-data-view #sortsearch .c0 {
+ text-align: right;
+}
+
+#mod-data-view .approve img.icon {
+ width:34px;
+ height:34px;
+}
+
+#mod-data-preset .presetmapping {
+ text-align: center;
+}
+
+#mod-data-preset .presetmapping table {
+ text-align: left;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+#mod-data-preset .overwritesettings {
+ margin-bottom: 1em;
+}
+
+.mod-data-field .c0 {
+ text-align: right;
+}
+
+.mod-data-field .fieldadd,
+.mod-data-field .sortdefault {
+ margin-bottom: 1em;
+ margin-top: 1em;
+}
+
+.mod-data-field .fieldadd select,
+.mod-data-field .sortdefault select {
+ margin-left: 1em;
+}
+
+.mod-data-field .fieldname {
+ width:300px;
+}
+
+.mod-data-field .fielddescription {
+ width:300px;
+}
+
+.presetcontrols form {
+ display: inline;
+}
--- /dev/null
+/* styles using by feedback */
+.feedback_required_mark {
+ color: #FF0000;
+}
+
+.feedback_switchrequired img{
+}
+
+
--- /dev/null
+/***
+ ***
+ *** Modules: Folder
+ ***/
+
+#mod-folder-view .foldertree {
+ width: 90%;
+ margin-left: auto;
+ margin-right: auto;
+}
--- /dev/null
+
+/***
+ *** Modules: Forum
+ ***/
+
+#mod-forum-subscribers .subscriberdiv,
+#mod-forum-subscribers .subscribertable {
+ width:100%;
+ background-color:#EEEEEE;
+ border:1px solid #BBBBBB;
+}
+#mod-forum-subscribers .subscriberdiv,
+#mod-forum-subscribers .subscribertable tr td {
+ vertical-align:top;
+ padding:0.2em 0.3em;
+}
+#mod-forum-subscribers .subscribertable tr td.existing {
+ width:42%;
+}
+#mod-forum-subscribers .subscribertable tr td.actions {
+ width:16%;
+ padding-top:3em;
+}
+#mod-forum-subscribers .subscribertable tr td.actions .actionbutton {
+ margin:0.3em 0;
+ padding:0.5em 0;
+ width:100%;
+}
+#mod-forum-subscribers .subscribertable tr td.potential {
+ width:42%;
+}
+
+
+#mod-forum-view .forummode {
+ text-align:center;
+}
+
+.forumheaderlist,
+.forumpost {
+ border-width:1px;
+ border-style:solid;
+ border-collapse:separate;
+}
+
+.forumpost {
+ margin-top: 15px;
+}
+
+.forumpost .topic {
+ padding: 4px;
+ border-style:solid;
+ border-width: 0px;
+ border-bottom-width: 1px;
+}
+
+.forumpost .commands {
+ padding-top: 0.5em;
+ text-align:right;
+ clear: both;
+}
+
+.forumpost .ratings {
+ padding-top: 1em;
+ text-align:right;
+}
+
+.forumpost .attachments {
+ padding: 7px;
+ text-align:right;
+}
+
+.forumpost .content {
+ padding: 4px;
+}
+
+.forumpost .footer {
+ padding-top: 0.5em;
+ text-align:right;
+}
+
+.forumpost .link {
+ padding-top: 0.5em;
+ text-align:right;
+}
+
+.forumpost .left {
+ width: 35px;
+ padding: 4px;
+ text-align: center;
+ vertical-align: top;
+}
+
+.mod-forum .indent {
+ margin-left: 30px;
+}
+
+body#user-view .forumpost,
+.course .forumpost {
+ width: 100%;
+}
+
+body#mod-forum-search .c0 {
+ text-align: right;
+}
+
+body#mod-forum-search .introcontent {
+ padding: 15px;
+}
+
+.forumolddiscuss {
+ text-align: right;
+}
+
+.forumheaderlist {
+ width: 100%;
+}
+
+.forumheaderlist td {
+ border-width:1px 0px 0px 1px;
+ border-style:solid;
+}
+
+.forumheaderlist .replies {
+ text-align: center;
+ white-space: nowrap;
+}
+
+.forumheaderlist .picture {
+ width: 35px;
+}
+
+.forumheaderlist .discussion .starter {
+ vertical-align: middle;
+}
+
+.forumheaderlist .lastpost {
+ white-space: nowrap;
+ text-align: right;
+}
+
+.forumheaderlist .discussion .author {
+ white-space: nowrap;
+}
+.forumolddiscuss {
+ text-align:right;
+}
+.forumaddnew,
+.forumnodiscuss,
+.noticeboxcontent {
+ text-align:center;
+}
+
+#mod-forum-view .forumaddnew {
+ margin-bottom: 20px;
+}
+
+#mod-forum-view .forumcontrol .groupmenu {
+ float: left;
+ text-align:left;
+ white-space: nowrap;
+}
+
+#mod-forum-view .groupmenu {
+ float: left;
+ text-align:left;
+ white-space: nowrap;
+}
+
+#mod-forum-view .forumcontrol .subscription {
+ float: right;
+ text-align:right;
+ white-space: nowrap;
+}
+
+#mod-forum-view .subscription {
+ float: right;
+ text-align:right;
+ white-space: nowrap;
+}
+
+#mod-forum-index .subscription {
+ float: right;
+ text-align:right;
+ white-space: nowrap;
+}
+
+#mod-forum-view .unread {
+ padding-left: 3px;
+ padding-right: 3px;
+}
+#mod-forum-discuss .forumpost.unread .content {
+ border-style: solid;
+ border-width: 2px;
+}
+#mod-forum-discuss .ratingsubmit {
+ text-align:center;
+ padding:10px;
+}
+#mod-forum-index .unread img,
+#mod-forum-view .unread img
+{
+ margin-left: 5px;
+}
+
+#mod-forum-discuss .discussioncontrols td {
+ width: 33%;
+ text-align:center;
+}
+
+#email .unsubscribelink {
+ margin-top:20px;
+ border-width: 0px 1px 0px 0px;
+ border-style: solid;
+ text-align:center;
+}
+
+#mod-forum-view .subscription {
+ margin: 5px 0;
+}
+
+
+
+/***
+ *** Modules: Forum
+ ***/
+
+.forumnodiscuss{
+ font-weight:bold;
+}
+.forumpost .topic .subject {
+ font-weight: bold;
+}
+.forumpost .topic .author {
+ font-size: 0.8em;
+}
+.forumpost .commands,
+.forumpost .link,
+.forumpost .footer {
+ font-size: 0.9em;
+}
+.forumheaderlist .discussion .lastpost {
+ font-size: 0.7em;
+}
+body#mod-forum-search .introcontent {
+ font-weight:bold;
+}
+body#mod-forum-index .generalbox .cell {
+ font-size: 0.80em;
+}
+
+.forumpost .edited {
+ font-style: italic;
+}
+
+
+/***
+ *** Modules: Forum
+ ***/
+
+/**
+ * Patch MDL-18971 version 3 puts the forum classes
+ * in page sequence. Also added one course class (above)
+ * for course/view.php
+ **/
+
+/** The location of these classes is unknown
+ * Commented out with patch MDL-18971 version 3
+ **/
+/*.sideblock .post .head {
+ color:#555555;
+}*/
+
+/** Unread Posts count background on
+ * mod/forum/index.php
+ **/
+#mod-forum-index .unread {
+ background: #9EBEFF;
+}
+
+/** wire frame around cells in
+ * mod/forum/view.php
+ **/
+.forumheaderlist td {
+ border-color: #FFFFFF;
+}
+
+/** Discussion column background in
+ * mod/forum/view.php
+ * The inner class is actually "topic starter"
+ **/
+.forumheaderlist .discussion .starter {
+ background:#DDDDDD;
+}
+
+/** unread column background on
+ * mod/forum/view.php
+ **/
+#mod-forum-view .unread{
+ background: #9EBEFF;
+}
+
+/** border around posts in
+ * mod/forum/view.php (forumheaderlist) and
+ * mod/forum/discuss.php (forumpost)
+ **/
+.forumheaderlist,
+.forumpost {
+ border-color:#DDDDDD;
+}
+
+/** post body color in
+ * mod/forum/discuss.php
+ **/
+.forumpost .content {
+ background: #FFFFFF;
+}
+
+/** left photo section of each post in
+ * mod/forum/discuss.php
+ **/
+.forumpost .left {
+ background:#EEEEEE;
+}
+
+/** line between header and post body in
+ * mod/forum/discuss.php
+ **/
+.forumpost .topic {
+ border-bottom-color: #EEEEEE;
+}
+
+/** header of the first post in
+ * mod/forum/discuss.php
+ **/
+.forumpost .starter {
+ background:#DDDDDD;
+}
+
+/** header of reply posts and
+ * lower corners of all posts in
+ * mod/forum/discuss.php
+ **/
+#mod-forum-discuss .forumpost {
+ background: none;
+}
+
+/** inside border of unread posts in nested format in
+ * mod/forum/discuss.php
+ **/
+#mod-forum-discuss .forumpost.unread .content {
+ border-width:2px;
+ border-color: #0046C7;
+}
+
+/** headers of unread posts in threaded format in
+ * mod/forum/discuss.php
+ **/
+#mod-forum-discuss .forumthread.unread {
+ background: #9EBEFF;
+}
+
--- /dev/null
+
+
+/***
+ *** Modules: Glossary
+ ***/
+
+.glossarypost .commands {
+ width: 200px;
+ white-space: nowrap;
+}
+
+#mod-glossary-comments .glossarypost,
+#mod-glossary-comment .glossarypost {
+ margin-top: 15px;
+}
+
+.entryboxheader {
+ border-width: 1px 1px 0px 1px;
+ border-style: solid;
+}
+
+.entrybox {
+ width: 100%;
+ border-width: 0px 1px 1px 1px;
+ border-style: solid;
+}
+
+.entrybox hr {
+ border-left:none;
+ border-right:none;
+}
+
+.glossarypost {
+ width: 95%;
+ border-width:1px;
+ border-style:solid;
+ border-collapse:separate;
+ margin-left:auto;
+ margin-right:auto;
+ margin-bottom: 5px;
+ text-align: left;
+}
+
+.entrylist {
+ border-width:0px;
+}
+
+.entrylowersection {
+ padding-top: 10px;
+}
+
+.entrylowersection table{
+ width: 100%;
+}
+
+.entrylowersection .aliases {
+ text-align:center;
+}
+
+.entrylowersection .icons,
+.entrylowersection .ratings {
+ text-align:right;
+ padding-right: 5px;
+}
+
+.entrylowersection .ratings {
+ padding-bottom: 2px;
+}
+
+.glossarycategoryheader {
+ width: 95%;
+ margin-left:auto;
+ margin-right:auto;
+}
+
+.glossaryformatheader {
+ width: 90%;
+}
+
+.glossarypost .entry {
+ padding: 3px;
+}
+
+.glossarypost .picture {
+ width: 35px;
+}
+
+.glossarycomment {
+ border-width:1px;
+ border-style:solid;
+ border-collapse:separate;
+ margin-bottom: 5px;
+ text-align: left;
+}
+
+.glossarycomment .entry {
+ padding: 3px;
+}
+
+.glossarycomment .picture {
+ width: 35px;
+}
+
+.glossarycomment .icons {
+ text-align: right;
+}
+
+.glossarydisplay {
+ width: 90%;
+ margin-left:auto;
+ margin-right:auto;
+ text-align:center;
+}
+
+.glossarydisplay .tabs {
+ width: 100%;
+}
+
+.glossarydisplay .separator {
+ width: 4px;
+}
+
+.glossarydisplay .tabs .selected,
+.glossarydisplay .tabs .inactive,
+.glossarydisplay .tabs .general {
+}
+
+.glossaryimportexport {
+ margin-left:auto;
+ margin-right:auto;
+ text-align:center;
+}
+
+.glossarypopup {
+ width: 95%;
+}
+
+.glossaryapproval {
+ width: 100%;
+}
+
+.mod-glossary .glossarydisplay .tabs {
+ margin-bottom: 0px;
+}
+
+.mod-glossary .glossarydisplay .tabs .side {
+ border-style: none;
+ border-width: 0px;
+ width: auto;
+}
+
+.glossaryexplain,
+.glossaryaddentry {
+ text-align: center;
+}
+
+.mod-glossary .tabrow0 {
+ padding-bottom: 5px;
+}
+
+#mod-glossary-view .glossarycontrol {
+ float: right;
+ text-align:right;
+ white-space: nowrap;
+ margin: 5px 0;
+}
+
+
+/***
+ *** Modules: Glossary
+ ***/
+
+.glossarypost .commands {
+ font-size: 0.8em;
+}
+.glossarypost .author {
+ font-size: 0.8em;
+}
+.glossarypost .time {
+ font-size: 0.8em;
+}
+.glossarycategoryheader h2,
+.glossarypost .concept h3 {
+ font-size: 1em;
+ margin: 0;
+}
+.glossarypost div.concept h3,
+.glossarypost.continuous .concept {
+ display: inline;
+}
+.glossarypost .entryheader {
+ font-weight: normal;
+ text-align: left;
+}
+.glossarycomment .author {
+ font-size: 0.8em;
+}
+.entrylowersection .aliases {
+ font-size: 0.8em;
+}
+.entrylowersection .icons,
+.entrylowersection .ratings {
+ font-size: 0.8em;
+}
+
+#mod-glossary-index .cell {
+ font-size:0.8em;
+}
+
+
+
+
+
+/***
+ *** Modules: Glossary
+ ***/
+
+.entryboxheader {
+ border-color: #BBBBBB;
+}
+
+.entrybox {
+ border-color: #BBBBBB;
+}
+
+.entry {
+}
+
+.glossarypost {
+ border-color: #DDDDDD;
+}
+
+.glossarypost .entryheader,
+.glossarypost .entryapproval,
+.glossarypost .picture,
+.glossarypost .entryattachment,
+.glossarypost .left {
+ background-color: #F0F0F0;
+}
+
+.glossarycomment {
+ border-color: #DDDDDD;
+}
+
+.glossarycomment .entryheader,
+.glossarycomment .picture,
+.glossarycomment .left {
+ background-color: #F0F0F0;
+
+}
+
+#mod-glossary-report .generalbox .teacher {
+ background: #F0F0F0;
+}
+
+.glossarycategoryheader {
+ background-color: #dddddd;
+}
+
+.glossaryformatheader {
+ background-color: #dddddd;
+}
}
.mod-lesson .progress_bar_completed {
+ /* Example Use of Image
+ background-image: url([[pix:mod_lesson|completed]]);
+ background-position: center;
+ background-repeat: repeat-x;
+ */
background-color: green;
padding: 0px;
margin: 0px;
}
.mod-lesson .progress_bar_todo {
+ /* Example Use of Image
+ background-image: url([[pix:mod_lesson|todo]]);
+ background-repeat: repeat-x;
+ background-position: center;
+ */
background-color: red;
text-align: left;
padding: 0px;
}
.mod-lesson .progress_bar_token {
+ /* Example Use of Image
+ background-image: url([[pix:mod_lesson|token]]);
+ background-repeat: repeat-none;
+ */
background-color: #000000;
height: 20px;
width: 5px;
--- /dev/null
+/***
+ *** Modules: Resource
+ ***/
+
+.mod-page .modified {
+ font-size:0.6em;
+}
+
--- /dev/null
+
+/***
+ *** Modules: Quiz
+ ***/
+
+#quiznavigation .qnbutton.flagged {
+ background-image: url([[pix:i/ne_red_mark]]);
+}
+
+#mod-quiz-view .quizinfo {
+ text-align: center;
+}
+#mod-quiz-view #page .quizgradefeedback,
+#mod-quiz-view #page .quizattempt
+{
+ text-align: center;
+}
+#mod-quiz-view #page .quizattemptsummary td p {
+ margin-top: 0;
+}
+#mod-quiz-view .generalbox#feedback {
+ width:70%;
+ margin-left:auto;
+ margin-right:auto;
+ padding-bottom:15px;
+}
+#mod-quiz-view .generalbox#feedback h2 {
+ margin: 0 0;
+}
+#mod-quiz-view .generalbox#feedback .overriddennotice {
+ text-align: center;
+ font-size: 0.7em;
+}
+#mod-quiz-view .generalbox#feedback h3 {
+ text-align: left;
+}
+
+.generalbox#passwordbox { /* Should probably match .generalbox#intro above */
+ width:70%;
+ margin-left:auto;
+ margin-right:auto;
+}
+#passwordform {
+ margin: 1em 0;
+}
+#mod-quiz-attempt .submitbtns,
+#mod-quiz-review .submitbtns {
+ text-align: left;
+ margin-top: 1.5em;
+}
+#mod-quiz-summary .submitbtns {
+ margin-top: 1.5em;
+}
+#mod-quiz-summary #content {
+ text-align: center;
+}
+#mod-quiz-summary .questionflag {
+ width: 16px;
+ height: 16px;
+ vertical-align: middle;
+}
+#mod-quiz-attempt #quiz-timer,
+#mod-quiz-summary #quiz-timer {
+ display: none; /* Revealed by JavaScript if applicable */
+}
+#mod-quiz-summary #quiz-timer {
+ margin-top: 1em;
+}
+#mod-quiz-attempt #quiz-time-left {
+ font-weight: bold;
+}
+
+body#question-preview .quemodname,
+body#question-preview .controls
+{
+ text-align: center;
+}
+body#question-preview .quemodname, body#question-preview .controls {
+ text-align: center;
+}
+
+#mod-quiz-attempt #page .controls,
+#mod-quiz-summary #page .controls,
+#mod-quiz-review #page .controls {
+ text-align: center;
+ margin: 8px auto;
+}
+#mod-quiz-review .pagingbar {
+ margin: 1.5em auto;
+}
+#mod-quiz-review .pagingbar {
+ margin: 1.5em auto;
+}
+table.quizreviewsummary {
+ width: 100%;
+}
+table.quizreviewsummary tr {
+}
+table.quizreviewsummary th.cell {
+ padding: 1px 0.5em 1px 1em;
+ font-weight: bold;
+ text-align: right;
+ width: 10em;
+}
+table.quizreviewsummary td.cell {
+ padding: 1px 1em 1px 0.5em;
+ text-align: left;
+}
+
+#mod-quiz-mod #reviewoptionshdr .fitem,
+#adminquizreviewoptions .group {
+ float: left;
+ width: 33%;
+ clear: none;
+}
+#mod-quiz-mod #reviewoptionshdr .fitem {
+ width: 30%;
+ margin-left: 10px;
+}
+#mod-quiz-mod #reviewoptionshdr .fitemtitle,
+#adminquizreviewoptions .fitemtitle {
+ width: 100%;
+ font-weight: bold;
+ text-align: left;
+ height: 2.5em;
+ margin-left: 0;
+}
+#mod-quiz-mod #reviewoptionshdr fieldset.fgroup {
+ width: 100%;
+ text-align: left;
+ margin-left: 0;
+}
+#mod-quiz-mod #reviewoptionshdr fieldset.fgroup span,
+#adminquizreviewoptions span {
+ float: left;
+ clear: left;
+}
+#adminquizreviewoptions {
+ margin-bottom: 0.5em;
+}
+
+.quizquestionlistcontrols {
+ text-align: center;
+}
+
+#mod-quiz-report table#attempts,
+#mod-quiz-report div#commands,
+#mod-quiz-report table#itemanalysis
+{
+ width: 80%;
+ margin: auto;
+}
+#mod-quiz-report table.titlesleft td.c0
+{
+ font-weight: bold;
+}
+#mod-quiz-report table#attempts,
+#mod-quiz-report h2.main {
+ clear: both;
+}
+#mod-quiz-report table#attempts {
+ margin: 20px auto;
+}
+#mod-quiz-report table#attempts .header,
+#mod-quiz-report table#attempts .cell
+{
+ padding: 4px;
+}
+#mod-quiz-report table#attempts .header .commands {
+ display: inline;
+}
+#mod-quiz-report table#attempts .picture {
+ width: 40px;
+}
+#mod-quiz-report table#attempts td {
+ border-left-width: 1px;
+ border-right-width: 1px;
+ border-left-style: solid;
+ border-right-style: solid;
+ vertical-align: middle;
+}
+#mod-quiz-report table#attempts .header {
+ text-align: left;
+}
+#mod-quiz-report table#attempts .picture {
+ text-align: center !important;
+}
+#mod-quiz-report .controls {
+ text-align: center;
+}
+
+#mod-quiz-report table#itemanalysis {
+ margin: 20px auto;
+}
+#mod-quiz-report table#itemanalysis .header,
+#mod-quiz-report table#itemanalysis .cell
+{
+ padding: 4px;
+}
+#mod-quiz-report table#itemanalysis .header .commands {
+ display: inline;
+}
+#mod-quiz-report table#itemanalysis td {
+ border-width: 1px;
+ border-style: solid;
+}
+#mod-quiz-report table#itemanalysis .header {
+ text-align: left;
+}
+#mod-quiz-report table .numcol {
+ text-align: center;
+ vertical-align : middle !important;
+}
+
+#mod-quiz-report table#itemanalysis .uncorrect {
+ color: red;
+}
+
+#mod-quiz-report table#itemanalysis .correct {
+ color: blue;
+ font-weight : bold;
+}
+
+#mod-quiz-report table#itemanalysis .partialcorrect {
+ color: green !important;
+}
+
+#mod-quiz-report table#itemanalysis .qname {
+ color: green !important;
+}
+
+/* manual grading */
+#mod-quiz-grading table#grading
+{
+ width: 80%;
+ margin: auto;
+}
+
+#mod-quiz-grading table#grading
+{
+ margin: 20px auto;
+}
+
+#mod-quiz-grading table#grading .header,
+#mod-quiz-grading table#grading .cell
+{
+ padding: 4px;
+}
+
+#mod-quiz-grading table#grading .header .commands
+{
+ display: inline;
+}
+
+#mod-quiz-grading table#grading .picture
+{
+ width: 40px;
+}
+
+#mod-quiz-grading table#grading td
+{
+ border-left-width: 1px;
+ border-right-width: 1px;
+ border-left-style: solid;
+ border-right-style: solid;
+ vertical-align: bottom;
+}
+
+.mod-quiz .gradingdetails {
+ font-size: small;
+}
+.quizattemptcounts {
+ clear : left;
+ text-align: center;
+ margin: 6px 0;
+}
+#quiznavigation .qnbutton {
+ display: block;
+ float: left;
+ width: 1.5em;
+ height: 1.5em;
+ overflow: hidden;
+ margin: 0.3em 0.3em 0.3em 0;
+ padding: 0;
+ border: 1px solid #bbb;
+ background: #eee no-repeat top right;
+ text-align: center;
+ vertical-align: middle;
+ cursor: pointer;
+ white-space: normal;
+}
+#quiznavigation #user-picture {
+ margin: 0.5em 0;
+}
+#quiznavigation #user-picture img {
+ width: auto;
+ height: auto;
+ float: left;
+}
+#quiznavigation .othernav {
+ clear: both;
+}
+#quiznavigation .othernav a,
+#quiznavigation .othernav input {
+ display: block;
+ margin: 0.5em 0;
+}
+#quiznojswarning {
+ font-size: 0.7em;
+ line-height: 1.1;
+}
+.jsenabled #quiznojswarning {
+ display: none;
+}
+.mod-quiz div.tabtree a span img.iconsmall {
+ vertical-align: baseline;
+}
+#mod-quiz-edit div.sideblock{
+ float:right;
+ width:30%;
+ right:0.3em;
+ padding-bottom:0.5em;
+ display:block;
+}
+
+#mod-quiz-edit div.quizcontents{
+ float:left;
+ width:70%;
+ display:block;
+}
+
+#mod-quiz-edit div.quizwhenbankcollapsed{
+ width:100%;
+}
+
+#mod-quiz-edit div.quizcontents,h2.main{
+ clear:left;
+}
+
+#mod-quiz-edit .addpage{
+ clear:both;
+ padding-top:0.3em;
+ float:right;
+ margin-right:2em;
+}
+
+#mod-quiz-edit h2.main{
+ display:inline;
+ padding-right:1em;
+}
+
+#mod-quiz-edit .statusdisplay {
+ clear: both;
+ margin: 0.3em 1em 0.3em 0;
+ padding: 1px ; /* Stop margin collapse. */
+}
+#mod-quiz-edit .statusdisplay p {
+ margin: 0.4em;
+}
+
+#mod-quiz-edit div.quizpage{
+ display:block;
+ clear:both;
+ width:100%;
+}
+
+#mod-quiz-edit div.quizpage span.pagetitle{
+ margin-top:0.3em;
+ float:left;
+ display:block;
+}
+
+#mod-quiz-edit div.reorder .reordercontrols .moveselectedonpage{
+ clear:right;
+ float:right;
+ padding:0.5em 0.3em;
+}
+
+#mod-quiz-edit div.reorder .reordercontrols .addnewpagesafterselected,#mod-quiz-edit .repaginatecommand{
+ float:right;
+ clear:right;
+ padding-right:1em;
+}
+
+#mod-quiz-edit div.reorder .reordercontrols .deleteselected{
+ float:right;
+ margin-right:1em;
+}
+
+#mod-quiz-edit div.reorder .reordercontrols{
+ clear:both;
+ padding-right:1em;
+ margin-top:0.5em;
+ padding-top:0.5em;
+ padding-bottom:0.5em;
+}
+
+#mod-quiz-edit div.quizpage .pagecontent{
+ margin-top:0.3em;
+ display:block;
+ float:left;
+ position:relative;
+ margin-left:0.3em;
+ margin-bottom:0.2em;
+ border-left:solid #777 thin;
+ line-height:1.3em;
+ -webkit-border-radius:0.6em;
+ -webkit-border-radius-bottomleft:0;
+ -webkit-border-radius-topleft:0;
+ border-radius:0.6em;
+ border-radius-bottomleft:0;
+ border-radius-topleft:0;
+ width:88%;
+ padding:0.15em 0 0.3em;
+}
+
+#mod-quiz-edit div.question{
+ clear:left;
+ width:100%;
+}
+
+#mod-quiz-edit div.question div.qnum{
+ display:block;
+ float:left;
+ width:1.4em;
+ padding-right:0.3em;
+ padding-left:0;
+ z-index:99;
+}
+
+#mod-quiz-edit div.reorder div.question div.qnum{
+ width:2.9em;
+ padding-top:0.1em;
+}
+/*edit tab*/
+#mod-quiz-edit div.editq div.question div.qnum{
+ padding-top:0.2em;
+}
+
+#mod-quiz-edit div.editq div.question{
+ padding-top:0.3em;
+}
+
+#mod-quiz-edit div.reorder div.question{
+ padding-top:0.2em;
+}
+
+#mod-quiz-edit div.question div.questioncontainer{
+ background-color:#ffc;
+}
+
+#mod-quiz-edit div.editq div.question div.content{
+ width:87%;
+ float:left;
+ position:relative;
+ -webkit-border-radius:0.6em;
+ -webkit-border-radius-bottomleft:0;
+ -webkit-border-radius-topleft:0;
+ border-radius:0.6em;
+ border-radius-bottomleft:0;
+ border-radius-topleft:0;
+ line-height:1.4em;
+ padding:0.5em;
+}
+
+#mod-quiz-edit .reorder div.question div.content{
+ width:87%;
+ float:left;
+ position:relative;
+ -webkit-border-radius:0.3em;
+ -webkit-border-radius-bottomleft:0;
+ -webkit-border-radius-topleft:0;
+ border-radius:0.3em;
+ border-radius-bottomleft:0;
+ border-radius-topleft:0;
+ line-height:1.2em;
+ padding:0.1em;
+}
+
+#mod-quiz-edit div.question div.content div.points{
+ top:0.5em;
+ border-left:#FFF solid 0.4em;
+ width:8.5em;
+ padding:0.2em;
+}
+#mod-quiz-edit div.question div.content div.points input{
+ width:2em;
+ padding:0;
+}
+#mod-quiz-edit div.question div.content div.points input.pointssubmitbutton{
+ width:auto;
+}
+
+#mod-quiz-edit .questionbankwindow select#catmenu_jump{
+ /* In Opera9, IE6 the width of the
+ select obeys the width of its content
+ by default. This prevents that. */
+ width:100%;
+}
+
+#mod-quiz-edit .collapsed .container{
+ display: none;
+}
+
+#mod-quiz-edit .collapsed .container{
+ display: none;
+}
+#mod-quiz-edit .questionbankwindow #showbankcmd{
+ display:none;
+}
+#mod-quiz-edit .collapsed #showbankcmd{
+ display:inline;
+}
+#mod-quiz-edit .questionbankwindow #hidebankcmd{
+ display:inline;
+}
+#mod-quiz-edit .collapsed #hidebankcmd{
+ display:none;
+}
+
+#mod-quiz-edit .questionbankwindow div.header{
+ padding-top:0.2em;
+}
+
+#randomquestiondialog_c select{
+ width:100%;
+}
+
+
+#mod-quiz-edit div.question div.content div.points,
+#mod-quiz-edit div.question div.content div.qorder{
+ line-height:1em;
+ max-width:30%;
+ position:absolute;
+ right:50px;
+ -webkit-border-radius:0.2em;
+ -webkit-border-radius-bottomleft:0;
+ -webkit-border-radius-topleft:0;
+ border-radius:0.2em;
+ border-radius-bottomleft:0;
+ border-radius-topleft:0;
+ z-index:900;
+ display:block;
+ margin:0;
+}
+
+
+#mod-quiz-edit div.question div.content .editicon{
+ width:15px;
+}
+
+#mod-quiz-edit .editq div.questioncontentcontainer div.singlequestion img{
+ float:left;
+ padding-top:0.3em;
+ padding-right:0.3em;
+}
+
+#categoryquestions .header {
+ text-align: center;
+ padding: 0 2px;
+}
+
+#categoryquestions th.modifiername .sorters,
+#categoryquestions th.creatorname .sorters {
+ font-weight: normal;
+ font-size: 0.8em;
+}
+
+#mod-quiz-edit div.question div.content .questionname,
+#categoryquestions .questionname{
+ white-space:nowrap;
+ overflow:hidden;
+ zoom:1;
+ position:relative;
+ max-width:20%;
+}
+#mod-quiz-edit div.question div.content .singlequestion .questionname,
+#mod-quiz-edit div.question div.content .singlequestion .questiontext{
+ display:inline-block;
+}
+
+#mod-quiz-edit div.editq div.question div.content .singlequestion a .questionname,
+#mod-quiz-edit div.editq div.question div.content .singlequestion a .questiontext{
+ float:left;
+}
+
+#mod-quiz-edit .quizquestionlistcontrols{
+ display:inline;
+}
+
+#mod-quiz-edit div.question div.content .questiontext,
+#categoryquestions .questiontext{
+ -o-text-overflow:ellipsis;
+ text-overflow:ellipsis;
+ position:relative;
+ zoom:1;
+ padding-left:0.3em;
+ max-width:40%;
+ overflow:hidden;
+ white-space:nowrap;
+ text-overflow:ellipsis;
+}
+#mod-quiz-edit div.editq div.question div.description div.content .questiontext {
+ max-width: 75%;
+}
+
+#mod-quiz-edit div.quizpage .pagecontent .pagestatus{
+ -webkit-border-radius-bottomright:0.3em;
+ -webkit-border-radius-topright:0.3em;
+ border-radius-bottomright:0.3em;
+ border-radius-topright:0.3em;
+ margin:0.3em;
+ padding:0.1em 0.1em 0.1em 0.3em;
+}
+
+#mod-quiz-edit div.question div.content .questiontype{
+ display:block;
+ clear:left;
+ float:left;
+}
+
+#mod-quiz-edit div.question div.content .questionpreview{
+ display:block;
+ float:left;
+ margin-left:0.3em;
+ padding-left:0.2em;
+ padding-right:0.2em;
+}
+
+#mod-quiz-edit div.question div.content div.quiz_randomquestion .questionpreview{
+ display:inline;
+ float:none;
+}
+
+#mod-quiz-edit div.question div.content div.questioncontrols{
+ float:right;
+ width:45px;
+ position:absolute;
+ right:0.3em;
+ top:0;
+ z-index:900;
+ display:block;
+ padding:0.2em;
+}
+
+#mod-quiz-edit div.question div.content div.questioncontrols img.upwithoutdown{
+ padding-right:12px;
+ display:inline;
+}
+
+#mod-quiz-edit .quizpagedelete{
+ position:absolute;
+ top:0.2em;
+ right:0.2em;
+ display:inline;
+ z-index:900;
+}
+
+#mod-quiz-edit .quizpagedelete img {
+ background-color:#d6d6d6;
+ padding:0.6em;
+}
+
+#mod-quiz-edit .pagecontrols {
+ clear:both;
+ margin-left:0.5em;
+ padding-top:0.5em;
+}
+
+#mod-quiz-edit .pagecontrols .singlebutton {
+ float:left;
+ margin-left: 1em;
+}
+#mod-quiz-edit .pagecontrols .helplink {
+ float:left;
+}
+
+#mod-quiz-edit div.quizpage .pagecontent form.randomquestionform div{
+ /* it is a mystery why this has to be inline-table but
+ otherwise the layout gets screwed, even if
+ it is "inline" */
+ display: inline-table;
+}
+
+#mod-quiz-edit div.quizpage .pagecontent form.randomquestionform div input{
+ display: inline;
+}
+
+/* a CSS class YUI container creates on the fly: */
+#mod-quiz-edit div#randomquestiondialog_c{
+ width:90%;
+}
+
+
+#mod-quiz-edit div#randomquestiondialog_c .mform,
+#mod-quiz-edit div#repaginatedialog .mform{
+ margin-left:auto;
+ margin-right:auto;
+}
+
+#mod-quiz-edit div.container div.generalbox{
+ position:relative;
+ display:block;
+ border:0 none;
+ margin:0;
+ padding:0;
+}
+
+#mod-quiz-edit .questioncontentcontainer div.randomquestionqlist{
+ padding-left:0.2em;
+ padding-right:0.2em;
+ clear:both;
+ margin:0.5em;
+ margin-top:0.8em;
+}
+#mod-quiz-edit .questioncontentcontainer div.randomquestionqlist .totalquestionsinrandomqcategory{
+ overflow:auto;
+ white-space:normal;
+}
+
+
+#mod-quiz-edit .questioncontentcontainer div.randomquestionqlist ul{
+ list-style-type:none;
+ margin:0;
+ padding:0;
+}
+#mod-quiz-edit .reorder .questioncontentcontainer .quiz_randomquestion{
+
+ position:relative;
+}
+
+#mod-quiz-edit .reorder div.question div.content div.quiz_randomquestion{
+ line-height:1em;
+}
+
+#mod-quiz-edit .reorder .questioncontentcontainer .randomquestioncategory label{
+ max-width: 25%;
+ overflow:hidden;
+ padding-left:0.3em;
+ white-space:nowrap;
+ display:inline-block;
+}
+#mod-quiz-edit .reorder .questioncontentcontainer .randomquestionfromcategory label{
+ overflow:hidden;
+ white-space:nowrap;
+ display:inline-block;
+}
+
+#mod-quiz-edit .editq div.question div.content .randomquestioncategory{
+ margin-top:0.4em;
+ position:relative;
+ display:inline-block;
+
+}
+
+#mod-quiz-edit .editq div.question div.content .randomquestioncategory a{
+ display:block;
+ max-width:15em;
+ overflow: hidden;
+ text-overflow:ellipsis;
+ -o-text-overflow:ellipsis;
+ white-space: nowrap;
+ float:left;
+ position:relative;
+}
+#mod-quiz-edit .editq div.question div.content .questionpreview{
+ float:left;
+}
+#mod-quiz-edit .editq div.question div.content .questionpreview a{
+ font-weight:normal;
+ margin-left:0em;
+ display:inline;
+ float:none;
+}
+#mod-quiz-edit .editq div.question div.content .randomquestioncategory .questionpreview img{
+ padding-right:0.3em;
+}
+
+#mod-quiz-edit .questioncontentcontainer div.randomquestionqlist ul li img{
+ padding-right:0.3em;
+}
+
+
+#mod-quiz-edit .reorder .questioncontentcontainer .randomquestioncategory,
+#mod-quiz-edit .reorder .questioncontentcontainer .randomquestionfromcategory,
+#mod-quiz-edit .reorder div.question div.content .questionpreview{
+ display:inline;
+ float:none;
+}
+
+#mod-quiz-edit .reorder .questioncontentcontainer{
+ position:relative;
+ overflow:hidden;
+ white-space:nowrap;
+}
+
+#mod-quiz-edit .reorder .questioncontentcontainer .randomquestioncategory{
+ overflow:hidden;
+ white-space:nowrap;
+}
+
+#mod-quiz-edit .reorder fieldset{
+ display:inline;
+}
+
+#mod-quiz-edit .questioncontentcontainer div.randomquestionqlist ul li{
+ clear:left;
+ width:100%;
+ overflow:hidden;
+ white-space:nowrap;
+}
+
+#mod-quiz-edit .questioncontentcontainer div.randomquestionqlist ul li span{
+ display:inline;
+}
+
+/*start question bank*/
+.questionbankwindow .choosecategory,
+.questionbankwindow .createnewquestion {
+ padding: 0.3em;
+}
+.questionbankwindow .createnewquestion .singlebutton {
+ display: inline;
+}
+.questionbankwindow #catmenu_jump {
+ display: block;
+}
+#mod-quiz-edit .questionbankwindow .createnewquestion select,
+#mod-quiz-edit .questionbankwindow #catmenu select,
+#mod-quiz-edit .questionbankwindow #menucategory {
+ width: 100%;
+}
+table#categoryquestions {
+ width: 100%;
+ overflow: hidden;
+ table-layout: fixed;
+}
+
+table#categoryquestions td,#mod-quiz-edit table#categoryquestions th{
+ overflow:hidden;
+ white-space:nowrap;
+}
+
+#categoryquestions .iconcol {
+ width: 15px;
+ text-align: center;
+ padding: 0;
+}
+
+#categoryquestions .checkbox {
+ width: 19px;
+ text-align: center;
+ padding: 0;
+}
+
+#categoryquestions .qtype {
+ text-align: center;
+}
+
+#categoryquestions .qtype {
+ width: 24px;
+ padding: 0;
+}
+
+#categoryquestions .questiontext p {
+ margin: 0;
+}
+.categoryinfo {
+ padding: 0.3em;
+}
+
+#mod-quiz-edit .paging{
+ margin-top:0;
+ margin-bottom:0;
+ display:block;
+}
+
+#mod-quiz-edit .pagingbottom{
+ padding-bottom:0.3em;
+}
+
+#mod-quiz-edit div.questionbank form .invisiblefieldset{
+ clear:both;
+}
+
+#mod-quiz-edit .sideblock .content{
+ padding:0;
+}
+
+#mod-quiz-edit .questionbank .categorysortopotionscontainer{
+ padding-top:0.5em;
+ margin-top:0.3em;
+}
+
+.questionbank div.categoryquestionscontainer,
+.questionbank .categorysortopotionscontainer,
+.questionbank .categorypagingbarcontainer,
+.questionbank .categoryselectallcontainer{
+ padding-left:0.3em;
+ padding-right:0.3em;
+}
+
+.noquestionsincategory{
+ clear:both;
+ padding-top:1em;
+ padding-bottom:1em;
+}
+
+.modulespecificbuttonscontainer{
+ padding-left:0.3em;
+ padding-right:0.3em;
+}
+
+#mod-quiz-edit div#footer{
+ clear:both;
+ padding-top:1em;
+}
+
+
+/* these will toggle if js is enabled */
+body #quizcontentsblock #repaginatedialog{
+ display: none;
+}
+body.jsenabled #quizcontentsblock #repaginatedialog{
+ display: block;
+}
+body.jsenabled #quizcontentsblock #repaginatedialog .hd{
+ display:block;
+}
+body.jsenabled #quizcontentsblock #repaginatedialog .bd{
+ padding:1em;
+}
+body.jsenabled #quizcontentsblock .repaginatecommand #repaginatecommand{
+ display:block;
+}
+
+
+.ie7.mod-quiz div.tabtree a span img.iconsmall {
+ margin: 0;
+ vertical-align: baseline;
+ position: relative;
+ top: 2px;
+}
+
+#mod-quiz-edit.ie6 div.question div.content .questiontext,
+#mod-quiz-edit.ie6 #categoryquestions .questionname{
+ /*ie6 shows this as an arrow if this is not specified*/
+ cursor: pointer;
+}
+#mod-quiz-edit.ie6 div.question div.content .questionname,
+#mod-quiz-edit.ie6 #categoryquestions .questiontext{
+ /*ie6 shows this as an arrow if this is not specified*/
+ cursor: pointer;
+}
+.mod-quiz.ie6 div.tabtree a span img.iconsmall {
+ margin: 0;
+ vertical-align: baseline;
+ position: relative;
+ top: 1px;
+}
+#mod-quiz-edit.ie6 div.question div.content .questiontext,#categoryquestions .questiontext{
+ width:50%;
+}
+#mod-quiz-edit.ie6 div.question div.content .questionname,#categoryquestions .questionname{
+ width:20%;
+}
+#mod-quiz-edit.ie6 .editq div.question div.content .randomquestioncategory a{
+ width:40%;
+}
+#mod-quiz-edit.ie6 .reorder .questioncontentcontainer .randomquestioncategory label{
+ width: 35%;
+}
+
+
+
+
+/***
+ *** Modules: Quiz
+ ***/
+
+#quiznavigation .qnbutton {
+ font: inherit;
+ line-height: 1.5em;
+ font-weight: bold;
+}
+#quiznavigation .qnbutton:hover {
+ text-decoration: underline;
+}
+
+#mod-quiz-edit div.reorder .reordercontrols .moveselectedonpage{
+ text-align:right;
+}
+#mod-quiz-edit div.question div.qnum{
+ text-align:right;
+}
+#mod-quiz-edit div.reorder div.question div.qnum{
+ text-align:right;
+ font-size:1em;
+}
+#mod-quiz-edit div.editq div.question div.qnum{
+ font-size:1.5em;
+}
+#mod-quiz-edit .questionbankwindow div.header a{
+ text-decoration:underline;
+}
+#mod-quiz-edit div.questioncontentcontainer a{
+ text-decoration:underline;
+}
+
+#mod-quiz-edit div.questioncontentcontainer div.singlequestion a{
+ text-decoration:underline;
+}
+#mod-quiz-edit div.editq div.question div.content .singlequestion a .questionname,div.editq div.question div.content .singlequestion a .questiontext{
+ text-decoration:underline;
+}
+#mod-quiz-edit div.question div.content .questiontext,
+#mod-quiz-edit #categoryquestions .questiontext {
+ font-weight:bold;
+}
+#mod-quiz-edit div.question div.content div.questioncontrols{
+ text-align:right;
+}
+#mod-quiz-edit div.quizpage .pagecontent .pagestatus{
+ font-weight:bold;
+}
+#mod-quiz-edit div.question div.content .questiontype{
+ font-style:italic;
+}
+#mod-quiz-edit .questioncontentcontainer .randomquestioncategory{
+ font-weight:bold;
+}
+#mod-quiz-edit .categoryinfofield{
+ font-style:italic;
+}
+#mod-quiz-edit .categorynamefield{
+ font-weight:bold;
+}
+#mod-quiz-edit .questionbankwindow div.header{
+ font-weight:bold;
+}
+#mod-quiz-edit a.configurerandomquestion{
+ font-size:small;
+ text-decoration:underline;
+}
+
+
+
+
+/***
+ *** Modules: Quiz
+ ***/
+
+table.quizattemptsummary .bestrow td {
+ background-color: #e8e8e8;
+}
+table.quizattemptsummary .noreviewmessage {
+ color: gray;
+}
+
+#mod-quiz-attempt #quiz-timer-outer {
+ border-color: #dddddd;
+ background: white;
+}
+
+table.quizreviewsummary th.cell {
+ background: #f0f0f0;
+}
+table.quizreviewsummary td.cell {
+ background: #fafafa;
+}
+.mod-quiz .highlightgraded {
+ background:yellow;
+}
+
+#quiznavigation .qnbutton {
+ color: #00f;
+ border-color: #bbb;
+ background-color: #ddd;
+}
+#quiznavigation .qnbutton:hover {
+ color: #f00;
+}
+#quiznavigation .qnbutton.thispage {
+ border-color: black;
+}
+#quiznavigation .qnbutton.open {
+ background-color: white;
+}
+#quiznavigation .qnbutton.correct {
+ background-color: #cfc;
+}
+#quiznavigation .qnbutton.partiallycorrect {
+ background-color: #ffa;
+}
+#quiznavigation .qnbutton.incorrect {
+ background-color: #fcc;
+}
+#quiznojswarning {
+ color: red;
+}
+#mod-quiz-report .dubious{
+ background-color: #fcc;
+}
+#mod-quiz-report .highlight{
+ border :medium solid yellow;
+ background-color:lightYellow;
+}
+#mod-quiz-report .negcovar{
+ border :medium solid pink;
+}
+#mod-quiz-edit .statusdisplay{
+ background-color: #ffc;
+}
+#mod-quiz-edit div.quizpage span.pagetitle{
+ color:#006;
+}
+#mod-quiz-edit div.quizpage .pagecontent{
+ background-color:#d6d6d6;
+}
+#mod-quiz-edit div.question div.qnum{
+ color:#333;
+}
+#mod-quiz-edit .questionbankwindow div.header{
+/*this color might need to be theme-specific,
+but in terms of usability, as testing showed,
+http://docs.moodle.org/en/Development:Quiz_UI_redesign/usability_testing_of_August_2008/Issues#Question_bank_.2F_question_adding_controls_visibility
+it must be ensured that the question
+bank window's title is prominent enough*/
+ background-color:#009;
+ color:#fff;
+ background-image:none;
+}
+
+#mod-quiz-edit div.question div.content div.points,
+ #mod-quiz-edit div.question div.content div.qorder{
+ background-color:#ddf;
+}
+
+#mod-quiz-edit div.quizpage .pagecontent .pagestatus{
+ background-color:#eee;
+}
+#mod-quiz-edit .quizpagedelete img{
+ background-color:#d6d6d6;
+}
+#mod-quiz-edit div.quizpage .pagecontent form#addquestion{
+ background-color:#fff;
+}
+#mod-quiz-edit .questioncontentcontainer div.randomquestionqlist{
+ background-color:#eee;
+}
+#mod-quiz-edit .questioncontentcontainer div.randomquestionqlist ul{
+ color:#555;
+}
+#mod-quiz-edit div.question div.content div.singlequestion .questionpreview{
+ background-color:#eee;
+}
+
+#mod-quiz-edit div.question div.content .questionpreview a{
+ background-color:#eee;
+}
+#mod-quiz-edit .questioncontentcontainer div.randomquestionqlist .totalquestionsinrandomqcategory{
+ color:#000;
+}
+/*TODO: below applies to also question bank, so when
+question bank is adapted to the new UI, add the appropriate
+css id's of question bank*/
+#mod-quiz-edit .categoryinfo{
+ background-color:#eee;
+ border-bottom:1px solid #bbb;
+}
+#mod-quiz-edit .paging{
+ background-color:#ddd;
+}
+#mod-quiz-edit .questionsortoptions{
+ background-color:#ddd;
+}
+
+#mod-quiz-edit .paging a:hover{
+ background-color:#eef;
+}
+#mod-quiz-edit div.questionbank{
+ background-color:#e6e6ff;
+}
+#mod-quiz-edit .questionbank div.categoryquestionscontainer,.questionbank .categorysortopotionscontainer,.questionbank .categorypagingbarcontainer,.questionbank .categoryselectallcontainer{
+ background-color:#FFF;
+}
+#mod-quiz-edit div.question div.content div.questioncontrols{
+ background-color:#F9F9F9;
+}
+#mod-quiz-edit div.editq div.question div.content{
+ background-color:#F9F9F9;
+}
+#mod-quiz-edit .reorder div.question div.content{
+ background-color:#F9F9F9;
+}
+
+#mod-quiz-edit .questionbankwindow div.header a{
+ color:#FFF;
+}
+#categoryquestions .r1 {
+ background: #e4e4e4;
+}
+#categoryquestions .header {
+ border: 0 none;
+}
+
--- /dev/null
+
+/***
+ *** Modules: Resource
+ ***/
+
+#mod-resource-view .resourcecontent {
+ text-align:center;
+ margin:20px;
+}
+
+#mod-resource-view .resourcepdf {
+ width: 100%;
+ padding-top: 15px;
+ text-align: center
+}
+
+.resourcecontent object {
+ height:480px;
+ width:600px;
+}
+
+.resourcepdf object{
+ height: 800px;
+ width: 800px;
+}
+
+.mod-resource .modified {
+ text-align:center;
+}
+
+.mod-resource .popupnotice {
+ text-align:center;
+ margin:40px;
+}
+
+#mod-resource-view div#footer {
+ margin-top: 5px;
+}
+
+
+/***
+ *** Modules: Resource
+ ***/
+
+#mod-resource-index .cell {
+ font-size:0.8em;
+}
+
+.mod-resource .modified {
+ font-size:0.6em;
+}
+
--- /dev/null
+.structlist {
+ list-style-type: none;
+ white-space: nowrap;
+ font-size: small;
+}
+
+.orgtitle {
+ font-weight: bold;
+ font-size: small;
+}
+
+.mod-scorm .top {
+ vertical-align: top;
+}
+
+.mod-scorm .scorm-left {
+ text-align: left;
+}
+
+.mod-scorm .scorm-center {
+ text-align: center;
+}
+
+.mod-scorm .scorm-right {
+ text-align: right;
+}
+
+.mod-scorm .scoframe {
+ position: relative;
+ width: 100%;
+ height: 100%;
+}
+
+#mod-scorm-player #scormpage {
+ position: relative;
+ width: 100%;
+}
+
+#mod-scorm-player #tochead {
+ position: relative;
+ text-align: center;
+ top: 3px;
+ height: 30px;
+}
+
+#mod-scorm-player .toc {
+ width: 80%;
+ margin-left: 20%;
+}
+
+#mod-scorm-player .no-toc {
+ width: 100%;
+}
+
+#mod-scorm-player #scormobject {
+ height: 400px;
+}
+
+#mod-scorm-player #scormtop {
+ position: relative;
+ width: 100%;
+ height: 30px;
+}
+
+#mod-scorm-player #scormbrowse {
+ position: absolute;
+ left: 5px;
+ top: 0px;
+}
+
+#mod-scorm-player #scormnav {
+ position: absolute;
+ right: 5px;
+ top: 0px;
+ text-align: center;
+ top: 3px;
+ width: 100%;
+}
+
+#mod-scorm-view .structurehead {
+ text-align: center;
+}
+
+#mod-scorm-view .structurelist {
+ list-style-type: none;
+ white-space: nowrap;
+}
+
+#mod-scorm-player #scormbox {
+ width: 74%;
+ position: absolute;
+ right: 0px;
+ top: 0px;
+}
+
+#mod-scorm-player #tocbox {
+ position: relative;
+ left: 0px;
+ width: 24%;
+ font-size: 0.8em;
+}
+
+#mod-scorm-player #tochead {
+ position: relative;
+ text-align: center;
+ top: 3px;
+ height: 30px;
+}
+
+
+#toctree {
+ position:relative;
+ width:100%;
+ overflow-x: auto;
+ overflow-y: auto;
+}
+
+.structurelist {
+ list-style-type: none;
+}
+
+#mod-scorm-player .structurelist {
+ position: relative;
+ list-style-type: none;
+ width: 96%;
+ margin-left:0;
+ padding-left: 0;
+ margin-right:0;
+ padding-right: 0;
+ padding-top: 0;
+ padding-bottom: 0;
+ margin-top:0;
+ margin-bottom:0;
+}
+
+#mod-scorm-player .structurelist ul{
+ padding-left: 0.5em;
+ margin-left: 0.5em;
+}
+
+#mod-scorm-view .structurelist {
+ list-style-type: none;
+ white-space: nowrap;
+}
+
+a#mod-scorm-log-toggle {
+ font-size: 0.7em;
+ font-weight: bold;
+}
+
+
+
+/***
+ *** Modules: Scorm
+ ***/
+
+#mod-scorm-index .cell {
+ font-size:0.8em;
+}
+
--- /dev/null
+
+/***
+ *** Modules: Survey
+ ***/
+.resultgraph {
+ text-align:center;
+ border:1px solid;
+}
+
+.reportsummary,
+.studentreport,
+.reportbuttons {
+ text-align:center;
+}
+
+.centerpara {
+ text-align:center;
+}
+
+.fullnamecell {
+ width:10%;
+ vertical-align:top;
+ white-space: nowrap;
+}
+
+.questiontext {
+ font-size:1em;
+}
+
+.smalltext {
+ font-size: 0.75em;
+}
+
+#surveyform th {
+ font-weight: normal;
+ text-align: left;
+}
+#surveyform th.hresponse {
+ text-align: center;
+ width: 9%;
+}
+
+.rblock label {
+ display: block;
+ text-align: center;
+}
+
+.foundthat,
+.preferthat {
+ white-space: nowrap;
+}
+
+.qnummiddlecell {
+ vertical-align:middle;
+}
+
+.optioncell {
+ width: 50%;
+ vertical-align: top;
+}
+
+.buttoncell {
+ width:5%;
+}
+
+.questioncell {
+ width:50%;
+ vertical-align:top;
+}
+
+.whitecell {
+ background-color:white;
+}
+
+
+/***
+ *** Modules: Survey
+ ***/
+
+#mod-survey-index .cell {
+ font-size:0.8em;
+}
+
+
+
+/***
+ *** Modules: Survey
+ ***/
+
+#mod-survey-view .r0 {
+ background-color: #EEEEEE;
+}
+#mod-survey-view .r1 {
+ background-color: #DDDDDD;
+}
+
--- /dev/null
+
+/***
+ *** Modules: Wiki
+ ***/
+.sideblockheading,
+.howtowiki {
+ text-align:right;
+}
+
+.wikisearchform,
+.wikilinksblock,
+wikiadminactions {
+ text-align:center;
+}
+
+.wikilinkright{
+ text-align:right;
+ padding-bottom: 0.5em;
+}
+
+.wikiexportbox{
+ margin-left:auto;
+ margin-right:auto;
+}
+
+
+
+/***
+ *** Modules: Wiki
+ ***/
+
+#mod-wiki-index .cell {
+ font-size:0.8em;
+}
+
tabs
user
- various modules
-
*******************************************************************/
/***
border:#888
}
-body, body#tinymce {
+html, body#tinymce {
background-color:#FAFAFA;
color:#000;
}
* course/view.php
**/
#course-view .unread{
- background: #9EBEFF;
+ background: #9EBEFF;
}
border-color:#DDDDDD;
}
-/***
- *** Modules: Chat
- ***/
-
-#mod-chat-gui_basic .text,
-#mod-chat-gui_header_js-jsupdate .text {
- color:#000
-}
-
-#mod-chat-gui_basic .event,
-#mod-chat-gui_basic .title,
-#mod-chat-gui_header_js-jsupdate .event,
-#mod-chat-gui_header_js-jsupdate .title {
- color:#888
-}
-
-#mod-chat-gui_header_js-chatinput .wait {
- background: #dddddd;
-}
-
-#mod-chat-view #chatcurrentusers .idletime {
- color: #888888;
-}
-
-/***
- *** Modules: Choice
- ***/
-
-/***
- *** Modules: Forum
- ***/
-
-/**
- * Patch MDL-18971 version 3 puts the forum classes
- * in page sequence. Also added one course class (above)
- * for course/view.php
- **/
-
-/** The location of these classes is unknown
- * Commented out with patch MDL-18971 version 3
- **/
-/*.sideblock .post .head {
- color:#555555;
-}*/
-
-/** Unread Posts count background on
- * mod/forum/index.php
- **/
-#mod-forum-index .unread {
- background: #9EBEFF;
-}
-
-/** wire frame around cells in
- * mod/forum/view.php
- **/
-.forumheaderlist td {
- border-color: #FFFFFF;
-}
-
-/** Discussion column background in
- * mod/forum/view.php
- * The inner class is actually "topic starter"
- **/
-.forumheaderlist .discussion .starter {
- background:#DDDDDD;
-}
-
-/** unread column background on
- * mod/forum/view.php
- **/
-#mod-forum-view .unread{
- background: #9EBEFF;
-}
-
-/** border around posts in
- * mod/forum/view.php (forumheaderlist) and
- * mod/forum/discuss.php (forumpost)
- **/
-.forumheaderlist,
-.forumpost {
- border-color:#DDDDDD;
-}
-
-/** post body color in
- * mod/forum/discuss.php
- **/
-.forumpost .content {
- background: #FFFFFF;
-}
-
-/** left photo section of each post in
- * mod/forum/discuss.php
- **/
-.forumpost .left {
- background:#EEEEEE;
-}
-
-/** line between header and post body in
- * mod/forum/discuss.php
- **/
-.forumpost .topic {
- border-bottom-color: #EEEEEE;
-}
-
-/** header of the first post in
- * mod/forum/discuss.php
- **/
-.forumpost .starter {
- background:#DDDDDD;
-}
-
-/** header of reply posts and
- * lower corners of all posts in
- * mod/forum/discuss.php
- **/
-#mod-forum-discuss .forumpost {
- background: none;
-}
-
-/** inside border of unread posts in nested format in
- * mod/forum/discuss.php
- **/
-#mod-forum-discuss .forumpost.unread .content {
- border-width:2px;
- border-color: #0046C7;
-}
-
-/** headers of unread posts in threaded format in
- * mod/forum/discuss.php
- **/
-#mod-forum-discuss .forumthread.unread {
- background: #9EBEFF;
-}
-
-
-/***
- *** Modules: Glossary
- ***/
-
-.entryboxheader {
- border-color: #BBBBBB;
-}
-
-.entrybox {
- border-color: #BBBBBB;
-}
-
-.entry {
-}
-
-.glossarypost {
- border-color: #DDDDDD;
-}
-
-.glossarypost .entryheader,
-.glossarypost .entryapproval,
-.glossarypost .picture,
-.glossarypost .entryattachment,
-.glossarypost .left {
- background-color: #F0F0F0;
-}
-
-.glossarycomment {
- border-color: #DDDDDD;
-}
-
-.glossarycomment .entryheader,
-.glossarycomment .picture,
-.glossarycomment .left {
- background-color: #F0F0F0;
-
-}
-
-#mod-glossary-report .generalbox .teacher {
- background: #F0F0F0;
-}
-
-.glossarycategoryheader {
- background-color: #dddddd;
-}
-
-.glossaryformatheader {
- background-color: #dddddd;
-}
-
-
-/***
- *** Modules: Journal
- ***/
-
-#mod-journal-view .feedbackbox .left,
-#mod-journal-view .feedbackbox .entryheader {
- background-color: #dddddd;
-}
-
-/***
- *** Modules: Label
- ***/
-
-/***
- *** Modules: Lesson
- ***/
-
-/***
- *** Modules: Quiz
- ***/
-
-table.quizattemptsummary .bestrow td {
- background-color: #e8e8e8;
-}
-table.quizattemptsummary .noreviewmessage {
- color: gray;
-}
-
-#mod-quiz-attempt #quiz-timer-outer {
- border-color: #dddddd;
- background: white;
-}
-
-table.quizreviewsummary th.cell {
- background: #f0f0f0;
-}
-table.quizreviewsummary td.cell {
- background: #fafafa;
-}
-.mod-quiz .highlightgraded {
- background:yellow;
-}
-
-#quiznavigation .qnbutton {
- color: #00f;
- border-color: #bbb;
- background-color: #ddd;
-}
-#quiznavigation .qnbutton:hover {
- color: #f00;
-}
-#quiznavigation .qnbutton.thispage {
- border-color: black;
-}
-#quiznavigation .qnbutton.open {
- background-color: white;
-}
-#quiznavigation .qnbutton.correct {
- background-color: #cfc;
-}
-#quiznavigation .qnbutton.partiallycorrect {
- background-color: #ffa;
-}
-#quiznavigation .qnbutton.incorrect {
- background-color: #fcc;
-}
-#quiznojswarning {
- color: red;
-}
-#mod-quiz-report .dubious{
- background-color: #fcc;
-}
-#mod-quiz-report .highlight{
- border :medium solid yellow;
- background-color:lightYellow;
-}
-#mod-quiz-report .negcovar{
- border :medium solid pink;
-}
-#mod-quiz-edit .statusdisplay{
- background-color: #ffc;
-}
-#mod-quiz-edit div.quizpage span.pagetitle{
- color:#006;
-}
-#mod-quiz-edit div.quizpage .pagecontent{
- background-color:#d6d6d6;
-}
-#mod-quiz-edit div.question div.qnum{
- color:#333;
-}
-#mod-quiz-edit .questionbankwindow div.header{
-/*this color might need to be theme-specific,
-but in terms of usability, as testing showed,
-http://docs.moodle.org/en/Development:Quiz_UI_redesign/usability_testing_of_August_2008/Issues#Question_bank_.2F_question_adding_controls_visibility
-it must be ensured that the question
-bank window's title is prominent enough*/
- background-color:#009;
- color:#fff;
- background-image:none;
-}
-
-#mod-quiz-edit div.question div.content div.points,
- #mod-quiz-edit div.question div.content div.qorder{
- background-color:#ddf;
-}
-
-#mod-quiz-edit div.quizpage .pagecontent .pagestatus{
- background-color:#eee;
-}
-#mod-quiz-edit .quizpagedelete img{
- background-color:#d6d6d6;
-}
-#mod-quiz-edit div.quizpage .pagecontent form#addquestion{
- background-color:#fff;
-}
-#mod-quiz-edit .questioncontentcontainer div.randomquestionqlist{
- background-color:#eee;
-}
-#mod-quiz-edit .questioncontentcontainer div.randomquestionqlist ul{
- color:#555;
-}
-#mod-quiz-edit div.question div.content div.singlequestion .questionpreview{
- background-color:#eee;
-}
-
-#mod-quiz-edit div.question div.content .questionpreview a{
- background-color:#eee;
-}
-#mod-quiz-edit .questioncontentcontainer div.randomquestionqlist .totalquestionsinrandomqcategory{
- color:#000;
-}
-/*TODO: below applies to also question bank, so when
-question bank is adapted to the new UI, add the appropriate
-css id's of question bank*/
-#mod-quiz-edit .categoryinfo{
- background-color:#eee;
- border-bottom:1px solid #bbb;
-}
-#mod-quiz-edit .paging{
- background-color:#ddd;
-}
-#mod-quiz-edit .questionsortoptions{
- background-color:#ddd;
-}
-
-#mod-quiz-edit .paging a:hover{
- background-color:#eef;
-}
-#mod-quiz-edit div.questionbank{
- background-color:#e6e6ff;
-}
-#mod-quiz-edit .questionbank div.categoryquestionscontainer,.questionbank .categorysortopotionscontainer,.questionbank .categorypagingbarcontainer,.questionbank .categoryselectallcontainer{
- background-color:#FFF;
-}
-#mod-quiz-edit div.question div.content div.questioncontrols{
- background-color:#F9F9F9;
-}
-#mod-quiz-edit div.editq div.question div.content{
- background-color:#F9F9F9;
-}
-#mod-quiz-edit .reorder div.question div.content{
- background-color:#F9F9F9;
-}
-
-#mod-quiz-edit .questionbankwindow div.header a{
- color:#FFF;
-}
-#categoryquestions .r1 {
- background: #e4e4e4;
-}
-#categoryquestions .header {
- border: 0 none;
-}
-
-/***
- *** Modules: Resource
- ***/
-
-/***
- *** Modules: Scorm
- ***/
-
-/***
- *** Modules: Survey
- ***/
-
-#mod-survey-view .r0 {
- background-color: #EEEEEE;
-}
-#mod-survey-view .r1 {
- background-color: #DDDDDD;
-}
-
-
-/***
- *** Modules: Wiki
- ***/
-
-/***
- *** Modules: Workshop
- ***/
-
-.workshoppostpicture {
- background-color:#FEE6B9;
-}
-
-.workshopassessmentheading {
- background-color:#DDDDDD;
-}
.error {
color:#ff0000;
tabs
user
- various modules
-
*******************************************************************/
cursor: help;
}
-.currentlink {
- font-style: italic;
- display: inline;
-}
/***
*** Header
***/
font-style: italic;
}
-/***
- *** Modules: Assignment
- ***/
-
-#mod-assignment-index .cell {
- font-size:0.8em;
-}
-
-#wordcount {
- font-size: 0.8em;
-}
-
-/***
- *** Modules: Chat
- ***/
-
-#mod-chat-index .cell {
- font-size:0.8em;
-}
-
-
-#mod-chat-gui_basic h1 {
- font-size:1.4em;
-}
-
-#mod-chat-gui_basic #participants .idle {
- font-size:0.6em;
-}
-
-#mod-chat-view #chatcurrentusers .chatuserdetails {
- font-size: 0.6em;
-}
-/***
- *** Modules: Choice
- ***/
-
-#mod-choice-index .cell {
- font-size:0.8em;
-}
-
-/***
- *** Modules: Forum
- ***/
-
-.forumnodiscuss{
- font-weight:bold;
-}
-.forumpost .topic .subject {
- font-weight: bold;
-}
-.forumpost .topic .author , .forumpost .topic .externalblog {
- font-size: 0.8em;
-}
-.forumpost .commands,
-.forumpost .link,
-.forumpost .footer {
- font-size: 0.9em;
-}
-.forumheaderlist .discussion .lastpost {
- font-size: 0.7em;
-}
-body#mod-forum-search .introcontent {
- font-weight:bold;
-}
-body#mod-forum-index .generalbox .cell {
- font-size: 0.80em;
-}
-
-.forumpost .edited {
- font-style: italic;
-}
-
-
-/***
- *** Modules: Glossary
- ***/
-
-.glossarypost .commands {
- font-size: 0.8em;
-}
-.glossarypost .author {
- font-size: 0.8em;
-}
-.glossarypost .time {
- font-size: 0.8em;
-}
-.glossarycategoryheader h2,
-.glossarypost .concept h3 {
- font-size: 1em;
- margin: 0;
-}
-.glossarypost div.concept h3,
-.glossarypost.continuous .concept {
- display: inline;
-}
-.glossarypost .entryheader {
- font-weight: normal;
- text-align: left;
-}
-.glossarycomment .author {
- font-size: 0.8em;
-}
-.entrylowersection .aliases {
- font-size: 0.8em;
-}
-.entrylowersection .icons,
-.entrylowersection .ratings {
- font-size: 0.8em;
-}
-
-#mod-glossary-index .cell {
- font-size:0.8em;
-}
-
-
-/***
- *** Modules: Journal
- ***/
-#mod-journal-view .lastedit,
-#mod-journal-view .editend {
- font-size: 0.7em;
-}
-#mod-journal-view .author {
- font-size: 1em;
- font-weight: bold;
-}
-#mod-journal-view .time {
- font-size: 0.7em;
- font-style: italic;
-}
-#mod-journal-view .grade {
- font-weight: bold;
- font-style: italic;
-}
-
-#mod-journal-index .cell {
- font-size:0.8em;
-}
-
-/***
- *** Modules: Label
- ***/
-
-/***
- *** Modules: Lesson
- ***/
-
-#mod-lesson-index .cell {
- font-size:0.8em;
-}
-
-/***
- *** Modules: Quiz
- ***/
-
-#quiznavigation .qnbutton {
- font: inherit;
- line-height: 1.5em;
- font-weight: bold;
-}
-#quiznavigation .qnbutton:hover {
- text-decoration: underline;
-}
-
-#mod-quiz-edit div.reorder .reordercontrols .moveselectedonpage{
- text-align:right;
-}
-#mod-quiz-edit div.question div.qnum{
- text-align:right;
-}
-#mod-quiz-edit div.reorder div.question div.qnum{
- text-align:right;
- font-size:1em;
-}
-#mod-quiz-edit div.editq div.question div.qnum{
- font-size:1.5em;
-}
-#mod-quiz-edit .questionbankwindow div.header a{
- text-decoration:underline;
-}
-#mod-quiz-edit div.questioncontentcontainer a{
- text-decoration:underline;
-}
-
-#mod-quiz-edit div.questioncontentcontainer div.singlequestion a{
- text-decoration:underline;
-}
-#mod-quiz-edit div.editq div.question div.content .singlequestion a .questionname,div.editq div.question div.content .singlequestion a .questiontext{
- text-decoration:underline;
-}
-#mod-quiz-edit div.question div.content .questiontext,
-#mod-quiz-edit #categoryquestions .questiontext {
- font-weight:bold;
-}
-#mod-quiz-edit div.question div.content div.questioncontrols{
- text-align:right;
-}
-#mod-quiz-edit div.quizpage .pagecontent .pagestatus{
- font-weight:bold;
-}
-#mod-quiz-edit div.question div.content .questiontype{
- font-style:italic;
-}
-#mod-quiz-edit .questioncontentcontainer .randomquestioncategory{
- font-weight:bold;
-}
-#mod-quiz-edit .categoryinfofield{
- font-style:italic;
-}
-#mod-quiz-edit .categorynamefield{
- font-weight:bold;
-}
-#mod-quiz-edit .questionbankwindow div.header{
- font-weight:bold;
-}
-#mod-quiz-edit a.configurerandomquestion{
- font-size:small;
- text-decoration:underline;
-}
-
-/***
- *** Modules: Resource
- ***/
-
-.mod-page .modified {
- font-size:0.6em;
-}
-
-/***
- *** Modules: Resource
- ***/
-
-#mod-resource-index .cell {
- font-size:0.8em;
-}
-
-.mod-resource .modified {
- font-size:0.6em;
-}
-
-/***
- *** Modules: Scorm
- ***/
-
-#mod-scorm-index .cell {
- font-size:0.8em;
-}
-
-/***
- *** Modules: Survey
- ***/
-
-#mod-survey-index .cell {
- font-size:0.8em;
-}
-
-/***
- *** Modules: Wiki
- ***/
-
-#mod-wiki-index .cell {
- font-size:0.8em;
-}
-
-/***
- *** Modules: Workshop
- ***/
-
-#mod-workshop-index .cell {
- font-size:0.8em;
-}
-
-
-#thegroup, #thegrouping, #dummygrouping {
- font-size: 0.8em;
- /*letter-spacing: -0.01em;*/
- display: block;
-}
-
/***
*** Phpinfo display
tags
user
- various modules
-
*******************************************************************/
text-align: center;
}
+body {
+ padding: 4px;
+}
+
#layout-table {
width:100%;
border-collapse:separate;
width: 90%;
}
.groupmanagementtable td {
- vertical-align: top;
+ vertical-align: middle;
}
.groupmanagementtable p {
text-align: left;
}
/* Prevent border-collapse:collapse from bleeding through in IE6, IE7 */
#date_selector_calendar_panel.yui-overlay-hidden table {
- display:none;
+ *display:none;
}
#date_selector_calendar_panel th.calhead {
padding-right: 2em;
margin:auto;
}
-.generalboxcontent table{
- width:100%;
-}
-
#admin-index .adminerror,
#admin-index .adminwarning {
text-align:center;
list-style: none;
padding-left:0px;
margin:3px;
+ text-align: left;
}
.block_tree ul {
margin-left: 0px;
font-size:90%;
}
.block_tree .tree_item.branch {
- background-image: url(../../pix/t/expanded.png);
+ background-image: url([[pix:t/expanded]]);
background-position: center left;
background-repeat: no-repeat;
}
cursor:pointer;
}
.jsenabled .block_tree .collapsed .tree_item.branch {
- background-image: url(../../pix/t/collapsed.png);
+ background-image: url([[pix:t/collapsed]]);
}
.jsenabled .block_tree .tree_item.emptybranch {
- background-image: url(../../pix/t/collapsed_empty.png);
+ background-image: url([[pix:t/collapsed_empty]]);
background-position: center left;
background-repeat: no-repeat;
}
height:100%;
border-right:1px solid #bbb;
border-bottom:1px solid #bbb;
- background-image:url(gradient_vertical.jpg);
+ background-image:url([[pix:theme|gradient_vertical]]);
background-position:100% 0%;
background-repeat:repeat-y;
}
padding-bottom:2px;
}
-.sideblock_js_expansion .footer .adminsearchform {
- text-align:left;
-}
-
/***
*** Blogs
***/
width: auto;
}
-.officialblogtags {
- display: inline;
- font-weight: bold;
+.block_blog_externals a.delete {
+ margin-left: 6px;
+}
+
+.block_blog_externals div.newlink {
+ margin-top: 10px;
+ text-align: center;
+ width: 100%;
}
/***
width: 1.5em;
}
+.course-view .activity {
+ text-align:left;
+}
+
.course-view .current .side {
}
margin-bottom: 0.5em;
border-style:solid;
border-width:1px;
- clear: both;
}
.weeks .content,
.topics .content {
- padding: 5px 5px 15px 5px;
+ padding: 5px;
margin: 0 1.7em 0 1.7em;
}
.weeks .right,
width: 90%;
margin-left: auto;
margin-right: auto;
+ text-align: left;
}
.categorylist .category.image {
/* gradebook edit tree */
.grade-edit-tree .gradetreebox {
+ width:70%;
margin-left:auto;
margin-right:auto;
margin-top:10px;
margin-top: 7px;
}
-.gradetreebox table.simple {
- width: 70%;
-}
-
/***
*** Login
***/
#qtypechoicecontainer {
display: none;
- background: white;
}
body.jsenabled #qtypechoicecontainer {
display: block;
.tabrow0 a span {
padding: 10px 14px 0.35em 0;
- background: transparent url(pix/tab/right.gif) no-repeat right top;
+ background: transparent url([[pix:theme|tab/right]]) no-repeat right top;
}
.tabrow1 li a span {
.tabrow0 a {
text-decoration: none;
- background: transparent url(pix/tab/left.gif) no-repeat left top;
+ background: transparent url([[pix:theme|tab/left]]) no-repeat left top;
margin: 0 -1px 0 0;
padding: 10px 0 0.35em 13px;
}
.tabrow0 a:link:hover,
.tabrow0 a:visited:hover {
- background-image: url(pix/tab/left_hover.gif);
+ background-image: url([[pix:theme|left_hover]]);
}
.tabrow0 .here a:link:hover,
.tabrow0 .here a:visited:hover {
- background-image: url(pix/tab/left.gif);
+ background-image: url([[pix:theme|tab/left]]);
}
.tabrow0 a:link:hover span,
.tabrow0 a:visited:hover span {
- background-image: url(pix/tab/right_hover.gif);
+ background-image: url([[pix:theme|tab/right_hover]]);
}
.tabrow0 .here a:link:hover span,
.tabrow0 .here a:visited:hover span {
- background-image: url(pix/tab/right.gif);
+ background-image: url([[pix:theme|tab/right]]);
}
.tabrow0 .here a {
list-style: none;
border-top: 1px solid #aaa;
line-height: normal;
- background: transparent url(pix/tab/tabrow1.gif) repeat-x center left;
+ background: transparent url([[pix:theme|tab/tabrow1]]) repeat-x center left;
font-size: 90%;
}
margin-right:auto;
}
+
/***
- *** Modules: Assignment
+ *** Help files (/lang/-/help)
***/
-
-.userpicture,
-.picture user,
-.picture teacher {
- width:35px;
- height: 35px;
- vertical-align:top;
+#help hr {
+ border: none;
+ height: 1px;
+ background: #ccc;
}
-.modform {
- text-align:center;
+#help .example1 {
+ color: #a00;
+}
+#help .success {
+ color: #080;
+}
+#help .center {
+ text-align: center;
}
-#wordcount {
+#help .moreinfo {
text-align: right;
}
-
-/***
- *** Modules: Chat
- ***/
-
-.nextchatsession {
- text-align:center;
+/* Equivalent to 1 and 5 nested blockquotes respectively. */
+#help .indent {
+ margin-left: 40px;
}
-
-#mod-chat-gui_header_js-jsupdate {
- margin:10px
+#help .indent-big {
+ margin-left: 160px;
+ margin-right:160px;
}
-#mod-chat-gui_header_js-jsupdate .chat-event,
-#mod-chat-gui_header_js-jsupdate .chat-message {
- width:100%;
+#help pre, #help code {
+ background: #eee;
+ border: 1px dashed #ddd;
+ padding: 3px;
+}
+#help #emoticons{
+ text-align: center;clear:both;width: 300px;margin-right: auto; margin-left:auto;
+}
+#help #emoticons ul{
+ list-style-type: none;
+}
+#help #emoticons li{
+ margin-bottom: 3px;
+ width: 120px;
+ border-left: 3px solid gray;
+ padding-left: 7px;
+ float: left;
+}
+/**
+ * comments 2.0
+ *
+ */
+.comment-ctrl {
+ max-width: 200px;
+ font-size: 12px;
+ display: none;
+ margin:0;
padding:0;
- margin-top:7px
- display:block;
}
-#mod-chat-view #chatcurrentusers .chatuserdetails {
- vertical-align: middle;
+.comment-ctrl h5 {
+ margin:0;
+ padding: 5px;
}
-#mod-chat-view #enterlink {
- text-align: center;
- margin-left: auto;
- margin-right: auto;
- width: 50%;
+.comment-area {
+ padding: 5px;
}
-
-#mod-chat-gui_basic #participants ul {
- margin:0px;
- padding:0px;
- list-style-type:none;
+.comment-area .bd {
}
-
-#mod-chat-gui_basic #participants ul li {
- display:inline;
- margin-right:10px;
+.comment-area textarea {
+ width:100%;
+ border: 1px solid grey;
+ overflow:auto;
}
-#mod-chat-gui_basic #participants ul li .userinfo {
- display:inline;
+.comment-area .fd {
+ text-align:right;
+}
+.comment-meta span {
+ color:grey;
}
-#mod-chat-gui_basic #messages dl {
- padding:0px;
- margin:1px;
+.comment-list-wrapper {
}
-#mod-chat-gui_basic #messages dd,
-#mod-chat-gui_basic #messages dt {
- margin-left:0px;
- margin-right:5px;
- padding:0px;
- display:inline;
+.comment-list {
+ /*height: 150px;*/
+ font-size: 11px;
+ overflow:auto;
+ list-style:none;
+ padding:0;
+ margin:0;
}
-#mod-chat-gui_ajax-index .mdl-chat-entry, .mdl-chat-my-entry {
- clear:both;
- display:block;
+.comment-list li {
+ margin: 2px;
+ margin-bottom:5px;
+ clear:both;
}
-#mod-chat-gui_ajax-index #messages-list, #users-list {
- list-style-type:none;
- margin:0;
- padding:0;
+
+.comment-paging{
+ /*background: #d8d8da;*/
+ text-align:center;
}
-#mod-chat-gui_ajax-index #users-list a {
- color: grey;
- font-size: 10px;
+.comment-paging .pageno{
+ padding: 2px;
}
-#mod-chat-gui_ajax-index #chat-header {
- font-size: 200%;
+.comment-userpicture {
+ width: 20px;
+ float:left;
}
-#mod-chat-gui_ajax-index #chat-header p{
- display: inline;
- font-size: 50%;
+.comment-content{
+ margin-left: 22px;
}
-#mod-chat-gui_ajax-index .chat-event {
- color:grey;
- text-align:center;
+.comment-content div{
+ margin:0;
+ padding:0;
}
-#mod-chat-gui_ajax-index .time, #mod-chat-gui_ajax-index .user{
- color: grey;
- font-size: 9px;
+.comment-content p{
+ padding:0;
+ margin:0 18px 0 0;
}
-
-/***
- *** Modules: Choice
- ***/
-.button {
- text-align:center;
+.comment-delete{
+ float:right;
+ text-align:right;
}
-
-.attemptcell {
- width:5px;
- white-space: nowrap;
+.comment-container {
+ float:left;
+ width: 305px;
+ margin: 4px;
}
-.anonymous,
-.names {
- margin-left:auto;
- margin-right:auto;
+/* CSS for shadows */
+.divshadow div {
+ position:absolute;
+ width:10px;
+ height:10px;
+ background-image:url([[pix:theme|shadow_corners]]);
+ background-repeat:no-repeat;
}
-
-.downloadreport {
- border:0px;
- margin-left:auto;
- margin-right:auto;
+.divshadow .shadow_top {
+ top:-10px;
+ right:0px;
+ width:100%;
+ background-image:url([[pix:theme|shadow_top_bottom]]);
+ background-position:0px 0px;
+ background-repeat:repeat-x;
}
-
-.choiceresponse {
+.divshadow .shadow_bottom {
+ bottom:-10px;
+ right:0px;
width:100%;
+ background-image:url([[pix:theme|shadow_top_bottom]]);
+ background-position:0px 100%;
+ background-repeat:repeat-x;
}
-.choiceresponse .picture {
- width:10px;
- white-space: nowrap;
+.divshadow .shadow_left {
+ top:0px;
+ left:-10px;
+ height:100%;
+ background-image:url([[pix:theme|shadow_left_right]]);
+ background-position:0px 0px;
+ background-repeat:repeat-y;
}
-
-.choiceresponse .fullname {
- width:100%;
- white-space: nowrap;
+.divshadow .shadow_right {
+ bottom:0px;
+ right:-10px;
+ height:100%;
+ background-image:url([[pix:theme|shadow_left_right]]);
+ background-position:100% 0px;
+ background-repeat:repeat-y;
}
-
-
-.results.data {
- vertical-align:top;
- white-space: nowrap;
+.divshadow .shadow_top_right {
+ top:-10px;
+ right:-10px;
+ background-position:100% 0px;
}
-
-/***
- *** Modules: Data
- ***/
-.fieldadd,
-.sortdefault,
-.defaulttemplate {
- text-align:center;
+.divshadow .shadow_bottom_right {
+ bottom:-10px;
+ right:-10px;
+ background-position:100% 100%;
}
-.datapreferences {
- text-align:center;
+.divshadow .shadow_top_left {
+ top:-10px;
+ left:-10px;
+ background-position:0px 0px;
}
-
-table.presets {
- margin-left: auto;
- margin-right: auto;
+.divshadow .shadow_bottom_left {
+ bottom:-10px;
+ left:-10px;
+ background-position:0px 100%;
}
-/***
- ***
- *** Modules: Folder
- ***/
-#mod-folder-view .foldertree {
- width: 90%;
- margin-left: auto;
- margin-right: auto;
+/*********** File picker **********/
+
+/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */
+/* copy from yui/examples/treeview/assets/css/folders/tree.css */
+/* first or middle sibling, no children */
+.file-picker .ygtvtn { background: url(../pix/y/tn.gif) 0 0 no-repeat; width:17px; height:22px; }
+/* first or middle sibling, collapsable */
+.file-picker .ygtvtm { background: url(../pix/y/tm.gif) 0 0 no-repeat; width:34px; height:22px; cursor:pointer }
+/* first or middle sibling, collapsable, hover */
+.file-picker .ygtvtmh { background: url(../pix/y/tmh.gif) 0 0 no-repeat; width:34px; height:22px; cursor:pointer }
+/* first or middle sibling, expandable */
+.file-picker .ygtvtp { background: url(../pix/y/tp.gif) 0 0 no-repeat; width:34px; height:22px; cursor:pointer }
+/* first or middle sibling, expandable, hover */
+.file-picker .ygtvtph { background: url(../pix/y/tph.gif) 0 0 no-repeat; width:34px; height:22px; cursor:pointer }
+/* last sibling, no children */
+.file-picker .ygtvln { background: url(../pix/y/ln.gif) 0 0 no-repeat; width:17px; height:22px; }
+/* Last sibling, collapsable */
+.file-picker .ygtvlm { background: url(../pix/y/lm.gif) 0 0 no-repeat; width:34px; height:22px; cursor:pointer }
+/* Last sibling, collapsable, hover */
+.file-picker .ygtvlmh { background: url(../pix/y/lmh.gif) 0 0 no-repeat; width:34px; height:22px; cursor:pointer }
+/* Last sibling, expandable */
+.file-picker .ygtvlp { background: url(../pix/y/lp.gif) 0 0 no-repeat; width:34px; height:22px; cursor:pointer }
+/* Last sibling, expandable, hover */
+.file-picker .ygtvlph { background: url(../pix/y/lph.gif) 0 0 no-repeat; width:34px; height:22px; cursor:pointer }
+/* Loading icon */
+.file-picker .ygtvloading { background: url(../pix/y/loading.gif) 0 0 no-repeat; width:16px; height:22px; }
+/* the style for the empty cells that are used for rendering the depth
+ * of the node */
+.file-picker .ygtvdepthcell { background: url(../pix/y/vline.gif) 0 0 no-repeat; width:17px; height:22px; }
+.file-picker .ygtvblankdepthcell { width:17px; height:22px; }
+/* the style of the div around each node */
+.file-picker .ygtvitem { }
+.file-picker .ygtvitem table{ margin-bottom:0; }
+.file-picker .ygtvitem td { border:none;padding:0; }
+/* the style of the div around each node's collection of children */
+.file-picker .ygtvchildren { }
+* html .file-picker .ygtvchildren { height:1%; }
+/* the style of the text label in ygTextNode */
+.file-picker .ygtvlabel, .file-picker .ygtvlabel:link, .file-picker .ygtvlabel:visited, .file-picker .ygtvlabel:hover { margin-left:2px; text-decoration: none; }
+
+
+.file-picker{font-size:12px;}
+.file-picker strong{background:#FFFFCC}
+.file-picker a{color: #336699}
+.file-picker a:hover{background:#003366;color:white}
+.file-picker .fp-panel{padding:0;margin:0; text-align:left;}
+.file-picker .fp-login-form{text-align:center}
+.file-picker .fp-searchbar{float:right}
+.file-picker .fp-viewbar{width:300px;float:left}
+.file-picker .fp-toolbar{padding: .8em;background: #FFFFCC;text-align:center;margin: 3px}
+.file-picker .fp-toolbar a{padding: 0 .5em}
+.file-picker .fp-list{list-style-type:none;padding:0;float:left;width:100%;margin:0;}
+.file-picker .fp-list li{border-bottom:1px dotted gray;margin-bottom: 1em;}
+.file-picker .fp-repo-name{display:block;padding: .5em;margin-bottom: .5em}
+.file-picker .fp-pathbar{margin: .4em;border-bottom: 1px dotted gray;}
+.file-picker .fp-pathbar a{padding: .4em;}
+.file-picker .fp-rename-form{text-align:center}
+.file-picker .fp-rename-form p{margin: 1em;}
+.file-picker .fp-upload-form{margin: 2em 0;text-align:center}
+.file-picker .fp-upload-btn{clear:both;margin-top: 2em;}
+.file-picker .fp-upload-btn a{cursor: default;background: white;border:1px solid gray;color:black;padding: .5em}
+.file-picker .fp-upload-btn a:hover {background: grey;color:white}
+.file-picker .fp-paging{margin:1em .5em; clear:both;text-align:center;line-height: 2.5em;}
+.file-picker .fp-paging a{padding: .5em;border: 1px solid #CCC}
+.file-picker .fp-paging a.cur_page{border: 1px solid blue}
+.file-picker .fp-popup{text-align:center}
+.file-picker .fp-grid{float:left;text-align:center;}
+.file-picker .fp-grid div{overflow: hidden}
+.file-picker .fp-grid p{margin:0;padding:0;background: #FFFFCC}
+.file-picker .fp-grid .label{height:48px;text-align:center}
+.file-picker .fp-grid span{color:gray}
+.file-picker .fp-error {padding: 2em 0; margin: 3em 5px;text-align:center;background: #FFBBBB}
+.file-picker .fp-msg {padding: 2em 0; margin: 3em 5px;text-align:center;background: green}
+/* file picker search dialog */
+.file-picker div.bd{text-align:left}
+
+
+/* TODO: Fix IE6 somehow
+.yui-skin-sam .yui-panel .hd{}
+*/
+
+
+
+/*********** IE6 HACKS ***********/
+
+.ie6 .tabtree {
+ height: 100%;
}
-/***
- *** Modules: Forum
- ***/
+.ie6 .tabrow0 {
+ padding-top: 10px;
+}
-#mod-forum-view .forummode {
- text-align:center;
+.ie6 .tabrow0 li {
+ margin-left: 0;
}
-.forumheaderlist,
-.forumpost {
- border-width:1px;
- border-style:solid;
- border-collapse:separate;
+.ie6 .tabrow0 li.first {
+ margin-left: -4px;
+ margin-right: -4px;
}
-.forumpost {
- margin-top: 15px;
+.ie6 .tabrow0 li.last a {
+ margin-right: 0;
}
-.forumpost .topic {
- padding: 4px;
- border-style:solid;
- border-width: 0px;
- border-bottom-width: 1px;
+.ie6 .tabrow0 li.onerow {
+ margin-right: 0;
}
-.forumpost .commands {
- padding-top: 0.5em;
- text-align:right;
- clear: both;
+.ie6 .tabrow0 a {
+ padding: 0 0 0 13px;
}
-.forumpost .ratings {
- padding-top: 1em;
- text-align:right;
+.ie6 .tabrow0 a span {
+ padding: 12px 1em 4px 0;
}
-.forumpost .attachments {
- padding: 7px;
- text-align:right;
+.ie6 .tabrow0 div,
+.tabrow0 ul {
+ top: 3.5em;
+ padding: 0.2em 0;
}
-.forumpost .content {
- padding: 4px;
+.ie6 form.mform input {
+ margin-left: expression((this.type=="text"||this.type=="file"||this.type=="password")?'-10px':'0');
}
-.forumpost .footer {
- padding-top: 0.5em;
- text-align:right;
+#admin-user-user_bulk.ie6 form.mform input,
+#admin-user.ie6 form.mform input {
+ margin-left: 0;
}
-.forumpost .link {
- padding-top: 0.5em;
- text-align:right;
-}
-
-.forumpost .left {
- width: 35px;
- padding: 4px;
- text-align: center;
- vertical-align: top;
-}
-
-.mod-forum .indent {
- margin-left: 30px;
-}
-
-body#user-view .forumpost,
-.course .forumpost {
- width: 100%;
-}
-
-body#mod-forum-search .c0 {
- text-align: right;
-}
-
-body#mod-forum-search .introcontent {
- padding: 15px;
-}
-
-.forumolddiscuss {
- text-align: right;
-}
-
-.forumheaderlist {
- width: 100%;
-}
-
-.forumheaderlist td {
- border-width:1px 0px 0px 1px;
- border-style:solid;
-}
-
-.forumheaderlist .replies {
- text-align: center;
- white-space: nowrap;
-}
-
-.forumheaderlist .picture {
- width: 35px;
-}
-
-.forumheaderlist .discussion .starter {
- vertical-align: middle;
-}
-
-.forumheaderlist .lastpost {
- white-space: nowrap;
- text-align: right;
-}
-
-.forumheaderlist .discussion .author {
- white-space: nowrap;
-}
-.forumolddiscuss {
- text-align:right;
-}
-.forumaddnew,
-.forumnodiscuss,
-.noticeboxcontent {
- text-align:center;
-}
-
-#mod-forum-view .forumaddnew {
- margin-bottom: 20px;
-}
-
-#mod-forum-view .forumcontrol .groupmenu {
- float: left;
- text-align:left;
- white-space: nowrap;
-}
-
-#mod-forum-view .groupmenu {
- float: left;
- text-align:left;
- white-space: nowrap;
-}
-
-#mod-forum-view .forumcontrol .subscription {
- float: right;
- text-align:right;
- white-space: nowrap;
-}
-
-#mod-forum-view .subscription {
- float: right;
- text-align:right;
- white-space: nowrap;
-}
-
-#mod-forum-index .subscription {
- float: right;
- text-align:right;
- white-space: nowrap;
-}
-
-#mod-forum-view .unread {
- padding-left: 3px;
- padding-right: 3px;
-}
-#mod-forum-discuss .forumpost.unread .content {
- border-style: solid;
- border-width: 2px;
-}
-#mod-forum-discuss .ratingsubmit {
- text-align:center;
- padding:10px;
-}
-#mod-forum-index .unread img,
-#mod-forum-view .unread img
-{
- margin-left: 5px;
-}
-
-#mod-forum-discuss .discussioncontrols td {
- width: 33%;
- text-align:center;
-}
-
-#email .unsubscribelink {
- margin-top:20px;
- border-width: 0px 1px 0px 0px;
- border-style: solid;
- text-align:center;
-}
-
-#mod-forum-view .subscription {
- margin: 5px 0;
-}
-
-/***
- *** Modules: Glossary
- ***/
-
-.glossarypost .commands {
- width: 200px;
- white-space: nowrap;
-}
-
-#mod-glossary-comments .glossarypost,
-#mod-glossary-comment .glossarypost {
- margin-top: 15px;
-}
-
-.entryboxheader {
- border-width: 1px 1px 0px 1px;
- border-style: solid;
-}
-
-.entrybox {
- width: 100%;
- border-width: 0px 1px 1px 1px;
- border-style: solid;
-}
-
-.entrybox hr {
- border-left:none;
- border-right:none;
-}
-
-.glossarypost {
- width: 95%;
- border-width:1px;
- border-style:solid;
- border-collapse:separate;
- margin-left:auto;
- margin-right:auto;
- margin-bottom: 5px;
- text-align: left;
-}
-
-.entrylist {
- border-width:0px;
-}
-
-.entrylowersection {
- padding-top: 10px;
-}
-
-.entrylowersection table{
- width: 100%;
-}
-
-.entrylowersection .aliases {
- text-align:center;
-}
-
-.entrylowersection .icons,
-.entrylowersection .ratings {
- text-align:right;
- padding-right: 5px;
-}
-
-.entrylowersection .ratings {
- padding-bottom: 2px;
-}
-
-.glossarycategoryheader {
- width: 95%;
- margin-left:auto;
- margin-right:auto;
-}
-
-.glossaryformatheader {
- width: 90%;
-}
-
-.glossarypost .entry {
- padding: 3px;
-}
-
-.glossarypost .picture {
- width: 35px;
-}
-
-.glossarycomment {
- border-width:1px;
- border-style:solid;
- border-collapse:separate;
- margin-bottom: 5px;
- text-align: left;
-}
-
-.glossarycomment .entry {
- padding: 3px;
-}
-
-.glossarycomment .picture {
- width: 35px;
-}
-
-.glossarycomment .icons {
- text-align: right;
-}
-
-.glossarydisplay {
- width: 90%;
- margin-left:auto;
- margin-right:auto;
- text-align:center;
-}
-
-.glossarydisplay .tabs {
- width: 100%;
-}
-
-.glossarydisplay .separator {
- width: 4px;
-}
-
-.glossarydisplay .tabs .selected,
-.glossarydisplay .tabs .inactive,
-.glossarydisplay .tabs .general {
-}
-
-.glossaryimportexport {
- margin-left:auto;
- margin-right:auto;
- text-align:center;
-}
-
-.glossarypopup {
- width: 95%;
-}
-
-.glossaryapproval {
- width: 100%;
-}
-
-.mod-glossary .glossarydisplay .tabs {
- margin-bottom: 0px;
-}
-
-.mod-glossary .glossarydisplay .tabs .side {
- border-style: none;
- border-width: 0px;
- width: auto;
-}
-
-.glossaryexplain,
-.glossaryaddentry {
- text-align: center;
-}
-
-.mod-glossary .tabrow0 {
- padding-bottom: 5px;
-}
-
-#mod-glossary-view .glossarycontrol {
- float: right;
- text-align:right;
- white-space: nowrap;
- margin: 5px 0;
-}
-
-/***
- *** Modules: Journal
- ***/
-#mod-journal-view .lastedit,
-#mod-journal-view .editend {
- margin: 5px;
- text-align: center;
-}
-#mod-journal-view .feedbackbox {
- width: 75%;
- border-collapse: separate;
-}
-#mod-journal-view .entrycontent {
- padding: 3px;
-}
-#mod-journal-view .picture {
- width: 35px;
-}
-#mod-journal-view .grade {
- text-align: right;
-}
-#mod-journal-view .info {
- margin-bottom: 5px;
- text-align: right;
-}
-
-
-/***
- *** Modules: Label
- ***/
-
-/***
- *** Modules: Lesson
- ***/
-#mod-lesson-lesson #page .addform {
- text-align: center;
-}
-#mod-lesson-edit #page .label {
- font-weight: bold;
-}
-#mod-lesson-edit #page .labelcorrect {
- text-decoration: underline;
- font-weight: bold;
-}
-.lessonmediafilecontrol {
- text-align: center;
- margin-left: auto;
- margin-right: auto;
-}
-
-#mod-lesson-view #content .invisiblefieldset {
- display: block;
- text-align: left;
-}
-
-body.jsenabled .jshidewhenenabled {
- display:none;
-}
-
-/***
- *** Modules: Quiz
- ***/
-
-#mod-quiz-view .quizinfo {
- text-align: center;
-}
-#mod-quiz-view #page .quizgradefeedback,
-#mod-quiz-view #page .quizattempt
-{
- text-align: center;
-}
-#mod-quiz-view #page .quizattemptsummary td p {
- margin-top: 0;
-}
-#mod-quiz-view .generalbox#feedback {
- width:70%;
- margin-left:auto;
- margin-right:auto;
- padding-bottom:15px;
-}
-#mod-quiz-view .generalbox#feedback h2 {
- margin: 0 0;
-}
-#mod-quiz-view .generalbox#feedback .overriddennotice {
- text-align: center;
- font-size: 0.7em;
-}
-#mod-quiz-view .generalbox#feedback h3 {
- text-align: left;
-}
-
-.generalbox#passwordbox { /* Should probably match .generalbox#intro above */
- width:70%;
- margin-left:auto;
- margin-right:auto;
-}
-#passwordform {
- margin: 1em 0;
-}
-#mod-quiz-attempt .submitbtns,
-#mod-quiz-review .submitbtns {
- text-align: left;
- margin-top: 1.5em;
-}
-#mod-quiz-summary .submitbtns {
- margin-top: 1.5em;
-}
-#mod-quiz-summary #content {
- text-align: center;
-}
-#mod-quiz-summary .questionflag {
- width: 16px;
- height: 16px;
- vertical-align: middle;
-}
-#mod-quiz-attempt #quiz-timer,
-#mod-quiz-summary #quiz-timer {
- display: none; /* Revealed by JavaScript if applicable */
-}
-#mod-quiz-summary #quiz-timer {
- margin-top: 1em;
-}
-#mod-quiz-attempt #quiz-time-left {
- font-weight: bold;
-}
-
-body#question-preview .quemodname,
-body#question-preview .controls
-{
- text-align: center;
-}
-body#question-preview .quemodname, body#question-preview .controls {
- text-align: center;
-}
-
-#mod-quiz-attempt #page .controls,
-#mod-quiz-summary #page .controls,
-#mod-quiz-review #page .controls {
- text-align: center;
- margin: 8px auto;
-}
-#mod-quiz-review .pagingbar {
- margin: 1.5em auto;
-}
-#mod-quiz-review .pagingbar {
- margin: 1.5em auto;
-}
-table.quizreviewsummary {
- width: 100%;
-}
-table.quizreviewsummary tr {
-}
-table.quizreviewsummary th.cell {
- padding: 1px 0.5em 1px 1em;
- font-weight: bold;
- text-align: right;
- width: 10em;
-}
-table.quizreviewsummary td.cell {
- padding: 1px 1em 1px 0.5em;
- text-align: left;
-}
-
-#mod-quiz-mod #reviewoptionshdr .fitem,
-#adminquizreviewoptions .group {
- float: left;
- width: 33%;
- clear: none;
-}
-#mod-quiz-mod #reviewoptionshdr .fitem {
- width: 30%;
- margin-left: 10px;
-}
-#mod-quiz-mod #reviewoptionshdr .fitemtitle,
-#adminquizreviewoptions .fitemtitle {
- width: 100%;
- font-weight: bold;
- text-align: left;
- height: 2.5em;
- margin-left: 0;
-}
-#mod-quiz-mod #reviewoptionshdr fieldset.fgroup {
- width: 100%;
- text-align: left;
- margin-left: 0;
-}
-#mod-quiz-mod #reviewoptionshdr fieldset.fgroup span,
-#adminquizreviewoptions span {
- float: left;
- clear: left;
-}
-#adminquizreviewoptions {
- margin-bottom: 0.5em;
-}
-
-.quizquestionlistcontrols {
- text-align: center;
-}
-
-#mod-quiz-report table#attempts,
-#mod-quiz-report div#commands,
-#mod-quiz-report table#itemanalysis
-{
- width: 80%;
- margin: auto;
-}
-#mod-quiz-report table.titlesleft td.c0
-{
- font-weight: bold;
-}
-#mod-quiz-report table#attempts,
-#mod-quiz-report h2.main {
- clear: both;
-}
-#mod-quiz-report table#attempts {
- margin: 20px auto;
-}
-#mod-quiz-report table#attempts .header,
-#mod-quiz-report table#attempts .cell
-{
- padding: 4px;
-}
-#mod-quiz-report table#attempts .header .commands {
- display: inline;
-}
-#mod-quiz-report table#attempts .picture {
- width: 40px;
-}
-#mod-quiz-report table#attempts td {
- border-left-width: 1px;
- border-right-width: 1px;
- border-left-style: solid;
- border-right-style: solid;
- vertical-align: middle;
-}
-#mod-quiz-report table#attempts .header {
- text-align: left;
-}
-#mod-quiz-report table#attempts .picture {
- text-align: center !important;
-}
-#mod-quiz-report .controls {
- text-align: center;
-}
-
-#mod-quiz-report table#itemanalysis {
- margin: 20px auto;
-}
-#mod-quiz-report table#itemanalysis .header,
-#mod-quiz-report table#itemanalysis .cell
-{
- padding: 4px;
-}
-#mod-quiz-report table#itemanalysis .header .commands {
- display: inline;
-}
-#mod-quiz-report table#itemanalysis td {
- border-width: 1px;
- border-style: solid;
-}
-#mod-quiz-report table#itemanalysis .header {
- text-align: left;
-}
-#mod-quiz-report table .numcol {
- text-align: center;
- vertical-align : middle !important;
-}
-
-#mod-quiz-report table#itemanalysis .uncorrect {
- color: red;
-}
-
-#mod-quiz-report table#itemanalysis .correct {
- color: blue;
- font-weight : bold;
-}
-
-#mod-quiz-report table#itemanalysis .partialcorrect {
- color: green !important;
-}
-
-#mod-quiz-report table#itemanalysis .qname {
- color: green !important;
-}
-
-/* manual grading */
-#mod-quiz-grading table#grading
-{
- width: 80%;
- margin: auto;
-}
-
-#mod-quiz-grading table#grading
-{
- margin: 20px auto;
-}
-
-#mod-quiz-grading table#grading .header,
-#mod-quiz-grading table#grading .cell
-{
- padding: 4px;
-}
-
-#mod-quiz-grading table#grading .header .commands
-{
- display: inline;
-}
-
-#mod-quiz-grading table#grading .picture
-{
- width: 40px;
-}
-
-#mod-quiz-grading table#grading td
-{
- border-left-width: 1px;
- border-right-width: 1px;
- border-left-style: solid;
- border-right-style: solid;
- vertical-align: bottom;
-}
-
-.mod-quiz .gradingdetails {
- font-size: small;
-}
-.quizattemptcounts {
- clear : left;
- text-align: center;
- margin: 6px 0;
-}
-#quiznavigation .qnbutton {
- display: block;
- float: left;
- width: 1.5em;
- height: 1.5em;
- overflow: hidden;
- margin: 0.3em 0.3em 0.3em 0;
- padding: 0;
- border: 1px solid #bbb;
- background: #eee no-repeat top right;
- text-align: center;
- vertical-align: middle;
- cursor: pointer;
- white-space: normal;
-}
-#quiznavigation #user-picture {
- margin: 0.5em 0;
-}
-#quiznavigation #user-picture img {
- width: auto;
- height: auto;
- float: left;
-}
-#quiznavigation .othernav {
- clear: both;
-}
-#quiznavigation .othernav a,
-#quiznavigation .othernav input {
- display: block;
- margin: 0.5em 0;
-}
-#quiznojswarning {
- font-size: 0.7em;
- line-height: 1.1;
-}
-.jsenabled #quiznojswarning {
- display: none;
-}
-.mod-quiz div.tabtree a span img.iconsmall {
- vertical-align: baseline;
-}
-#mod-quiz-edit div.sideblock{
- float:right;
- width:30%;
- right:0.3em;
- padding-bottom:0.5em;
- display:block;
-}
-
-#mod-quiz-edit div.quizcontents{
- float:left;
- width:70%;
- display:block;
-}
-
-#mod-quiz-edit div.quizwhenbankcollapsed{
- width:100%;
-}
-
-#mod-quiz-edit div.quizcontents,h2.main{
- clear:left;
-}
-
-#mod-quiz-edit .addpage{
- clear:both;
- padding-top:0.3em;
- float:right;
- margin-right:2em;
-}
-
-#mod-quiz-edit h2.main{
- display:inline;
- padding-right:1em;
-}
-
-#mod-quiz-edit .statusdisplay {
- clear: both;
- margin: 0.3em 1em 0.3em 0;
- padding: 1px ; /* Stop margin collapse. */
-}
-#mod-quiz-edit .statusdisplay p {
- margin: 0.4em;
-}
-
-#mod-quiz-edit div.quizpage{
- display:block;
- clear:both;
- width:100%;
-}
-
-#mod-quiz-edit div.quizpage span.pagetitle{
- margin-top:0.3em;
- float:left;
- display:block;
-}
-
-#mod-quiz-edit div.reorder .reordercontrols .moveselectedonpage{
- clear:right;
- float:right;
- padding:0.5em 0.3em;
-}
-
-#mod-quiz-edit div.reorder .reordercontrols .addnewpagesafterselected,#mod-quiz-edit .repaginatecommand{
- float:right;
- clear:right;
- padding-right:1em;
-}
-
-#mod-quiz-edit div.reorder .reordercontrols .deleteselected{
- float:right;
- margin-right:1em;
-}
-
-#mod-quiz-edit div.reorder .reordercontrols{
- clear:both;
- padding-right:1em;
- margin-top:0.5em;
- padding-top:0.5em;
- padding-bottom:0.5em;
-}
-
-#mod-quiz-edit div.quizpage .pagecontent{
- margin-top:0.3em;
- display:block;
- float:left;
- position:relative;
- margin-left:0.3em;
- margin-bottom:0.2em;
- border-left:solid #777 thin;
- line-height:1.3em;
- -webkit-border-radius:0.6em;
- -webkit-border-radius-bottomleft:0;
- -webkit-border-radius-topleft:0;
- border-radius:0.6em;
- border-radius-bottomleft:0;
- border-radius-topleft:0;
- width:88%;
- padding:0.15em 0 0.3em;
-}
-
-#mod-quiz-edit div.question{
- clear:left;
- width:100%;
-}
-
-#mod-quiz-edit div.question div.qnum{
- display:block;
- float:left;
- width:1.4em;
- padding-right:0.3em;
- padding-left:0;
- z-index:99;
-}
-
-#mod-quiz-edit div.reorder div.question div.qnum{
- width:2.9em;
- padding-top:0.1em;
-}
-/*edit tab*/
-#mod-quiz-edit div.editq div.question div.qnum{
- padding-top:0.2em;
-}
-
-#mod-quiz-edit div.editq div.question{
- padding-top:0.3em;
-}
-
-#mod-quiz-edit div.reorder div.question{
- padding-top:0.2em;
-}
-
-#mod-quiz-edit div.question div.questioncontainer{
- background-color:#ffc;
-}
-
-#mod-quiz-edit div.editq div.question div.content{
- width:87%;
- float:left;
- position:relative;
- -webkit-border-radius:0.6em;
- -webkit-border-radius-bottomleft:0;
- -webkit-border-radius-topleft:0;
- border-radius:0.6em;
- border-radius-bottomleft:0;
- border-radius-topleft:0;
- line-height:1.4em;
- padding:0.5em;
-}
-
-#mod-quiz-edit .reorder div.question div.content{
- width:87%;
- float:left;
- position:relative;
- -webkit-border-radius:0.3em;
- -webkit-border-radius-bottomleft:0;
- -webkit-border-radius-topleft:0;
- border-radius:0.3em;
- border-radius-bottomleft:0;
- border-radius-topleft:0;
- line-height:1.2em;
- padding:0.1em;
-}
-
-#mod-quiz-edit div.question div.content div.points{
- top:0.5em;
- border-left:#FFF solid 0.4em;
- width:8.5em;
- padding:0.2em;
-}
-#mod-quiz-edit div.question div.content div.points input{
- width:2em;
- padding:0;
-}
-#mod-quiz-edit div.question div.content div.points input.pointssubmitbutton{
- width:auto;
-}
-
-#mod-quiz-edit .questionbankwindow select#catmenu_jump{
- /* In Opera9, IE6 the width of the
- select obeys the width of its content
- by default. This prevents that. */
- width:100%;
-}
-
-#mod-quiz-edit .collapsed .container{
- display: none;
-}
-
-#mod-quiz-edit .collapsed .container{
- display: none;
-}
-#mod-quiz-edit .questionbankwindow #showbankcmd{
- display:none;
-}
-#mod-quiz-edit .collapsed #showbankcmd{
- display:inline;
-}
-#mod-quiz-edit .questionbankwindow #hidebankcmd{
- display:inline;
-}
-#mod-quiz-edit .collapsed #hidebankcmd{
- display:none;
-}
-
-#mod-quiz-edit .questionbankwindow div.header{
- padding-top:0.2em;
-}
-
-#randomquestiondialog_c select{
- width:100%;
-}
-
-
-#mod-quiz-edit div.question div.content div.points,
-#mod-quiz-edit div.question div.content div.qorder{
- line-height:1em;
- max-width:30%;
- position:absolute;
- right:50px;
- -webkit-border-radius:0.2em;
- -webkit-border-radius-bottomleft:0;
- -webkit-border-radius-topleft:0;
- border-radius:0.2em;
- border-radius-bottomleft:0;
- border-radius-topleft:0;
- z-index:900;
- display:block;
- margin:0;
-}
-
-
-#mod-quiz-edit div.question div.content .editicon{
- width:15px;
-}
-
-#mod-quiz-edit .editq div.questioncontentcontainer div.singlequestion img{
- float:left;
- padding-top:0.3em;
- padding-right:0.3em;
-}
-
-#categoryquestions .header {
- text-align: center;
- padding: 0 2px;
-}
-
-#categoryquestions th.modifiername .sorters,
-#categoryquestions th.creatorname .sorters {
- font-weight: normal;
- font-size: 0.8em;
-}
-
-#mod-quiz-edit div.question div.content .questionname,
-#categoryquestions .questionname{
- white-space:nowrap;
- overflow:hidden;
- zoom:1;
- position:relative;
- max-width:20%;
-}
-#mod-quiz-edit div.question div.content .singlequestion .questionname,
-#mod-quiz-edit div.question div.content .singlequestion .questiontext{
- display:inline-block;
-}
-
-#mod-quiz-edit div.editq div.question div.content .singlequestion a .questionname,
-#mod-quiz-edit div.editq div.question div.content .singlequestion a .questiontext{
- float:left;
-}
-
-#mod-quiz-edit .quizquestionlistcontrols{
- display:inline;
-}
-
-#mod-quiz-edit div.question div.content .questiontext,
-#categoryquestions .questiontext{
- -o-text-overflow:ellipsis;
- text-overflow:ellipsis;
- position:relative;
- zoom:1;
- padding-left:0.3em;
- max-width:40%;
- overflow:hidden;
- white-space:nowrap;
- text-overflow:ellipsis;
-}
-#mod-quiz-edit div.editq div.question div.description div.content .questiontext {
- max-width: 75%;
-}
-
-#mod-quiz-edit div.quizpage .pagecontent .pagestatus{
- -webkit-border-radius-bottomright:0.3em;
- -webkit-border-radius-topright:0.3em;
- border-radius-bottomright:0.3em;
- border-radius-topright:0.3em;
- margin:0.3em;
- padding:0.1em 0.1em 0.1em 0.3em;
-}
-
-#mod-quiz-edit div.question div.content .questiontype{
- display:block;
- clear:left;
- float:left;
-}
-
-#mod-quiz-edit div.question div.content .questionpreview{
- display:block;
- float:left;
- margin-left:0.3em;
- padding-left:0.2em;
- padding-right:0.2em;
-}
-
-#mod-quiz-edit div.question div.content div.quiz_randomquestion .questionpreview{
- display:inline;
- float:none;
-}
-
-#mod-quiz-edit div.question div.content div.questioncontrols{
- float:right;
- width:45px;
- position:absolute;
- right:0.3em;
- top:0;
- z-index:900;
- display:block;
- padding:0.2em;
-}
-
-#mod-quiz-edit div.question div.content div.questioncontrols img.upwithoutdown{
- padding-right:12px;
- display:inline;
-}
-
-#mod-quiz-edit .quizpagedelete{
- position:absolute;
- top:0.2em;
- right:0.2em;
- display:inline;
- z-index:900;
-}
-
-#mod-quiz-edit .quizpagedelete img {
- background-color:#d6d6d6;
- padding:0.6em;
-}
-
-#mod-quiz-edit .pagecontrols {
- clear:both;
- margin-left:0.5em;
- padding-top:0.5em;
-}
-
-#mod-quiz-edit .pagecontrols .singlebutton {
- float:left;
- margin-left: 1em;
-}
-#mod-quiz-edit .pagecontrols .helplink {
- float:left;
-}
-
-#mod-quiz-edit div.quizpage .pagecontent form.randomquestionform div{
- /* it is a mystery why this has to be inline-table but
- otherwise the layout gets screwed, even if
- it is "inline" */
- display: inline-table;
-}
-
-#mod-quiz-edit div.quizpage .pagecontent form.randomquestionform div input{
- display: inline;
-}
-
-/* a CSS class YUI container creates on the fly: */
-#mod-quiz-edit div#randomquestiondialog_c{
- width:90%;
-}
-
-
-#mod-quiz-edit div#randomquestiondialog_c .mform,
-#mod-quiz-edit div#repaginatedialog .mform{
- margin-left:auto;
- margin-right:auto;
-}
-
-#mod-quiz-edit div.container div.generalbox{
- position:relative;
- display:block;
- border:0 none;
- margin:0;
- padding:0;
-}
-
-#mod-quiz-edit .questioncontentcontainer div.randomquestionqlist{
- padding-left:0.2em;
- padding-right:0.2em;
- clear:both;
- margin:0.5em;
- margin-top:0.8em;
-}
-#mod-quiz-edit .questioncontentcontainer div.randomquestionqlist .totalquestionsinrandomqcategory{
- overflow:auto;
- white-space:normal;
-}
-
-
-#mod-quiz-edit .questioncontentcontainer div.randomquestionqlist ul{
- list-style-type:none;
- margin:0;
- padding:0;
-}
-#mod-quiz-edit .reorder .questioncontentcontainer .quiz_randomquestion{
-
- position:relative;
-}
-
-#mod-quiz-edit .reorder div.question div.content div.quiz_randomquestion{
- line-height:1em;
-}
-
-#mod-quiz-edit .reorder .questioncontentcontainer .randomquestioncategory label{
- max-width: 25%;
- overflow:hidden;
- padding-left:0.3em;
- white-space:nowrap;
- display:inline-block;
-}
-#mod-quiz-edit .reorder .questioncontentcontainer .randomquestionfromcategory label{
- overflow:hidden;
- white-space:nowrap;
- display:inline-block;
-}
-
-#mod-quiz-edit .editq div.question div.content .randomquestioncategory{
- margin-top:0.4em;
- position:relative;
- display:inline-block;
-
-}
-
-#mod-quiz-edit .editq div.question div.content .randomquestioncategory a{
- display:block;
- max-width:15em;
- overflow: hidden;
- text-overflow:ellipsis;
- -o-text-overflow:ellipsis;
- white-space: nowrap;
- float:left;
- position:relative;
-}
-#mod-quiz-edit .editq div.question div.content .questionpreview{
- float:left;
-}
-#mod-quiz-edit .editq div.question div.content .questionpreview a{
- font-weight:normal;
- margin-left:0em;
- display:inline;
- float:none;
-}
-#mod-quiz-edit .editq div.question div.content .randomquestioncategory .questionpreview img{
- padding-right:0.3em;
-}
-
-#mod-quiz-edit .questioncontentcontainer div.randomquestionqlist ul li img{
- padding-right:0.3em;
-}
-
-
-#mod-quiz-edit .reorder .questioncontentcontainer .randomquestioncategory,
-#mod-quiz-edit .reorder .questioncontentcontainer .randomquestionfromcategory,
-#mod-quiz-edit .reorder div.question div.content .questionpreview{
- display:inline;
- float:none;
-}
-
-#mod-quiz-edit .reorder .questioncontentcontainer{
- position:relative;
- overflow:hidden;
- white-space:nowrap;
-}
-
-#mod-quiz-edit .reorder .questioncontentcontainer .randomquestioncategory{
- overflow:hidden;
- white-space:nowrap;
-}
-
-#mod-quiz-edit .reorder fieldset{
- display:inline;
-}
-
-#mod-quiz-edit .questioncontentcontainer div.randomquestionqlist ul li{
- clear:left;
- width:100%;
- overflow:hidden;
- white-space:nowrap;
-}
-
-#mod-quiz-edit .questioncontentcontainer div.randomquestionqlist ul li span{
- display:inline;
-}
-
-/*start question bank*/
-.questionbankwindow .choosecategory,
-.questionbankwindow .createnewquestion {
- padding: 0.3em;
-}
-.questionbankwindow .createnewquestion .singlebutton {
- display: inline;
-}
-.questionbankwindow #catmenu_jump {
- display: block;
-}
-#mod-quiz-edit .questionbankwindow .createnewquestion select,
-#mod-quiz-edit .questionbankwindow #catmenu select,
-#mod-quiz-edit .questionbankwindow #menucategory {
- width: 100%;
-}
-table#categoryquestions {
- width: 100%;
- overflow: hidden;
- table-layout: fixed;
-}
-
-table#categoryquestions td,#mod-quiz-edit table#categoryquestions th{
- overflow:hidden;
- white-space:nowrap;
-}
-
-#categoryquestions .iconcol {
- width: 15px;
- text-align: center;
- padding: 0;
-}
-
-#categoryquestions .checkbox {
- width: 19px;
- text-align: center;
- padding: 0;
-}
-
-#categoryquestions .qtype {
- text-align: center;
-}
-
-#categoryquestions .qtype {
- width: 24px;
- padding: 0;
-}
-
-#categoryquestions .questiontext p {
- margin: 0;
-}
-.categoryinfo {
- padding: 0.3em;
-}
-
-#mod-quiz-edit .paging{
- margin-top:0;
- margin-bottom:0;
- display:block;
-}
-
-#mod-quiz-edit .pagingbottom{
- padding-bottom:0.3em;
-}
-
-#mod-quiz-edit div.questionbank form .invisiblefieldset{
- clear:both;
-}
-
-#mod-quiz-edit .sideblock .content{
- padding:0;
-}
-
-#mod-quiz-edit .questionbank .categorysortopotionscontainer{
- padding-top:0.5em;
- margin-top:0.3em;
-}
-
-.questionbank div.categoryquestionscontainer,
-.questionbank .categorysortopotionscontainer,
-.questionbank .categorypagingbarcontainer,
-.questionbank .categoryselectallcontainer{
- padding-left:0.3em;
- padding-right:0.3em;
-}
-
-.noquestionsincategory{
- clear:both;
- padding-top:1em;
- padding-bottom:1em;
-}
-
-.modulespecificbuttonscontainer{
- padding-left:0.3em;
- padding-right:0.3em;
-}
-
-#mod-quiz-edit div#footer{
- clear:both;
- padding-top:1em;
-}
-
-
-/* these will toggle if js is enabled */
-body #quizcontentsblock #repaginatedialog{
- display: none;
-}
-body.jsenabled #quizcontentsblock #repaginatedialog{
- display: block;
-}
-body.jsenabled #quizcontentsblock #repaginatedialog .hd{
- display:block;
-}
-body.jsenabled #quizcontentsblock #repaginatedialog .bd{
- padding:1em;
-}
-body.jsenabled #quizcontentsblock .repaginatecommand #repaginatecommand{
- display:block;
-}
-
-/***
- *** Modules: Resource
- ***/
-
-#mod-resource-view .resourcecontent {
- text-align:center;
- margin:20px;
-}
-
-#mod-resource-view .resourcepdf {
- width: 100%;
- padding-top: 15px;
- text-align: center
-}
-
-.resourcecontent object {
- height:480px;
- width:600px;
-}
-
-.resourcepdf object{
- height: 800px;
- width: 800px;
-}
-
-.mod-resource .modified {
- text-align:center;
-}
-
-.mod-resource .popupnotice {
- text-align:center;
- margin:40px;
-}
-
-#mod-resource-view div#footer {
- margin-top: 5px;
-}
-
-/***
- *** Modules: Scorm
- ***/
-
-/***
- *** Modules: Survey
- ***/
-.resultgraph {
- text-align:center;
- border:1px solid;
+.ie6 form.mform textarea {
+ margin-left: -10px;
}
-.reportsummary,
-.studentreport,
-.reportbuttons {
- text-align:center;
+.ie6 .que .info {
+ display: inline;
}
-.centerpara {
- text-align:center;
+.ie6 #adminsettings .form-setting,
+.ie6 #adminsettings .form-description {
+ display:inline-block; padding-left:2px;
}
-.fullnamecell {
- width:10%;
- vertical-align:top;
- white-space: nowrap;
+.ie6.course-view li.activity {
+ height:0;
}
-
-.questiontext {
- font-size:1em;
+#mod-quiz-edit.ie6 div.question div.content .questiontext,
+#mod-quiz-edit.ie6 #categoryquestions .questionname{
+ /*ie6 shows this as an arrow if this is not specified*/
+ cursor: pointer;
}
-
-.smalltext {
- font-size: 0.75em;
+#mod-quiz-edit.ie6 div.question div.content .questionname,
+#mod-quiz-edit.ie6 #categoryquestions .questiontext{
+ /*ie6 shows this as an arrow if this is not specified*/
+ cursor: pointer;
}
-
-#surveyform th {
- font-weight: normal;
- text-align: left;
+.mod-quiz.ie6 div.tabtree a span img.iconsmall {
+ margin: 0;
+ vertical-align: baseline;
+ position: relative;
+ top: 1px;
}
-#surveyform th.hresponse {
- text-align: center;
- width: 9%;
+#mod-quiz-edit.ie6 div.question div.content .questiontext,#categoryquestions .questiontext{
+ width:50%;
}
-
-.rblock label {
- display: block;
- text-align: center;
+#mod-quiz-edit.ie6 div.question div.content .questionname,#categoryquestions .questionname{
+ width:20%;
}
-
-.foundthat,
-.preferthat {
- white-space: nowrap;
+#mod-quiz-edit.ie6 .editq div.question div.content .randomquestioncategory a{
+ width:40%;
}
-
-.qnummiddlecell {
- vertical-align:middle;
+#mod-quiz-edit.ie6 .reorder .questioncontentcontainer .randomquestioncategory label{
+ width: 35%;
}
-.optioncell {
- width: 50%;
- vertical-align: top;
+.ie6 #help_icon_tooltip .yui-tt-shadow-visible {
+ background-color: transparent;
}
-.buttoncell {
- width:5%;
-}
+/*********** IE7 HACKS ***********/
-.questioncell {
- width:50%;
- vertical-align:top;
+.ie7 .tabrow0 li {
+ margin-left: 0;
}
-.whitecell {
- background-color:white;
-}
-/***
- *** Modules: Wiki
- ***/
-.sideblockheading,
-.howtowiki {
- text-align:right;
+.ie7 .tabrow0 li.first {
+ margin-right: -4px;
}
-.wikisearchform,
-.wikilinksblock,
-wikiadminactions {
- text-align:center;
+.ie7 .tabrow0 li.onerow {
+ margin-right: 0;
}
-.wikilinkright{
- text-align:right;
- padding-bottom: 0.5em;
+.ie7 .tabrow0 a {
+ display: inline-block;
+ padding: 8px 0 0.35em 13px;
+ line-height: 1.5em;
}
-.wikiexportbox{
- margin-left:auto;
- margin-right:auto;
-}
-/***
- *** Modules: Workshop
- ***/
-.redfont {
- color: red;
+.ie7 .tabrow0 a span {
+ padding: 10px 1em 10px 0;
}
-.workshopuploadform,
-.workshopkey {
- text-align:center;
+.ie7 .tabrow0 div,
+.tabrow0 ul {
+ top: 2.6em;
+ padding: 0.2em 0;
}
-
-/***
- *** Help files (/lang/-/help)
- ***/
-#help hr {
- border: none;
- height: 1px;
- background: #ccc;
-}
-#help .example1 {
- color: #a00;
-}
-#help .success {
- color: #080;
-}
-#help .center {
- text-align: center;
-}
-#help .moreinfo {
- text-align: right;
-}
-/* Equivalent to 1 and 5 nested blockquotes respectively. */
-#help .indent {
- margin-left: 40px;
-}
-#help .indent-big {
- margin-left: 160px;
- margin-right:160px;
-}
-#help pre, #help code {
- background: #eee;
- border: 1px dashed #ddd;
- padding: 3px;
-}
-#help #emoticons{
- text-align: center;clear:both;width: 300px;margin-right: auto; margin-left:auto;
-}
-#help #emoticons ul{
- list-style-type: none;
-}
-#help #emoticons li{
- margin-bottom: 3px;
- width: 120px;
- border-left: 3px solid gray;
- padding-left: 7px;
- float: left;
-}
-/**
- * comments 2.0
- *
- */
-.comment-ctrl {
- font-size: 12px;
- display: none;
- margin:0 auto;
- padding:0;
-}
-.comment-ctrl h5 {
- margin:0;
- padding: 5px;
+.ie7 .tabrow0 div.empty {
+ margin-right: 0;
}
-.comment-area {
- padding: 5px;
-}
-.comment-area .bd {
-}
-.comment-area textarea {
- width:100%;
- border: 1px solid grey;
- overflow:auto;
+.ie7 .sideblock {
+ overflow: hidden;
}
-.comment-area .fd {
- text-align:right;
-}
-.comment-meta span {
- color:grey;
+.ie7 .sideblock .content {
+ word-wrap: break-word;
}
-.comment-list {
- /*height: 150px;*/
- font-size: 11px;
- overflow:auto;
- list-style:none;
- padding:0;
- margin:0;
-}
-.comment-list li {
- margin: 2px;
- margin-bottom:5px;
- clear:both;
+/*fix for misalignment of text fields in ie */
+.ie7 form.mform input[type=text],
+.ie7 form.mform input[type=file],
+.ie7 form.mform input[type=password] {
+ margin-left: -10px;
}
-.comment-paging{
- /*background: #d8d8da;*/
- text-align:center;
-}
-.comment-paging .pageno{
- padding: 2px;
-}
-.comment-userpicture {
- width: 20px;
- float:left;
-}
-.comment-content{
- margin-left: 22px;
-}
-.comment-content div{
- margin:0;
- padding:0;
-}
-.comment-content p{
- width: 90%;
- white-space: pre-wrap; /* css-3 */
- white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
- white-space: -pre-wrap; /* Opera 4-6 */
- white-space: -o-pre-wrap; /* Opera 7 */
- word-wrap: break-word; /* Internet Explorer 5.5+ */
- padding:0;
- margin:0 18px 0 0;
-}
-.comment-delete{
- float:right;
- text-align:right;
-}
-.comment-container {
- float:left;
- width: 305px;
- margin: 4px;
+.ie7 form.mform textarea {
+ margin-left: -10px;
}
-/* CSS for shadows */
-.divshadow div {
- position:absolute;
- width:10px;
- height:10px;
- background-image:url(shadow_corners.png);
- background-repeat:no-repeat;
+.ie7 form.mform .fcheckbox input {
+ margin-left: -3px;
}
-.divshadow .shadow_top {
- top:-10px;
- right:0px;
- width:100%;
- background-image:url(shadow_top_bottom.png);
- background-position:0px 0px;
- background-repeat:repeat-x;
-}
-.divshadow .shadow_bottom {
- bottom:-10px;
- right:0px;
- width:100%;
- background-image:url(shadow_top_bottom.png);
- background-position:0px 100%;
- background-repeat:repeat-x;
-}
-.divshadow .shadow_left {
- top:0px;
- left:-10px;
- height:100%;
- background-image:url(shadow_left_right.png);
- background-position:0px 0px;
- background-repeat:repeat-y;
-}
-.divshadow .shadow_right {
- bottom:0px;
- right:-10px;
- height:100%;
- background-image:url(shadow_left_right.png);
- background-position:100% 0px;
- background-repeat:repeat-y;
-}
-.divshadow .shadow_top_right {
- top:-10px;
- right:-10px;
- background-position:100% 0px;
-}
-.divshadow .shadow_bottom_right {
- bottom:-10px;
- right:-10px;
- background-position:100% 100%;
-}
-.divshadow .shadow_top_left {
- top:-10px;
- left:-10px;
- background-position:0px 0px;
-}
-.divshadow .shadow_bottom_left {
- bottom:-10px;
- left:-10px;
- background-position:0px 100%;
-}
-.filemanager-toolbar{
- margin: 5px 0;
-}
-.filemanager-toolbar a:link, .filemanager-toolbar a:visited {
- border: 1px solid grey;
- background: #ccc;
- color: black;
- padding: 3px;
-}
-.filemanager-toolbar a:hover {
- background: white;
- text-decoration: none;
-}
-.fm-breadcrumb {
- margin:0;
-}
-.filemanager-container {
- padding: 5px;
- margin: 6px 0;
-}
-.filemanager-container ul{
- margin:0;
- padding:0;
- list-style-type:none;
-}
-.filemanager-container li{
- clear:both;
-}
-#fm-move-div {
- margin: 6px;
-}
-#fm-move-div strong{
- color:red;
-}
-.fm-file-menu {
- width: 18px;
- height: 18px;
- float: left;
-}
-.fm-file-menu img {
- width: 16px;
-}
-.fm-file-name {
- float:left;
-}
-.fm-file-entry{
- border: 1px solid red;
-}
-.fm-operation {
- font-weight: bold;
+.ie7.mod-quiz div.tabtree a span img.iconsmall {
+ margin: 0;
+ vertical-align: baseline;
+ position: relative;
+ top: 2px;
}
--- /dev/null
+
+.mceContentBody {
+ background-color:#FAFAFA;
+ color:#000;
+}
+++ /dev/null
-<?php
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle 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 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle 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.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
-/**
- * Serve the CSS for this theme. Every theme must contain a copy of this file
- * DO NOT MODIFY THIS FILE IT IS IMPORTANT TO THE WORKING OF THE MOODLE THEMES SYSTEM.
- * If you are are trying to change something, you should probably be looking at config.php.
- *
- * @package moodlecore
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-$themename = basename(dirname(__FILE__));
-require_once(dirname(__FILE__) . '/../../theme/styles.php');
\ No newline at end of file
+++ /dev/null
-/*
- * These styles are ONLY included for IE 6 (via meta.php)
- */
-
-.tabtree {
- height: 100%;
-}
-
-.tabrow0 {
- padding-top: 10px;
-}
-
-.tabrow0 li {
- margin-left: 0;
-}
-
-.tabrow0 li.first {
- margin-left: -4px;
- margin-right: -4px;
-}
-
-.tabrow0 li.last a {
- margin-right: 0;
-}
-
-.tabrow0 li.onerow {
- margin-right: 0;
-}
-
-.tabrow0 a {
- padding: 0 0 0 13px;
-}
-
-.tabrow0 a span {
- padding: 12px 1em 4px 0;
-}
-
-.tabrow0 div,
-.tabrow0 ul {
- top: 3.5em;
- padding: 0.2em 0;
-}
-
-form.mform input {
- margin-left: expression((this.type=="text"||this.type=="file"||this.type=="password")?'-10px':'0');
-}
-
-#admin-user-user_bulk form.mform input,
-#admin-user form.mform input {
- margin-left: 0;
-}
-
-form.mform textarea {
- margin-left: -10px;
-}
-
-.que .info {
- display: inline;
-}
-
-#adminsettings .form-setting,
-#adminsettings .form-description {
- display:inline-block; padding-left:2px;
-}
-
-.course-view li.activity {
- height:0;
-}
-#mod-quiz-edit div.question div.content .questiontext,
-#mod-quiz-edit #categoryquestions .questionname{
- /*ie6 shows this as an arrow if this is not specified*/
- cursor: pointer;
-}
-#mod-quiz-edit div.question div.content .questionname,
-#mod-quiz-edit #categoryquestions .questiontext{
- /*ie6 shows this as an arrow if this is not specified*/
- cursor: pointer;
-}
-.mod-quiz div.tabtree a span img.iconsmall {
- margin: 0;
- vertical-align: baseline;
- position: relative;
- top: 1px;
-}
-#mod-quiz-edit div.question div.content .questiontext,#categoryquestions .questiontext{
- width:50%;
-}
-#mod-quiz-edit div.question div.content .questionname,#categoryquestions .questionname{
- width:20%;
-}
-#mod-quiz-edit .editq div.question div.content .randomquestioncategory a{
- width:40%;
-}
-#mod-quiz-edit .reorder .questioncontentcontainer .randomquestioncategory label{
- width: 35%;
-}
-#help_icon_tooltip .yui-tt-shadow-visible {
- background-color: transparent;
-}
-.drag select {
- visibility: visible;
-}
+++ /dev/null
-/*
- * These styles are ONLY included for IE 7 (via meta.php)
- */
-
-.tabrow0 li {
- margin-left: 0;
-}
-
-.tabrow0 li.first {
- margin-right: -4px;
-}
-
-.tabrow0 li.onerow {
- margin-right: 0;
-}
-
-.tabrow0 a {
- display: inline-block;
- padding: 8px 0 0.35em 13px;
- line-height: 1.5em;
-}
-
-.tabrow0 a span {
- padding: 10px 1em 10px 0;
-}
-
-.tabrow0 div,
-.tabrow0 ul {
- top: 2.6em;
- padding: 0.2em 0;
-}
-
-.tabrow0 div.empty {
- margin-right: 0;
-}
-
-.sideblock {
- overflow: hidden;
-}
-
-.sideblock .content {
- word-wrap: break-word;
-}
-
-/*fix for misalignment of text fields in ie */
-form.mform input[type=text],
-form.mform input[type=file],
-form.mform input[type=password] {
- margin-left: -10px;
-}
-
-form.mform textarea {
- margin-left: -10px;
-}
-
-form.mform .fcheckbox input {
- margin-left: -3px;
-}
-.mod-quiz div.tabtree a span img.iconsmall {
- margin: 0;
- vertical-align: baseline;
- position: relative;
- top: 2px;
-}
+++ /dev/null
-<?php
-
-////////////////////////////////////////////////////////////////////////////////
-/// This file contains a few configuration variables that control
-/// how Moodle uses this theme.
-////////////////////////////////////////////////////////////////////////////////
-
-
-$THEME->sheets = array('gradients');
-
-/// This variable is an array containing the names of all the
-/// stylesheet files you want included in this theme, and in what order
-////////////////////////////////////////////////////////////////////////////////
-
-
-$THEME->standardsheets = array('styles_layout','styles_fonts','styles_color','styles_moz');
-
-/// This variable can be set to an array containing
-/// filenames from the *STANDARD* theme. If the
-/// array exists, it will be used to choose the
-/// files to include in the standard style sheet.
-/// When false, then no files are used.
-/// When true or NON-EXISTENT, then ALL standard files are used.
-/// This parameter can be used, for example, to prevent
-/// having to override too many classes.
-/// Note that the trailing .css should not be included
-/// eg $THEME->standardsheets = array('styles_layout','styles_fonts','styles_color');
-////////////////////////////////////////////////////////////////////////////////
-
-
-$THEME->parent = '';
-
-/// This variable can be set to the name of a parent theme
-/// which you want to have included before the current theme.
-/// This can make it easy to make modifications to another
-/// theme without having to actually change the files
-/// If this variable is empty or false then a parent theme
-/// is not used.
-////////////////////////////////////////////////////////////////////////////////
-
-
-$THEME->parentsheets = false;
-
-/// This variable can be set to an array containing
-/// filenames from a chosen *PARENT* theme. If the
-/// array exists, it will be used to choose the
-/// files to include in the standard style sheet.
-/// When false, then no files are used.
-/// When true or NON-EXISTENT, then ALL standard files are used.
-/// This parameter can be used, for example, to prevent
-/// having to override too many classes.
-/// Note that the trailing .css should not be included
-/// eg $THEME->parentsheets = array('styles_layout','styles_fonts','styles_color');
-////////////////////////////////////////////////////////////////////////////////
-
-
-$THEME->pluginsheets = array('mod', 'block', 'format', 'gradereport');
-
-/// Which types of plugins should be searched for a styles.php file. This
-/// Allows plugins to include enough styling information to work out of the box.
-
-
-$THEME->navmenuwidth = 50;
-
-/// You can use this to control the cutoff point for strings
-/// in the navmenus (list of activities in popup menu etc)
-/// Default is 50 characters wide.
-
-
-$THEME->makenavmenulist = false;
-
-/// By setting this to true, then you will have access to a
-/// new variable in your header.html and footer.html called
-/// $navmenulist ... this contains a simple XHTML menu of
-/// all activities in the current course, mostly useful for
-/// creating popup navigation menus and so on.
-
-
-$THEME->resource_mp3player_colors =
- 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.
- 'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.
- 'font=Arial&fontColour=3333FF&buffer=10&waitForPlay=no&autoPlay=yes';
-
-/// With this you can control the colours of the "big" MP3 player
-/// that is used for MP3 resources.
-
-
-$THEME->filter_mediaplugin_colors =
- 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.
- 'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.
- 'waitForPlay=yes';
-
-/// ...And this controls the small embedded player
-
-
-$THEME->custompix = false;
-
-/// If true, then this theme must have a "pix"
-/// subdirectory that contains copies of all
-/// files from the moodle/pix directory, plus a
-/// "pix/mod" directory containing all the icons
-/// for all the activity modules.
-////////////////////////////////////////////////////////////////////////////////
-
-
+++ /dev/null
-<?php
-
- echo $OUTPUT->container_end(); // content container
-
- echo $OUTPUT->container_start('footer');
- echo '<hr />';
-
- echo '<p class="helplink">';
- echo page_doc_link(get_string('moodledocslink'));
- echo '</p>';
-
- echo $loggedinas;
- echo $homelink;
-
- echo $OUTPUT->container_end();
-?>
-</div>
-</body>
-</html>
+++ /dev/null
-/**
- * Adds all the nice finish to the standard theme
- *
- */
-
-th.header,
-td.header,
-div.header {
- background-image:url(gradient.jpg);
- background-position:top;
- background-repeat:repeat-x;
-}
-
-.navbar {
- background-image:url(gradient.jpg);
- background-position:top;
- background-repeat:repeat-x;
-}
-
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html<?php echo $direction ?>>
-<head>
- <?php echo $meta ?>
- <meta name="keywords" content="moodle, <?php echo $title ?> " />
- <title><?php echo $title ?></title>
- <link rel="shortcut icon" href="<?php echo $CFG->themewww .'/'. current_theme() ?>/favicon.ico" />
- <?php include("$CFG->javascript"); ?>
-</head>
-
-<body<?php
- echo " $bodytags";
- if ($focus) {
- echo " onload=\"setfocus()\"";
- }
- ?>>
-
-<div id="page">
-
-<?php //Accessibility: 'headermain' is now H1, see theme/standard/styles_layout.css: .headermain
- if ($home) { // This is what gets printed on the home page only
-?>
- <?php echo $OUTPUT->container_start('clearfix header-home'); ?>
- <h1 class="headermain"><?php echo $heading ?></h1>
- <div class="headermenu"><?php echo $menu ?></div>
- <?php echo $OUTPUT->container_end(); ?>
-<?php } else if ($heading) { // This is what gets printed on any other page with a heading
-?>
- <?php echo $OUTPUT->container_start('clearfix header'); ?>
- <h1 class="headermain"><?php echo $heading ?></h1>
- <div class="headermenu"><?php echo $menu ?></div>
- <?php echo $OUTPUT->container_end(); ?>
-<?php } ?>
-<?php //Accessibility: breadcrumb trail/navbar now a DIV, not a table.
- if ($navigation) { // This is the navigation bar with breadcrumbs ?>
- <div class="navbar clearfix">
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
- <div class="navbutton"><?php echo $button; ?></div>
- </div>
-<?php } else if ($heading) { // If no navigation, but a heading, then print a line
-?>
- <hr />
-<?php } ?>
- <!-- END OF HEADER -->
- <?php echo $OUTPUT->container_start('content'); ?>
+++ /dev/null
-<?php
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle 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 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle 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.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
-/**
- * Serve the CSS for this theme. Every theme must contain a copy of this file
- * DO NOT MODIFY THIS FILE IT IS IMPORTANT TO THE WORKING OF THE MOODLE THEMES SYSTEM.
- * If you are are trying to change something, you should probably be looking at config.php.
- *
- * @package moodlecore
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-$themename = basename(dirname(__FILE__));
-require_once(dirname(__FILE__) . '/../../theme/styles.php');
\ No newline at end of file
+++ /dev/null
-<?php
-
-////////////////////////////////////////////////////////////////////////////////
-/// This file contains a few configuration variables that control
-/// how Moodle uses this theme.
-////////////////////////////////////////////////////////////////////////////////
-
-
-$THEME->sheets = array('gradients');
-
-/// This variable is an array containing the names of all the
-/// stylesheet files you want included in this theme, and in what order
-////////////////////////////////////////////////////////////////////////////////
-
-
-$THEME->standardsheets = array('styles_layout','styles_fonts','styles_color','styles_moz');
-
-/// This variable can be set to an array containing
-/// filenames from the *STANDARD* theme. If the
-/// array exists, it will be used to choose the
-/// files to include in the standard style sheet.
-/// When false, then no files are used.
-/// When true or NON-EXISTENT, then ALL standard files are used.
-/// This parameter can be used, for example, to prevent
-/// having to override too many classes.
-/// Note that the trailing .css should not be included
-/// eg $THEME->standardsheets = array('styles_layout','styles_fonts','styles_color');
-////////////////////////////////////////////////////////////////////////////////
-
-
-$THEME->parent = '';
-
-/// This variable can be set to the name of a parent theme
-/// which you want to have included before the current theme.
-/// This can make it easy to make modifications to another
-/// theme without having to actually change the files
-/// If this variable is empty or false then a parent theme
-/// is not used.
-////////////////////////////////////////////////////////////////////////////////
-
-
-$THEME->parentsheets = false;
-
-/// This variable can be set to an array containing
-/// filenames from a chosen *PARENT* theme. If the
-/// array exists, it will be used to choose the
-/// files to include in the standard style sheet.
-/// When false, then no files are used.
-/// When true or NON-EXISTENT, then ALL standard files are used.
-/// This parameter can be used, for example, to prevent
-/// having to override too many classes.
-/// Note that the trailing .css should not be included
-/// eg $THEME->parentsheets = array('styles_layout','styles_fonts','styles_color');
-////////////////////////////////////////////////////////////////////////////////
-
-
-$THEME->pluginsheets = array('mod', 'block', 'format', 'gradereport');
-
-/// Which types of plugins should be searched for a styles.php file. This
-/// Allows plugins to include enough styling information to work out of the box.
-
-
-$THEME->navmenuwidth = 50;
-
-/// You can use this to control the cutoff point for strings
-/// in the navmenus (list of activities in popup menu etc)
-/// Default is 50 characters wide.
-
-
-$THEME->makenavmenulist = false;
-
-/// By setting this to true, then you will have access to a
-/// new variable in your header.html and footer.html called
-/// $navmenulist ... this contains a simple XHTML menu of
-/// all activities in the current course, mostly useful for
-/// creating popup navigation menus and so on.
-
-
-$THEME->resource_mp3player_colors =
- 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.
- 'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.
- 'font=Arial&fontColour=3333FF&buffer=10&waitForPlay=no&autoPlay=yes';
-
-/// With this you can control the colours of the "big" MP3 player
-/// that is used for MP3 resources.
-
-
-$THEME->filter_mediaplugin_colors =
- 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.
- 'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.
- 'waitForPlay=yes';
-
-/// ...And this controls the small embedded player
-
-
-$THEME->custompix = false;
-
-/// If true, then this theme must have a "pix"
-/// subdirectory that contains copies of all
-/// files from the moodle/pix directory, plus a
-/// "pix/mod" directory containing all the icons
-/// for all the activity modules.
-////////////////////////////////////////////////////////////////////////////////
-
-
+++ /dev/null
-<?php
-
- echo $OUTPUT->container_end(); // content container
-
- echo $OUTPUT->container_start('footer');
- echo '<hr />';
-
- echo '<p class="helplink">';
- echo page_doc_link(get_string('moodledocslink'));
- echo '</p>';
-
- echo $loggedinas;
- echo $homelink;
-
- echo $OUTPUT->container_end();
-?>
-</div>
-</body>
-</html>
+++ /dev/null
-/**
- * Adds all the nice finish to the standard theme
- *
- */
-
-th.header,
-td.header,
-div.header {
- background-image:url(gradient.jpg);
- background-position:top;
- background-repeat:repeat-x;
-}
-
-.navbar {
- background-image:url(gradient.jpg);
- background-position:top;
- background-repeat:repeat-x;
-}
-
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html<?php echo $direction ?>>
-<head>
- <?php echo $meta ?>
- <meta name="keywords" content="moodle, <?php echo $title ?> " />
- <title><?php echo $title ?></title>
- <link rel="shortcut icon" href="<?php echo $CFG->themewww .'/'. current_theme() ?>/favicon.ico" />
- <?php include("$CFG->javascript"); ?>
-</head>
-
-<body<?php
- echo " $bodytags";
- if ($focus) {
- echo " onload=\"setfocus()\"";
- }
- ?>>
-
-<div id="page">
-
-<?php //Accessibility: 'headermain' is now H1, see theme/standard/styles_layout.css: .headermain
- if ($home) { // This is what gets printed on the home page only
-?>
- <?php echo $OUTPUT->container_start('clearfix header-home'); ?>
- <h1 class="headermain"><?php echo $heading ?></h1>
- <div class="headermenu"><?php echo $menu ?></div>
- <?php echo $OUTPUT->container_end(); ?>
-<?php } else if ($heading) { // This is what gets printed on any other page with a heading
-?>
- <?php echo $OUTPUT->container_start('clearfix header'); ?>
- <h1 class="headermain"><?php echo $heading ?></h1>
- <div class="headermenu"><?php echo $menu ?></div>
- <?php echo $OUTPUT->container_end(); ?>
-<?php } ?>
-<?php //Accessibility: breadcrumb trail/navbar now a DIV, not a table.
- if ($navigation) { // This is the navigation bar with breadcrumbs ?>
- <div class="navbar clearfix">
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
- <div class="navbutton"><?php echo $button; ?></div>
- </div>
-<?php } else if ($heading) { // If no navigation, but a heading, then print a line
-?>
- <hr />
-<?php } ?>
- <!-- END OF HEADER -->
- <?php echo $OUTPUT->container_start('content'); ?>
+++ /dev/null
-<?php
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle 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 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle 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.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
-/**
- * Serve the CSS for this theme. Every theme must contain a copy of this file
- * DO NOT MODIFY THIS FILE IT IS IMPORTANT TO THE WORKING OF THE MOODLE THEMES SYSTEM.
- * If you are are trying to change something, you should probably be looking at config.php.
- *
- * @package moodlecore
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-$themename = basename(dirname(__FILE__));
-require_once(dirname(__FILE__) . '/../../theme/styles.php');
\ No newline at end of file
+++ /dev/null
-<h2>Standard Logo Theme</h2>
-
-<p>To add your own homepage logo to this theme, you can simply:</p>
-
-<ol>
-<li>upload a file called logo.jpg or logo.gif in your Site Files (look on the home page),
-
- <p>OR</p></li>
-
-<li>put a file called logo.jpg or logo.gif in the main Moodle directory (using FTP, for example).</li>
-
-</ol>
-
+++ /dev/null
-<?php
-
-////////////////////////////////////////////////////////////////////////////////
-/// This file contains a few configuration variables that control
-/// how Moodle uses this theme.
-////////////////////////////////////////////////////////////////////////////////
-
-
-$THEME->sheets = array('gradients');
-
-/// This variable is an array containing the names of all the
-/// stylesheet files you want included in this theme, and in what order
-////////////////////////////////////////////////////////////////////////////////
-
-
-$THEME->standardsheets = array('styles_layout','styles_fonts','styles_color','styles_moz');
-
-/// This variable can be set to an array containing
-/// filenames from the *STANDARD* theme. If the
-/// array exists, it will be used to choose the
-/// files to include in the standard style sheet.
-/// When false, then no files are used.
-/// When true or NON-EXISTENT, then ALL standard files are used.
-/// This parameter can be used, for example, to prevent
-/// having to override too many classes.
-/// Note that the trailing .css should not be included
-/// eg $THEME->standardsheets = array('styles_layout','styles_fonts','styles_color');
-////////////////////////////////////////////////////////////////////////////////
-
-
-$THEME->parent = 'standardwhite';
-
-/// This variable can be set to the name of a parent theme
-/// which you want to have included before the current theme.
-/// This can make it easy to make modifications to another
-/// theme without having to actually change the files
-/// If this variable is empty or false then a parent theme
-/// is not used.
-////////////////////////////////////////////////////////////////////////////////
-
-
-$THEME->parentsheets = array('gradients');
-
-/// This variable can be set to an array containing
-/// filenames from a chosen *PARENT* theme. If the
-/// array exists, it will be used to choose the
-/// files to include in the standard style sheet.
-/// When false, then no files are used.
-/// When true or NON-EXISTENT, then ALL standard files are used.
-/// This parameter can be used, for example, to prevent
-/// having to override too many classes.
-/// Note that the trailing .css should not be included
-/// eg $THEME->parentsheets = array('styles_layout','styles_fonts','styles_color');
-////////////////////////////////////////////////////////////////////////////////
-
-
-$THEME->pluginsheets = array('mod', 'block', 'format', 'gradereport');
-
-/// Which types of plugins should be searched for a styles.php file. This
-/// Allows plugins to include enough styling information to work out of the box.
-
-
-$THEME->navmenuwidth = 50;
-
-/// You can use this to control the cutoff point for strings
-/// in the navmenus (list of activities in popup menu etc)
-/// Default is 50 characters wide.
-
-
-$THEME->makenavmenulist = false;
-
-/// By setting this to true, then you will have access to a
-/// new variable in your header.html and footer.html called
-/// $navmenulist ... this contains a simple XHTML menu of
-/// all activities in the current course, mostly useful for
-/// creating popup navigation menus and so on.
-
-
-$THEME->resource_mp3player_colors =
- 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.
- 'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.
- 'font=Arial&fontColour=3333FF&buffer=10&waitForPlay=no&autoPlay=yes';
-
-/// With this you can control the colours of the "big" MP3 player
-/// that is used for MP3 resources.
-
-
-$THEME->filter_mediaplugin_colors =
- 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.
- 'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.
- 'waitForPlay=yes';
-
-/// ...And this controls the small embedded player
-
-
-$THEME->custompix = false;
-
-/// If true, then this theme must have a "pix"
-/// subdirectory that contains copies of all
-/// files from the moodle/pix directory, plus a
-/// "pix/mod" directory containing all the icons
-/// for all the activity modules.
-////////////////////////////////////////////////////////////////////////////////
-
-
+++ /dev/null
-<?php
-
- echo $OUTPUT->container_end(); // content container
-
- echo $OUTPUT->container_start('footer');
- echo '<hr />';
-
- echo '<p class="helplink">';
- echo page_doc_link(get_string('moodledocslink'));
- echo '</p>';
-
- echo $loggedinas;
- echo $homelink;
-
- echo $OUTPUT->container_end();
-?>
-</div>
-</body>
-</html>
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html<?php echo $direction ?>>
-<head>
- <?php echo $meta ?>
- <meta name="keywords" content="moodle, <?php echo $title ?> " />
- <title><?php echo $title ?></title>
- <link rel="shortcut icon" href="<?php echo $CFG->themewww .'/'. current_theme() ?>/favicon.ico" />
- <?php include("$CFG->javascript"); ?>
-</head>
-
-<body<?php
- echo " $bodytags";
- if ($focus) {
- echo " onload=\"setfocus()\"";
- }
- ?>>
-
-<div id="page">
-
-<?php if ($home) { // This is what gets printed on the home page only
- if (file_exists($CFG->dirroot.'/logo.jpg')) {
- $standardlogo = $CFG->httpswwwroot.'/logo.jpg';
- } else if (file_exists($CFG->dirroot.'/logo.gif')) {
- $standardlogo = $CFG->httpswwwroot.'/logo.gif';
- } else if (file_exists($CFG->dataroot.'/1/logo.jpg')) {
- require_once($CFG->libdir.'/filelib.php');
- $standardlogo = get_file_url('1/logo.jpg', null, 'httpscoursefile');
- } else if (file_exists($CFG->dataroot.'/1/logo.gif')) {
- require_once($CFG->libdir.'/filelib.php');
- $standardlogo = get_file_url('1/logo.gif', null, 'httpscoursefile');
- } else {
- $standardlogo = $CFG->httpsthemewww .'/'. current_theme().'/logo.gif';
- }
-
- //Accessibility: warning: ALT text will need editing if logo changes. 'headermain' is now H1.
-?>
- <?php echo $OUTPUT->container_start('clearfix header-home'); ?>
- <h1 class="headermain"><img alt="Moodle" src="<?php echo $standardlogo ?>" /></h1>
- <div class="headermenu"><?php echo $menu ?></div>
- <?php echo $OUTPUT->container_end(); ?>
-<?php } else if ($heading) { // This is what gets printed on any other page with a heading
-?>
- <?php echo $OUTPUT->container_start('clearfix header'); ?>
- <h1 class="headermain"><?php echo $heading ?></h1>
- <div class="headermenu"><?php echo $menu ?></div>
- <?php echo $OUTPUT->container_end(); ?>
-<?php } ?>
-<?php //Accessibility: breadcrumb trail/navbar now a DIV, not a table.
- if ($navigation) { // This is the navigation table with breadcrumbs ?>
- <div class="navbar clearfix">
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
- <div class="navbutton"><?php echo $button; ?></div>
- </div>
-<?php } else if ($heading) { // If no navigation, but a heading, then print a line
-?>
- <hr />
-<?php } ?>
- <!-- END OF HEADER -->
- <?php echo $OUTPUT->container_start('content'); ?>
+++ /dev/null
-<?php
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle 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 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle 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.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
-/**
- * Serve the CSS for this theme. Every theme must contain a copy of this file
- * DO NOT MODIFY THIS FILE IT IS IMPORTANT TO THE WORKING OF THE MOODLE THEMES SYSTEM.
- * If you are are trying to change something, you should probably be looking at config.php.
- *
- * @package moodlecore
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-$themename = basename(dirname(__FILE__));
-require_once(dirname(__FILE__) . '/../../theme/styles.php');
\ No newline at end of file
+++ /dev/null
-<?php
-
-////////////////////////////////////////////////////////////////////////////////
-/// This file contains a few configuration variables that control
-/// how Moodle uses this theme.
-////////////////////////////////////////////////////////////////////////////////
-
-
-$THEME->sheets = array('gradients');
-
-/// This variable is an array containing the names of all the
-/// stylesheet files you want included in this theme, and in what order
-////////////////////////////////////////////////////////////////////////////////
-
-
-$THEME->standardsheets = array('styles_layout','styles_fonts','styles_color','styles_moz');
-
-/// This variable can be set to an array containing
-/// filenames from the *STANDARD* theme. If the
-/// array exists, it will be used to choose the
-/// files to include in the standard style sheet.
-/// When false, then no files are used.
-/// When true or NON-EXISTENT, then ALL standard files are used.
-/// This parameter can be used, for example, to prevent
-/// having to override too many classes.
-/// Note that the trailing .css should not be included
-/// eg $THEME->standardsheets = array('styles_layout','styles_fonts','styles_color');
-////////////////////////////////////////////////////////////////////////////////
-
-
-$THEME->parent = '';
-
-/// This variable can be set to the name of a parent theme
-/// which you want to have included before the current theme.
-/// This can make it easy to make modifications to another
-/// theme without having to actually change the files
-/// If this variable is empty or false then a parent theme
-/// is not used.
-////////////////////////////////////////////////////////////////////////////////
-
-
-$THEME->parentsheets = false;
-
-/// This variable can be set to an array containing
-/// filenames from a chosen *PARENT* theme. If the
-/// array exists, it will be used to choose the
-/// files to include in the standard style sheet.
-/// When false, then no files are used.
-/// When true or NON-EXISTENT, then ALL standard files are used.
-/// This parameter can be used, for example, to prevent
-/// having to override too many classes.
-/// Note that the trailing .css should not be included
-/// eg $THEME->parentsheets = array('styles_layout','styles_fonts','styles_color');
-////////////////////////////////////////////////////////////////////////////////
-
-
-$THEME->pluginsheets = array('mod', 'block', 'format', 'gradereport');
-
-/// Which types of plugins should be searched for a styles.php file. This
-/// Allows plugins to include enough styling information to work out of the box.
-
-
-$THEME->navmenuwidth = 50;
-
-/// You can use this to control the cutoff point for strings
-/// in the navmenus (list of activities in popup menu etc)
-/// Default is 50 characters wide.
-
-
-$THEME->makenavmenulist = false;
-
-/// By setting this to true, then you will have access to a
-/// new variable in your header.html and footer.html called
-/// $navmenulist ... this contains a simple XHTML menu of
-/// all activities in the current course, mostly useful for
-/// creating popup navigation menus and so on.
-
-
-$THEME->resource_mp3player_colors =
- 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.
- 'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.
- 'font=Arial&fontColour=3333FF&buffer=10&waitForPlay=no&autoPlay=yes';
-
-/// With this you can control the colours of the "big" MP3 player
-/// that is used for MP3 resources.
-
-
-$THEME->filter_mediaplugin_colors =
- 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.
- 'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.
- 'waitForPlay=yes';
-
-/// ...And this controls the small embedded player
-
-
-$THEME->custompix = false;
-
-/// If true, then this theme must have a "pix"
-/// subdirectory that contains copies of all
-/// files from the moodle/pix directory, plus a
-/// "pix/mod" directory containing all the icons
-/// for all the activity modules.
-////////////////////////////////////////////////////////////////////////////////
-
-
+++ /dev/null
-<?php
-
- echo $OUTPUT->container_end(); // content container
-
- echo $OUTPUT->container_start('footer');
- echo '<hr />';
-
- echo '<p class="helplink">';
- echo page_doc_link(get_string('moodledocslink'));
- echo '</p>';
-
- echo $loggedinas;
- echo $homelink;
-
- echo $OUTPUT->container_end();
-?>
-</div>
-</body>
-</html>
+++ /dev/null
-/**
- * Adds all the nice finish to the standard theme
- *
- */
-
-th.header,
-td.header,
-div.header {
- background-image:url(gradient.jpg);
- background-position:top;
- background-repeat:repeat-x;
-}
-
-.navbar {
- background-image:url(gradient.jpg);
- background-position:top;
- background-repeat:repeat-x;
-}
-
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html<?php echo $direction ?>>
-<head>
- <?php echo $meta ?>
- <meta name="keywords" content="moodle, <?php echo $title ?> " />
- <title><?php echo $title ?></title>
- <link rel="shortcut icon" href="<?php echo $CFG->themewww .'/'. current_theme() ?>/favicon.ico" />
- <?php include("$CFG->javascript"); ?>
-</head>
-
-<body<?php
- echo " $bodytags";
- if ($focus) {
- echo " onload=\"setfocus()\"";
- }
- ?>>
-
-<div id="page">
-
-<?php //Accessibility: 'headermain' is now H1, see theme/standard/styles_layout.css: .headermain
- if ($home) { // This is what gets printed on the home page only
-?>
- <?php echo $OUTPUT->container_start('clearfix header-home'); ?>
- <h1 class="headermain"><?php echo $heading ?></h1>
- <div class="headermenu"><?php echo $menu ?></div>
- <?php echo $OUTPUT->container_end(); ?>
-<?php } else if ($heading) { // This is what gets printed on any other page with a heading
-?>
- <?php echo $OUTPUT->container_start('clearfix header'); ?>
- <h1 class="headermain"><?php echo $heading ?></h1>
- <div class="headermenu"><?php echo $menu ?></div>
- <?php echo $OUTPUT->container_end(); ?>
-<?php } ?>
-<?php //Accessibility: breadcrumb trail/navbar now a DIV, not a table.
- if ($navigation) { // This is the navigation bar with breadcrumbs ?>
- <div class="navbar clearfix">
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
- <div class="navbutton"><?php echo $button; ?></div>
- </div>
-<?php } else if ($heading) { // If no navigation, but a heading, then print a line
-?>
- <hr />
-<?php } ?>
- <!-- END OF HEADER -->
- <?php echo $OUTPUT->container_start('content'); ?>
+++ /dev/null
-<?php
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle 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 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle 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.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
-/**
- * Serve the CSS for this theme. Every theme must contain a copy of this file
- * DO NOT MODIFY THIS FILE IT IS IMPORTANT TO THE WORKING OF THE MOODLE THEMES SYSTEM.
- * If you are are trying to change something, you should probably be looking at config.php.
- *
- * @package moodlecore
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-$themename = basename(dirname(__FILE__));
-require_once(dirname(__FILE__) . '/../../theme/styles.php');
\ No newline at end of file
+++ /dev/null
-<?php
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle 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 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle 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.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
-
-/**
- * Configuration for Moodle's standard theme.
- *
- * There is documentation of all the things that can be configured here at
- * http://phpdocs.moodle.org/HEAD/moodlecore/theme_config.html
- *
- * For an overview of how Moodle themes work, Please see
- * http://docs.moodle.org/en/Developement:How_Moodle_outputs_HTML
- *
- * @package moodlecore
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-$THEME->sheets = array('gradients');
-
-$THEME->parent = null;
-$THEME->parentsheets = false;
-
-$THEME->standardsheets = true;
-$THEME->pluginsheets = array('mod', 'block', 'format', 'gradereport');
-
-$THEME->metainclude = false;
-$THEME->parentmetainclude = false;
-$THEME->standardmetainclude = true;
-
-$THEME->custompix = false;
-
-$THEME->layouts = array(
- // Most pages. Put this first, so if we encounter an unknown page type, this is used.
- 'normal' => array(
- 'layout' => 'standard:layout.php',
- 'regions' => array('side-pre', 'side-post'),
- 'defaultregion' => 'side-post'
- ),
- // The site home page.
- 'home' => array(
- 'layout' => 'standard:layout-home.php',
- 'regions' => array('side-pre', 'side-post'),
- 'defaultregion' => 'side-post'
- ),
- // Settings form pages, like course of module settings.
- 'form' => array(
- 'layout' => 'standard:layout.php',
- 'regions' => array(),
- ),
- // Pages that appear in pop-up windows.
- 'popup' => array(
- 'layout' => 'standard:layout-popup.php',
- 'regions' => array(),
- ),
- // Legacy frameset pages
- 'topframe' => array(
- 'layout' => 'standard:layout-topframe.php',
- 'regions' => array(),
- ),
- // Used during upgrade and install, and for the 'This site is undergoing maintenance' message.
- // This must not have any blocks, and it is good idea if it does not have links to
- // other places - for example there should not be a home link in the footer..
- 'maintenance' => array(
- 'layout' => 'standard:layout-popup.php',
- 'regions' => array(),
- ),
- // Embeded pages, like iframe embeded in moodleform
- 'embedded' => array(
- 'layout' => 'standard:layout-embedded.php',
- 'regions' => array(),
- )
-);
-
-$THEME->resource_mp3player_colors =
- 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.
- 'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.
- 'font=Arial&fontColour=3333FF&buffer=10&waitForPlay=no&autoPlay=yes';
-$THEME->filter_mediaplugin_colors =
- 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.
- 'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.
- 'waitForPlay=yes';
-
-//$THEME->rarrow = '►' //OR '→';
-//$THEME->larrow = '◄' //OR '←';
-//$CFG->block_search_button = link_arrow_right(get_string('search'), $url='', $accesshide=true);
-
-$THEME->navmenuwidth = 50;
-// You can use this to control the cutoff point for strings
-// in the navmenus (list of activities in popup menu etc)
-// Default is 50 characters wide.
-
-$THEME->makenavmenulist = false;
-// By setting this to true, then you will have access to a
-// new variable in your header.html and footer.html called
-// $navmenulist ... this contains a simple XHTML menu of
-// all activities in the current course, mostly useful for
-// creating popup navigation menus and so on.
+++ /dev/null
-<?php
-
- echo $OUTPUT->container_end(); // content container
-
- echo $OUTPUT->container_start('footer');
- echo "<hr />";
-
- echo '<p class="helplink">';
- echo page_doc_link(get_string('moodledocslink'));
- echo '</p>';
-
- echo $loggedinas;
- echo $homelink;
-
- if (!empty($performanceinfo) and has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))) {
- echo $performanceinfo;
- }
-
- if (debugging()) {
-?>
- <div class="validators"><ul>
- <li><a href="http://validator.w3.org/check?verbose=1&ss=1&uri=<?php echo urlencode(qualified_me()) ?>">Validate HTML</a></li>
- <li><a href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=-1&url1=<?php echo urlencode(qualified_me()) ?>">Section 508 Check</a></li>
- <li><a href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=0&warnp2n3e=1&url1=<?php echo urlencode(qualified_me()) ?>">WCAG 1 (2,3) Check</a></li>
- </ul></div>
-<?php }
- echo $OUTPUT->container_end();
-?>
-
-</div>
-</body>
-</html>
+++ /dev/null
-/**
- * Adds all the nice finish to the standard theme
- *
- */
-
-th.header,
-td.header,
-h1.header,
-h2.header,
-h3.header,
-div.header {
- background-image:url(gradient.jpg);
- background-position:top;
- background-repeat:repeat-x;
-}
-table.rotateheaders th.header {
- background-image: none;
-}
-.navbar {
- background-image:url(gradient.jpg);
- background-position:top;
- background-repeat:repeat-x;
-}
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html<?php echo $direction ?>>
-<head>
- <?php echo $meta ?>
- <meta name="keywords" content="moodle, <?php echo $title ?> " />
- <title><?php echo $title ?></title>
- <link rel="shortcut icon" href="<?php echo $CFG->themewww .'/'. current_theme() ?>/favicon.ico" />
- <?php include("$CFG->javascript"); ?>
-</head>
-
-<body<?php
- echo " $bodytags";
- if ($focus) {
- echo " onload=\"setfocus()\"";
- }
- ?>>
-
-<div id="page">
-
-<?php //Accessibility: 'headermain' is now H1, see theme/standard/styles_layout.css: .headermain
- if ($home) { // This is what gets printed on the home page only
-?>
- <?php echo $OUTPUT->container_start('clearfix header-home'); ?>
- <h1 class="headermain"><?php echo $heading ?></h1>
- <div class="headermenu"><?php echo $menu ?></div>
- <?php echo $OUTPUT->container_end(); ?>
-<?php } else if ($heading) { // This is what gets printed on any other page with a heading
-?>
- <?php echo $OUTPUT->container_start('clearfix header'); ?>
- <h1 class="headermain"><?php echo $heading ?></h1>
- <div class="headermenu"><?php echo $menu ?></div>
- <?php echo $OUTPUT->container_end(); ?>
-<?php } ?>
-<?php //Accessibility: breadcrumb trail/navbar now a DIV, not a table.
- if ($navigation) { // This is the navigation bar with breadcrumbs ?>
- <div class="navbar clearfix">
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
- <div class="navbutton"><?php echo $button; ?></div>
- </div>
-<?php } else if ($heading) { // If no navigation, but a heading, then print a line
-?>
- <hr />
-<?php } ?>
- <!-- END OF HEADER -->
- <?php echo $OUTPUT->container_start('clearfix content'); ?>
+++ /dev/null
-<?php
-
-// This file is part of Moodle - http://moodle.org/
-//
-// Moodle 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 3 of the License, or
-// (at your option) any later version.
-//
-// Moodle 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.
-//
-// You should have received a copy of the GNU General Public License
-// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
-/**
- * Serve the CSS for this theme. Every theme must contain a copy of this file
- * DO NOT MODIFY THIS FILE IT IS IMPORTANT TO THE WORKING OF THE MOODLE THEMES SYSTEM.
- * If you are are trying to change something, you should probably be looking at config.php.
- *
- * @package moodlecore
- * @copyright 2009 Tim Hunt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-$themename = basename(dirname(__FILE__));
-require_once(dirname(__FILE__) . '/../../theme/styles.php');
\ No newline at end of file
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * This file is responsible for serving the CSS of each theme.
- *
- * It should not be linked to directly. Instead, it gets included by
- * theme/themename/styles.php. See theme/standard/styles.php as an example.
- *
- * In this script, we are serving the styles for theme $themename, but we are
- * serving them on behalf of theme $fortheme.
- *
- * To understand this, image that the currently selected theme is standardwhite.
- * This theme uses both its own stylesheets, and also the ones from the standard theme.
- * So, when we are serving theme/standard/styles.php, we need to use the config in
- * theme/standardwhite/config.php to control the settings. This is controled by the
- * for=... parameter in the URL.
- *
- * In case you are wondering, in the above scenario, we have to serve the standard
- * theme CSS with a URL like theme/standard/styles.php, so that relative links from
- * the CSS to images in the theme folder will work.
+ * This file is responsible for serving the one huge CSS of each theme.
*
* @package moodlecore
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @copyright 2009 Petr Skoda (skodak) {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-if (empty($themename)) {
- die('Direct access to this script is forbidden.');
- // This script should only be required by theme/themename/styles.php.
-}
-
-// These may already be defined if we got here via style_sheet_setup in lib/deprecatedlib.php
-if (!defined('NO_MOODLE_COOKIES')) {
- define('NO_MOODLE_COOKIES', true); // Session not used here
-}
-if (!defined('NO_UPGRADE_CHECK')) {
- define('NO_UPGRADE_CHECK', true); // Ignore upgrade check
-}
-require_once(dirname(__FILE__) . '/../config.php');
-
-
-$fortheme = required_param('for', PARAM_FILE);
-$pluginsheets = optional_param('pluginsheets', '', PARAM_BOOL);
-
-// Load the configuration of the selected theme. (See comment at the top of the file.)
-$PAGE->force_theme($fortheme);
-
-$DEFAULT_SHEET_LIST = array('styles_layout', 'styles_fonts', 'styles_color');
+// we need just the values from config.php and minlib.php
+define('ABORT_AFTER_CONFIG', true);
+require('../config.php'); // this stops immediately at the beginning of lib/setup.php
-// Fix for IE6 caching - we don't want the filemtime('styles.php'), instead use now.
-$lastmodified = time();
+$themename = min_optional_param('theme', 'standard', 'SAFEDIR');
+$type = min_optional_param('type', 'all', 'SAFEDIR');
+$rev = min_optional_param('rev', 0, 'INT');
-// Set the correct content type. (Should we also be specifying charset here?)
-header('Content-type: text/css');
-header('Last-Modified: ' . gmdate("D, d M Y H:i:s", $lastmodified) . ' GMT');
-header('Pragma: ');
-
-// Set the caching for these style sheets
-if (debugging('', DEBUG_DEVELOPER)) { // Use very short caching time
- header('Cache-Control: max-age=60'); // One minute
- header('Expires: ' . gmdate("D, d M Y H:i:s", $lastmodified + 60) . ' GMT');
-} else if ($themename == 'standard') { // Give this one extra long caching MDL-19953
- header('Cache-Control: max-age=172801'); // Two days plus one second
- header('Expires: ' . gmdate("D, d M Y H:i:s", $lastmodified + 172801) . ' GMT');
-} else { // Use whatever time the theme has set
- header('Cache-Control: max-age='.$THEME->csslifetime);
- header('Expires: ' . gmdate("D, d M Y H:i:s", $lastmodified + $THEME->csslifetime) . ' GMT');
+if (!in_array($type, array('all', 'ie', 'editor', 'yui', 'plugins', 'parents', 'theme'))) {
+ header('HTTP/1.0 404 not found');
+ die('Theme was not found, sorry.');
}
-if (!empty($showdeprecatedstylesheetsetupwarning)) {
- echo <<<END
-
-/***************************************************************
- ***************************************************************
- **** ****
- **** WARNING! This theme uses an old-fashioned styles.php ****
- **** file. It should be updated by copying styles.php from ****
- **** the standard theme of a recent version of Moodle. ****
- **** ****
- ***************************************************************
- ***************************************************************/
+if (!file_exists("$CFG->dirroot/theme/$themename/config.php") and !file_exists("$CFG->dataroot/theme/$themename/config.php")) {
+ header('HTTP/1.0 404 not found');
+ die('Theme was not found, sorry.');
+}
+if ($type === 'ie') {
+ send_ie_css($themename, $rev);
+}
+$candidatesheet = "$CFG->dataroot/cache/theme/$themename/css/$type.css";
-END;
+if (file_exists($candidatesheet)) {
+ if (!empty($_SERVER['HTTP_IF_NONE_MATCH'])) {
+ // we do not actually need to verify the etag value because our files
+ // never change in cache because we increment the rev parameter
+ header('HTTP/1.1 304 Not Modified');
+ die;
+ }
+ send_cached_css($candidatesheet, $rev);
}
-// This is a bit tricky, but the following initialisation code may output
-// notices or debug developer warnings (for example, if the theme uses some
-// Deprecated settings in it config.php file. Therefore start a CSS comment
-// so that any debugging output does not break the CSS. This comment is closed
-// below.
-echo '/*';
+//=================================================================================
+// ok, now we need to start normal moodle script, we need to load all libs and $DB
+define('ABORT_AFTER_CONFIG_CANCEL', true);
+define('NO_MOODLE_COOKIES', true); // Session not used here
+define('NO_UPGRADE_CHECK', true); // Ignore upgrade check
+require("$CFG->dirroot/lib/setup.php");
-// We will build up a list of CSS file path names, then concatenate them all.
-$files = array();
+$theme = theme_config::load($themename);
-// If this theme wants plugin sheets, include them. Do this first, so styles
-// here can be overridden by theme CSS.
-if ($pluginsheets) {
- foreach ($THEME->pluginsheets as $plugintype) {
- $files = array_merge($files, get_sheets_for_plugin_type($plugintype));
+if ($type === 'editor') {
+ $css = $theme->editor_css_content();
+ store_css($candidatesheet, $css);
+} else {
+ $css = $theme->css_content();
+ foreach ($css as $key=>$value) {
+ $sheet = '';
+ foreach($value as $val) {
+ if (is_array($val)) {
+ $sheet .= "\n\n".implode("\n\n", $val);
+ } else {
+ $sheet .= "\n\n".$val;
+ }
+ }
+ $css[$key] = $sheet;
+ $cssfile = "$CFG->dataroot/cache/theme/$themename/css/$key.css";
+ store_css($cssfile, $sheet);
}
+ $css = implode('', $css);
+ $cssfile = "$CFG->dataroot/cache/theme/$themename/css/all.css";
+ store_css($cssfile, $css);
}
-// Now work out which stylesheets we shold be serving from this theme.
-if ($themename == $fortheme) {
- $themesheets = $THEME->sheets;
-
-} else if (!empty($THEME->parent) && $themename == $THEME->parent) {
- if ($THEME->parentsheets === true) {
- // Use all the sheets we have.
- $themesheets = $DEFAULT_SHEET_LIST;
- } else if (!empty($THEME->parentsheets)) {
- $themesheets = $THEME->parentsheets;
- } else {
- $themesheets = array();
- }
+send_cached_css($candidatesheet, $rev);
-} else if ($themename == 'standard') {
- if ($THEME->standardsheets === true) {
- // Use all the sheets we have.
- $themesheets = $DEFAULT_SHEET_LIST;
- } else if (!empty($THEME->standardsheets)) {
- $themesheets = $THEME->standardsheets;
- } else {
- $themesheets = array();
- }
-}
-// Conver the theme stylessheet names to file names.
-foreach ($themesheets as $sheet) {
- $files[] = $CFG->themedir . '/' . $themename . '/' . $sheet . '.css';
-}
+//=================================================================================
+//=== utility functions ==
+// we are not using filelib because we need to fine tune all header
+// parameters to get the best performance.
-if (empty($files)) {
- echo " The $fortheme theme does not require anything from the $themename theme. */\n\n";
- exit;
+function store_css($csspath, $css) {
+ check_dir_exists(dirname($csspath), true, true);
+ $fp = fopen($csspath, 'w');
+ fwrite($fp, $css);
+ fclose($fp);
}
-// Output a commen with a summary of the included files.
-echo <<<END
-
- * Styles from theme '$themename' for theme '$fortheme'
- *
- * Files included here:
- *
-
-END;
-$toreplace = array($CFG->dirroot . '/', $CFG->themedir . '/');
-foreach ($files as $file) {
- echo ' * ' . str_replace($toreplace, '', $file) . "\n";
+function send_ie_css($themename, $rev) {
+ $lifetime = 60*60*24*3;
+
+ $css = <<<EOF
+/** Unfortunately IE6/7 does not support more than 4096 selectors in one CSS file, which means we have to use some ugly hacks :-( **/
+@import url(styles.php?theme=$themename&rev=$rev&type=yui);
+@import url(styles.php?theme=$themename&rev=$rev&type=plugins);
+@import url(styles.php?theme=$themename&rev=$rev&type=parents);
+@import url(styles.php?theme=$themename&rev=$rev&type=theme);
+
+EOF;
+
+ header('Etag: '.md5($rev));
+ header('Content-Disposition: inline; filename="styles.php"');
+ header('Last-Modified: '. gmdate('D, d M Y H:i:s', time()) .' GMT');
+ header('Expires: '. gmdate('D, d M Y H:i:s', time() + $lifetime) .' GMT');
+ header('Pragma: ');
+ header('Accept-Ranges: none');
+ header('Content-Type: text/css');
+ header('Content-Length: '.strlen($css));
+
+ while (@ob_end_flush()); //flush the buffers - save memory and disable sid rewrite
+ echo $css;
+ die;
}
-echo " */\n\n";
-if (!empty($THEME->cssoutputfunction)) {
- call_user_func($THEME->cssoutputfunction, $files, $toreplace);
+function send_cached_css($csspath, $rev) {
+ $lifetime = 60*60*24*20;
-} else {
- foreach ($files as $file) {
- $shortname = str_replace($toreplace, '', $file);
- echo '/******* ' . $shortname . " start *******/\n\n";
- @include_once($file);
- echo '/******* ' . $shortname . " end *******/\n\n";
- }
-}
+ header('Content-Disposition: inline; filename="styles.php"');
+ header('Last-Modified: '. gmdate('D, d M Y H:i:s', filemtime($csspath)) .' GMT');
+ header('Expires: '. gmdate('D, d M Y H:i:s', time() + $lifetime) .' GMT');
+ header('Pragma: ');
+ header('Accept-Ranges: none');
+ header('Content-Type: text/css');
+ header('Content-Length: '.filesize($csspath));
-function get_sheets_for_plugin_type($type) {
- $files = array();
- $mods = get_plugin_list($type);
- foreach ($mods as $moddir) {
- $file = $moddir . '/styles.php';
- if (file_exists($file)) {
- $files[] = $file;
- }
- }
- return $files;
+ while (@ob_end_flush()); //flush the buffers - save memory and disable sid rewrite
+ readfile($csspath);
+ die;
}
--- /dev/null
+<?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle 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 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle 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.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * This file is responsible for serving of individual style sheets in designer mode.
+ *
+ * @package moodlecore
+ * @copyright 2009 Petr Skoda (skodak) {@link http://skodak.org}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+// no chaching
+define('NO_MOODLE_COOKIES', true); // Session not used here
+define('NO_UPGRADE_CHECK', true); // Ignore upgrade check
+require('../config.php');
+
+$themename = required_param('theme', PARAM_SAFEDIR);
+$type = required_param('type', PARAM_SAFEDIR);
+$subtype = optional_param('subtype', '', PARAM_SAFEDIR);
+$sheet = optional_param('sheet', '', PARAM_SAFEDIR);
+
+if (!file_exists("$CFG->dirroot/theme/$themename/config.php") and !file_exists("$CFG->dataroot/theme/$themename/config.php")) {
+ css_not_found();
+}
+
+if (theme_get_revision() > -1) {
+ //bad luck - this should not happen!
+ css_not_found();
+}
+
+$theme = theme_config::load($themename);
+
+if ($type === 'editor') {
+ $css = $theme->editor_css_content();
+ send_uncached_css($css);
+}
+
+$css = $theme->css_content();
+
+if ($type === 'yui') {
+ send_uncached_css(reset($css['yui']));
+
+} else if ($type === 'plugin') {
+ if (isset($css['plugins'][$subtype])) {
+ send_uncached_css($css['plugins'][$subtype]);
+ }
+
+} else if ($type === 'parent') {
+ if (isset($css['parents'][$subtype][$sheet])) {
+ send_uncached_css($css['parents'][$subtype][$sheet]);
+ }
+
+} else if ($type === 'theme') {
+ if (isset($css['theme'][$sheet])) {
+ send_uncached_css($css['theme'][$sheet]);
+ }
+}
+css_not_found();
+
+//=================================================================================
+//=== utility functions ==
+// we are not using filelib because we need to fine tune all header
+// parameters to get the best performance.
+
+function send_uncached_css($css) {
+ header('Content-Disposition: inline; filename="styles_debug.php"');
+ header('Last-Modified: '. gmdate('D, d M Y H:i:s', time()) .' GMT');
+ header('Expires: '. gmdate('D, d M Y H:i:s', time() + 2) .' GMT');
+ header('Pragma: ');
+ header('Accept-Ranges: none');
+ header('Content-Type: text/css');
+ header('Content-Length: '.strlen($css));
+
+ while (@ob_end_flush()); //flush the buffers - save memory and disable sid rewrite
+ echo($css);
+ die;
+}
+
+function css_not_found() {
+ header('HTTP/1.0 404 not found');
+ die('CSS was not found, sorry.');
+}
\ No newline at end of file
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$themename = basename(dirname(__FILE__));
-require_once(dirname(__FILE__) . '/../../theme/styles.php');
\ No newline at end of file
+die('Not converted yet...');
}
if (!empty($USER->newadminuser)) {
$PAGE->set_course($SITE);
- $PAGE->set_generaltype('maintenance');
+ $PAGE->set_pagelayout('maintenance');
} else {
require_login($course);
}
$PAGE->set_docs_path('');
$PAGE->set_title($SITE->fullname." ".get_string('wsdocumentation', 'webservice'));
$PAGE->set_heading($SITE->fullname." ".get_string('wsdocumentation', 'webservice'));
- $PAGE->set_generaltype('popup');
+ $PAGE->set_pagelayout('popup');
//unlog temporarly the user in order to not trigger environment.php called by Moodle header.
//environment.php checkes the sessionkey that we don't have here.
//emvrionment.php is just used to detect the flash player. We don't need
$PAGE->set_docs_path('');
$PAGE->set_title($SITE->fullname." ".get_string('wsdocumentation', 'webservice'));
$PAGE->set_heading($SITE->fullname." ".get_string('wsdocumentation', 'webservice'));
- $PAGE->set_generaltype('popup');
+ $PAGE->set_pagelayout('popup');
echo $OUTPUT->header();
$renderer = $PAGE->theme->get_renderer('core_wsdoc',$OUTPUT);