]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-20204 first batch of major theme changes, some regressions are still there, expec...
authorPetr Skoda <skodak@moodle.org>
Wed, 16 Dec 2009 18:00:58 +0000 (18:00 +0000)
committerPetr Skoda <skodak@moodle.org>
Wed, 16 Dec 2009 18:00:58 +0000 (18:00 +0000)
268 files changed:
admin/bloglevelupgrade.php
admin/cli/install.php
admin/generator.php
admin/index.php
admin/roles/assign.php
admin/settings/appearance.php
admin/settings/development.php
admin/settings/plugins.php
admin/upgradesettings.php
admin/webservice/service_users.php
auth/shibboleth/login.php
backup/restorelib.php
blocks/global_navigation_tree/block_global_navigation_tree.php
blocks/moodleblock.class.php
blocks/rss_client/editfeed.php
blocks/rss_client/managefeeds.php
blocks/rss_client/viewfeed.php
blocks/settings_navigation_tree/block_settings_navigation_tree.php
blocks/upgrade.txt
calendar/lib.php
course/edit.php
course/importstudents.html
course/lib.php
course/modedit.php
course/report/log/live.php
course/resources.php
course/view.php
enrol/manual/enrol.php
grade/edit/outcome/course.php
grade/edit/tree/index.php
grade/lib.php
grade/report/grader/index.php
grade/report/grader/lib.php
grade/report/styles.css [deleted file]
group/assign.php
group/members.php
help.php
index.php
install.php
iplookup/index.php
lang/en_utf8/admin.php
lang/en_utf8/theme_standard.php
lib/adminlib.php
lib/ajax/ajaxlib.php
lib/ajax/simpletest/testajaxlib.php
lib/blocklib.php
lib/configonlylib.php [new file with mode: 0644]
lib/db/install.php
lib/db/upgrade.php
lib/deprecatedlib.php
lib/editor/tinymce/editor_styles.css [new file with mode: 0644]
lib/editor/tinymce/lib.php
lib/filelib.php
lib/installlib.php
lib/javascript-navigation.js
lib/javascript-static.js
lib/moodlelib.php
lib/navigationlib.php
lib/outputcomponents.php
lib/outputfactories.php
lib/outputlib.php
lib/outputrenderers.php
lib/pagelib.php
lib/session-test.php
lib/setup.php
lib/simpletest/get_string_fixtures/pagelogs/admin_index.php_get_string.log.php
lib/simpletest/get_string_fixtures/pagelogs/admin_index.php_old_get_string.log.php
lib/simpletest/testoutputlib.php
lib/simpletest/testpagelib_moodlepage.php
lib/upgradelib.php
lib/weblib.php
lib/yui/readme_moodle.txt
lib/yui/reset-fonts-grids/reset-fonts-grids.css
login/index.php
message/discussion.php
message/index.php
message/messages.php
message/refresh.php
message/send.php
message/user.php
mod/assignment/pix/icon.gif [new file with mode: 0755]
mod/assignment/type/online/file.php
mod/chat/chat.css [deleted file]
mod/chat/gui_ajax/index.php
mod/chat/gui_basic/index.php
mod/chat/gui_header_js/chatinput.php
mod/chat/gui_header_js/jsupdate.php
mod/chat/gui_header_js/jsupdated.php
mod/chat/gui_header_js/users.php
mod/chat/pix/icon.gif [new file with mode: 0755]
mod/choice/pix/icon.gif [moved from mod/choice/icon.gif with 100% similarity]
mod/choice/styles.php [deleted file]
mod/data/lib.php
mod/data/pix/icon.gif [new file with mode: 0755]
mod/feedback/lib.php
mod/feedback/pix/icon.gif [new file with mode: 0644]
mod/folder/locallib.php
mod/folder/pix/icon.gif [moved from mod/folder/icon.gif with 100% similarity]
mod/forum/forum.css [deleted file]
mod/forum/lib.php
mod/forum/pix/icon.gif [new file with mode: 0755]
mod/forum/subscribers.php
mod/glossary/lib.php
mod/glossary/pix/asc.gif [new file with mode: 0644]
mod/glossary/pix/comment.gif [new file with mode: 0644]
mod/glossary/pix/desc.gif [new file with mode: 0644]
mod/glossary/pix/export.gif [new file with mode: 0644]
mod/glossary/pix/icon.gif [new file with mode: 0644]
mod/glossary/pix/minus.gif [new file with mode: 0644]
mod/glossary/pix/print.gif [new file with mode: 0644]
mod/glossary/view.php
mod/hotpot/lib.php
mod/hotpot/pix/icon.gif [new file with mode: 0644]
mod/imscp/pix/icon.gif [moved from mod/imscp/icon.gif with 100% similarity]
mod/imscp/view.php
mod/label/pix/icon.gif [moved from mod/label/icon.gif with 100% similarity]
mod/lesson/pix/icon.gif [new file with mode: 0755]
mod/lesson/renderer.php
mod/page/pix/icon.gif [moved from mod/page/icon.gif with 100% similarity]
mod/page/view.php
mod/quiz/edit.php
mod/quiz/editlib.php
mod/quiz/lib.php
mod/quiz/pix/icon.gif [new file with mode: 0755]
mod/quiz/report/responses/report.php
mod/resource/locallib.php
mod/resource/pix/icon.gif [new file with mode: 0644]
mod/scorm/datamodels/aicclib.php
mod/scorm/datamodels/scorm_12lib.php
mod/scorm/datamodels/scorm_13lib.php
mod/scorm/lib.php
mod/scorm/loadSCO.php
mod/scorm/pix/icon.gif [new file with mode: 0755]
mod/scorm/report.php
mod/survey/pix/icon.gif [moved from mod/survey/icon.gif with 100% similarity]
mod/upgrade.txt
mod/url/locallib.php
mod/url/pix/icon.gif [new file with mode: 0644]
mod/wiki/pix/icon.gif [moved from mod/wiki/icon.gif with 100% similarity]
my/index.php
pix/smartpix.php [deleted file]
question/edit.php
question/preview.php
question/type/questiontype.php
repository/filepicker.php
repository/lib.php
repository/local/repository.class.php
repository/repository.css [deleted file]
search/query.php
tag/edit.php
theme/anomaly/styles.php
theme/base/config.php [new file with mode: 0644]
theme/base/layout/embedded.php [moved from theme/standard/layout-embedded.php with 72% similarity]
theme/base/layout/general.php [new file with mode: 0644]
theme/base/layout/home.php [new file with mode: 0644]
theme/base/pix/favicon.ico [moved from theme/standard/favicon.ico with 100% similarity]
theme/base/pix/screenshot.jpg [new file with mode: 0755]
theme/base/style/block_calendar_month.css [new file with mode: 0644]
theme/base/style/blocks.css [new file with mode: 0644]
theme/base/style/core.css [new file with mode: 0644]
theme/base/style/pagelayout.css [new file with mode: 0644]
theme/chameleon/styles.php
theme/colors/styles.php
theme/cornflower/styles.php
theme/custom_corners/lib.php [new file with mode: 0644]
theme/custom_corners/styles.php
theme/formal_white/styles.php
theme/image.php [new file with mode: 0644]
theme/index.php
theme/lines/styles.php
theme/metal/styles.php
theme/oceanblue/styles.php
theme/orangewhite/styles.php
theme/orangewhitepda/styles.php
theme/preview.php [deleted file]
theme/standard/README.html [deleted file]
theme/standard/config.php
theme/standard/footer.html [deleted file]
theme/standard/gradient.jpg [deleted file]
theme/standard/header.html [deleted file]
theme/standard/layout/embedded.php [moved from theme/standard/layout-popup.php with 85% similarity]
theme/standard/layout/frametop.php [moved from theme/standard/layout-topframe.php with 85% similarity]
theme/standard/layout/home.php [moved from theme/standard/layout-home.php with 90% similarity]
theme/standard/layout/minimal.php [new file with mode: 0644]
theme/standard/layout/normal.php [moved from theme/standard/layout.php with 93% similarity]
theme/standard/meta.php [deleted file]
theme/standard/pix/favicon.ico [moved from theme/standardblue/favicon.ico with 100% similarity]
theme/standard/pix/gradient_vertical.jpg [moved from theme/standard/gradient_vertical.jpg with 100% similarity]
theme/standard/pix/screenshot.jpg [moved from theme/standard/screenshot.jpg with 100% similarity]
theme/standard/pix/shadow_corners.png [moved from theme/standard/shadow_corners.png with 100% similarity]
theme/standard/pix/shadow_left_right.png [moved from theme/standard/shadow_left_right.png with 100% similarity]
theme/standard/pix/shadow_top_bottom.png [moved from theme/standard/shadow_top_bottom.png with 100% similarity]
theme/standard/rtl.css [deleted file]
theme/standard/style/block_blog_tags.css [moved from blocks/blog_tags/styles.php with 100% similarity]
theme/standard/style/block_calendar_month.css [new file with mode: 0644]
theme/standard/style/block_calendar_upcoming.css [moved from blocks/calendar_upcoming/styles.php with 100% similarity]
theme/standard/style/block_course_summary.css [new file with mode: 0644]
theme/standard/style/block_login.css [moved from blocks/login/styles.php with 100% similarity]
theme/standard/style/block_news_items.css [moved from blocks/news_items/styles.php with 100% similarity]
theme/standard/style/block_quiz_results.css [moved from blocks/quiz_results/styles.php with 99% similarity]
theme/standard/style/block_rss_client.css [new file with mode: 0644]
theme/standard/style/block_search_forums.css [moved from blocks/search_forums/styles.php with 100% similarity]
theme/standard/style/block_tags.css [new file with mode: 0644]
theme/standard/style/blog_tags.css [new file with mode: 0644]
theme/standard/style/gradebook.css [moved from grade/edit/tree/tree.css with 85% similarity]
theme/standard/style/mod_assignment.css [new file with mode: 0644]
theme/standard/style/mod_chat.css [new file with mode: 0644]
theme/standard/style/mod_choice.css [new file with mode: 0644]
theme/standard/style/mod_data.css [new file with mode: 0644]
theme/standard/style/mod_feedback.css [new file with mode: 0644]
theme/standard/style/mod_folder.css [new file with mode: 0644]
theme/standard/style/mod_forum.css [new file with mode: 0644]
theme/standard/style/mod_glossary.css [new file with mode: 0644]
theme/standard/style/mod_lesson.css [moved from mod/lesson/lesson.css with 91% similarity]
theme/standard/style/mod_page.css [new file with mode: 0644]
theme/standard/style/mod_quiz.css [new file with mode: 0644]
theme/standard/style/mod_resource.css [new file with mode: 0644]
theme/standard/style/mod_scorm.css [new file with mode: 0644]
theme/standard/style/mod_survey.css [new file with mode: 0644]
theme/standard/style/mod_wiki.css [new file with mode: 0644]
theme/standard/style/styles_color.css [moved from theme/standard/styles_color.css with 67% similarity]
theme/standard/style/styles_fonts.css [moved from theme/standard/styles_fonts.css with 72% similarity]
theme/standard/style/styles_layout.css [moved from theme/standard/styles_layout.css with 67% similarity]
theme/standard/style/styles_moz.css [moved from theme/standard/styles_moz.css with 100% similarity]
theme/standard/style/styles_tinymce.css [new file with mode: 0644]
theme/standard/styles.php [deleted file]
theme/standard/styles_ie6.css [deleted file]
theme/standard/styles_ie7.css [deleted file]
theme/standardblue/config.php [deleted file]
theme/standardblue/footer.html [deleted file]
theme/standardblue/gradient.jpg [deleted file]
theme/standardblue/gradients.css [deleted file]
theme/standardblue/header.html [deleted file]
theme/standardblue/styles.php [deleted file]
theme/standardgreen/config.php [deleted file]
theme/standardgreen/favicon.ico [deleted file]
theme/standardgreen/footer.html [deleted file]
theme/standardgreen/gradient.jpg [deleted file]
theme/standardgreen/gradients.css [deleted file]
theme/standardgreen/header.html [deleted file]
theme/standardgreen/styles.php [deleted file]
theme/standardlogo/README.html [deleted file]
theme/standardlogo/config.php [deleted file]
theme/standardlogo/favicon.ico [deleted file]
theme/standardlogo/footer.html [deleted file]
theme/standardlogo/gradient.jpg [deleted file]
theme/standardlogo/header.html [deleted file]
theme/standardlogo/logo.gif [deleted file]
theme/standardlogo/styles.php [deleted file]
theme/standardred/config.php [deleted file]
theme/standardred/favicon.ico [deleted file]
theme/standardred/footer.html [deleted file]
theme/standardred/gradient.jpg [deleted file]
theme/standardred/gradients.css [deleted file]
theme/standardred/header.html [deleted file]
theme/standardred/styles.php [deleted file]
theme/standardwhite/config.php [deleted file]
theme/standardwhite/favicon.ico [deleted file]
theme/standardwhite/footer.html [deleted file]
theme/standardwhite/gradient.jpg [deleted file]
theme/standardwhite/gradients.css [deleted file]
theme/standardwhite/header.html [deleted file]
theme/standardwhite/styles.php [deleted file]
theme/styles.php
theme/styles_debug.php [new file with mode: 0644]
theme/wood/styles.php
user/editadvanced.php
webservice/wsdoc.php

index 7d2c9e486447c2a9d570add5d84f643f5e45b138..5b38998936f3bfc28d2c7bff78c2469c93054b3e 100644 (file)
@@ -8,7 +8,7 @@ require_once($CFG->dirroot.'/mod/forum/lib.php');
 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);
 
index c4b8e5eb7e5834ad190d2f722d92378d4293539e..eb04b8b59698e8e5e034b33c0f0aa206c3705014 100644 (file)
@@ -110,7 +110,6 @@ $CFG->dirroot              = str_replace('\\', '/', dirname(dirname(dirname(__FI
 $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;
@@ -262,7 +261,6 @@ if ($interactive) {
 }
 $CFG->wwwroot       = $wwwroot;
 $CFG->httpswwwroot  = $CFG->wwwroot;
-$CFG->httpsthemewww = $CFG->wwwroot;
 
 
 //We need dataroot before lang download
index d743cd295e9ea0e2d1caf4e8485b5bf7aac983d7..63f48c5b6f59be8cce9d605eb271327da38a5e17 100755 (executable)
@@ -1334,7 +1334,7 @@ if (isset($argv) && isset($argc)) {
     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();
index 909bfe3d69098e8c17f9a077e9d9133383c07a24..46c4bd4ab70dfb29bf43a0eb43936e6afc35ccbd 100644 (file)
@@ -107,7 +107,7 @@ $origxmlstrictheaders = !empty($CFG->xmlstrictheaders);
 $CFG->xmlstrictheaders = false;
 
 if (!core_tables_exist()) {
-    $PAGE->set_generaltype('maintenance');
+    $PAGE->set_pagelayout('maintenance');
 
     // fake some settings
     $CFG->docroot = 'http://docs.moodle.org';
@@ -188,7 +188,7 @@ if (empty($CFG->version)) {
 }
 
 if ($version > $CFG->version) {  // upgrade
-    $PAGE->set_generaltype('maintenance');
+    $PAGE->set_pagelayout('maintenance');
 
     $a->oldversion = "$CFG->release ($CFG->version)";
     $a->newversion = "$release ($version)";
index c9fbbc1a22245cce1c06e317cceba23b50e163ef..744cee1860c7390fbd6529b37f613d16c02cf1bb 100755 (executable)
         }
 
     /// Print the form.
-        check_theme_arrows();
 ?>
 <form id="assignform" method="post" action="<?php echo $baseurl . '&amp;roleid=' . $roleid ?>"><div>
   <input type="hidden" name="sesskey" value="<?php echo sesskey() ?>" />
index 96759634616f936e1e438b5a4a32e44ca646c6f0..180c98dc021e1fa2b4739ec9d9def902050755db 100644 (file)
@@ -8,6 +8,9 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
     // "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));
@@ -23,6 +26,14 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
     $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());
@@ -132,3 +143,4 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
     $ADMIN->add('appearance', new admin_externalpage('managetags', get_string('managetags', 'tag'), "$CFG->wwwroot/tag/manage.php"));
 
 } // end of speedup
+
index 6fb46f29f3d1e1339d70c3f48b4702ddfe3df76d..70ad9c9ec392584f23e224bb35a74d0947cb4c80 100644 (file)
@@ -9,7 +9,6 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
 
     $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);
index 852f80aaab20a144109d074e89ad2be05fef4eb3..f5d6f09a60abb75cfff7defe342efda0faeb15d4 100644 (file)
@@ -4,10 +4,7 @@
  * 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')) {
@@ -136,6 +133,9 @@ if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext))
         }
     }
 
+
+    //== 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";
@@ -222,9 +222,7 @@ if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext))
     $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');
@@ -236,6 +234,7 @@ if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext))
                         'moodle/site:config');
         }
     }
+}
 
     // Web services
     $ADMIN->add('modules', new admin_category('webservicesettings', get_string('webservices', 'webservice')));
@@ -264,6 +263,7 @@ if ($hassiteconfig || has_capability('moodle/question:config', $systemcontext))
         }
     }
 
+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());
index 4a800a4851352c1f8fa9b3e5be6a2d59a5ba55dd..da9b3bf2b95b95c5994e2bf9dbf3d7f49fd45b4c 100644 (file)
@@ -13,7 +13,7 @@ require_login(0, false);
 
 $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()) {
index 4e79e3b1db7bf9366fdc30c481642a786e92449c..0b022d858e22d0a6e3fc43055c8f507d7b52c59c 100644 (file)
@@ -73,8 +73,6 @@ $alloweduserselector = new service_user_selector('removeselect', array('servicei
                 }
         }
 /// Print the form.
-    check_theme_arrows();
-
 /// display the UI
 ?>
 <form id="assignform" method="post" action="service_users.php?id=<?php echo $id ?>"><div>
index 58c7882873eecd692b68ab4c9b1b97441e74447f..b37d1f9558e162c6855a2af79f55ef122d7479d9 100644 (file)
@@ -29,7 +29,7 @@ httpsrequired();
         $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");
@@ -82,7 +82,7 @@ httpsrequired();
     $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");
index 585b88b5290d7b0eeb31d4d770a05e6d44175ad5..2f29bb9b8b791bca0d1e385e5fc2fbd72539d707 100644 (file)
@@ -9288,9 +9288,10 @@ WHERE
         $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);
 
@@ -9299,7 +9300,7 @@ WHERE
         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/>");
index e4a0d2b5a39649282afab5559785bbbaf88ae1e8..9586b8e1cd305523d4c6fff23f1c37b252672006 100644 (file)
@@ -88,6 +88,7 @@ class block_global_navigation_tree extends block_tree {
         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
index b43f7c1b0787f536a5b0a2444fb391fa7f39e71f..03db833cd2371bdaa606b97f66816d1455a1e60d 100644 (file)
@@ -815,7 +815,7 @@ class block_tree extends block_list {
      *
      * 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) {
index a67da8965e7b9fa0396f98c57b95078c76bd132d..e451e3509ce5b78324dcdfa849057ffdd329238c 100644 (file)
@@ -175,7 +175,7 @@ if ($returnurl) {
 $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;
index 66482e35aabfa9860a8c03cd30e89880745a4774..8181c9b9e6271a95cbc41c6ea0dc604aaca72ad9 100644 (file)
@@ -78,7 +78,7 @@ $feeds = $DB->get_records_select('block_rss_client', $select, null, $DB->sql_ord
 
 $strmanage = get_string('managefeeds', 'block_rss_client');
 
-$PAGE->set_generaltype('form');
+$PAGE->set_pagelayout('form');
 $PAGE->set_title($strmanage);
 $PAGE->set_heading($strmanage);
 
index 5da40c8fd9b0b696aa35f1581088c910d2b72a73..fa7ce070fb52d55105240e771a3a42ff0828e9ca 100644 (file)
@@ -55,7 +55,7 @@ if ($returnurl) {
     $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);
 
index 704eeb37f6829f5c22d88e7f012910424f252e1d..881f54ed4932a037d9f1821cb9f5fea818c56273 100644 (file)
@@ -87,6 +87,7 @@ class block_settings_navigation_tree extends block_tree {
         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++;
 
index 256cc2532a11d96b3b38d04c8802a2fdf4edd3bb..f7239e1c06ab8b6bf6be1c652d262a9e0eed4614 100644 (file)
@@ -11,6 +11,9 @@ required changes in code:
 * 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:
 *
index 5ca172f525c2a6b42034581d63570115801fd363..e40a87b58aa65f6b9d746c9a2f94015140d88917 100644 (file)
@@ -719,7 +719,7 @@ function calendar_get_events($tstart, $tend, $users, $groups, $courses, $withdur
 }
 
 function calendar_top_controls($type, $data) {
-    global $CFG, $CALENDARDAYS, $THEME;
+    global $CFG, $CALENDARDAYS;
     $content = '';
     if(!isset($data['d'])) {
         $data['d'] = 1;
index c02dcde6dfe47539c65ebe9f9a4ca225b8ad2c09..be7f4f603c44908892aee855a0c69d0b3ae9d626 100644 (file)
@@ -9,7 +9,7 @@
     $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
index 403c344746532e5d1024af8fb7e27617d4254479..2828982e2ec00c32c932457ec01c34a18257949e 100644 (file)
@@ -19,7 +19,6 @@
           ?>
           </select></td>
       <td valign="top">
-        <?php check_theme_arrows(); ?>
         <p class="arrow_button">
             <input name="add" id="add" type="submit" value="<?php echo '&nbsp;'.$THEME->larrow.' &nbsp; &nbsp; '.get_string('add'); ?>" title="<?php print_string('add'); ?>" />
             <br />
index dbf7f90e49904a7b54f5805bc4364eab3f1b42e0..cd0a31411ec81ec0c482dcfa1589ab939fbfa4d5 100644 (file)
@@ -1383,12 +1383,12 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
                 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!
@@ -2924,12 +2924,12 @@ function make_editing_buttons($mod, $absolute=false, $moveselect=true, $indent=-
     $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) {
index d6d898f08307f389b9ebd02331ddefe1a8c63daf..b464229c2b15567863996cd8355d9dcb1d79ca8c 100644 (file)
@@ -35,7 +35,7 @@
     $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)) {
index f59b1a69b38c78f97518f00642a9b0492cd1a61c..828c8aeb4e5ecb48114d5290c30b62ce9a031ba0 100644 (file)
@@ -30,7 +30,7 @@
     $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);
index b740707fded9751e2647926e53d526d609ead6ce..6ed85aec7d5f6224d87081d088708ab49915491b 100644 (file)
@@ -127,7 +127,7 @@ foreach ($cms as $cm) {
     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
index 7855be202ec99e3c02402f7925156835dab601cc..6bae6db916fc5080dc986b0371b6a3952f92ac11 100644 (file)
@@ -90,6 +90,7 @@
     }
 
     $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()) {
index 4f665e1a41a617290630eae83c2e2a60ce11453d..a41cfe123e7de5d7f85d7816a701027898fcef48 100644 (file)
@@ -48,7 +48,7 @@ var $errormsg;
 * @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');
@@ -134,7 +134,7 @@ function print_entry($course) {
 * @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 = '';
index a4a625160f3f148d5e4d1ed79b8db74389dfa6ba..baf1ede4edb0eb208f94ca2c9e0f5a2f6b793ea7 100644 (file)
@@ -129,7 +129,6 @@ if ($data = data_submitted() and confirm_sesskey()) {
 /// Print header
 print_grade_page_head($COURSE->id, 'outcome', 'course');
 
-check_theme_arrows();
 require('course_form.html');
 
 echo $OUTPUT->footer();
index 53fbd9d2ffe3b9f402ec468d319058cb2e21d7b8..b85059638a9702dc12fa57a501fe28488469b297 100644 (file)
@@ -36,7 +36,6 @@ $PAGE->requires->yui_lib('element');
 $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);
index 41f91128f8bbca07dcdc9b812ac73eae35614047..45077255c7ef0d34803d80a85c503fafbf8f0fa3 100644 (file)
@@ -803,13 +803,12 @@ class grade_plugin_info {
  * @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);
@@ -826,13 +825,6 @@ function print_grade_page_head($courseid, $active_type, $active_plugin=null,
         $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);
 
index 6ad521dd7c90db5baf268ebf4899125c333a6302..3a4213e6a723ca330063ab219ef061c86c87abcd 100644 (file)
@@ -35,7 +35,6 @@ $toggle        = optional_param('toggle', NULL, PARAM_INT);
 $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))) {
index 80d7c07c730ab6eea72d075f2e35847535cb78c4..4919e84462880223d644c7cc8dd4cd484dae8520 100644 (file)
@@ -217,8 +217,8 @@ class grade_report_grader extends grade_report {
                     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');
diff --git a/grade/report/styles.css b/grade/report/styles.css
deleted file mode 100644 (file)
index d179694..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#content #siteconfiglink {
- text-align: right;
-}
-
index f2a3d0247e8f01b8390021b4e3b0794d5e91de29..32381ea2fb8692111ebd6b912cdbbdcf85fa53bc 100644 (file)
@@ -147,7 +147,6 @@ echo $OUTPUT->header();
           </select></td>
       <td valign="top">
 
-        <?php check_theme_arrows(); ?>
         <p class="arrow_button">
             <input name="add" id="add" type="submit" value="<?php echo '&nbsp;'.$THEME->larrow.' &nbsp; &nbsp; '.get_string('add'); ?>" title="<?php print_string('add'); ?>" />
             <br />
index 476acc31660f90a73b9b5f207ef7a7840de80929..1564460aab4eb036efadc7aab65626bba77468c1 100644 (file)
@@ -87,7 +87,6 @@ $PAGE->set_title("$course->shortname: $strgroups");
 $PAGE->set_heading($course->fullname);
 $PAGE->set_headingmenu(user_login_string($course, $USER));
 echo $OUTPUT->header();
-check_theme_arrows();
 ?>
 
 <div id="addmembersform">
index bc0b6b3967744ee469c5e2652bb87b7abdc63d5d..cc4eba7f1ce42d38cf7614738876b698c1364c2a 100644 (file)
--- a/help.php
+++ b/help.php
@@ -113,7 +113,7 @@ if(preg_match('~(##emoticons_html##)~', $output, $matches)) {
 }
 
 // Do the main output.
-$PAGE->set_generaltype('popup');
+$PAGE->set_pagelayout('popup');
 $PAGE->set_title($title);
 echo $OUTPUT->header();
 echo $OUTPUT->box_start();
index 1caf8bef33dd26418c98921e10974aac740f3380..68a167c12d5c9bcc93e83d357ab6febff807e8b2 100644 (file)
--- a/index.php
+++ b/index.php
         $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) {
index ea5c18f4a2518102392960f57c7fea42f531ccd9..86882c45d3911c2cb3cb0c9fd091b180e4d1c6aa 100644 (file)
@@ -139,10 +139,7 @@ $CFG->lang                 = $config->lang;
 $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';
index 1cc15aed113f1bd3c79e195d8e740a52bec4d880..5db39aed51832cc3c81152255c8cf8a7c4057da6 100644 (file)
@@ -39,7 +39,7 @@ if (isset($CFG->iplookup)) {
 }
 
 $PAGE->set_url('iplookup/index.php', array('id'=>$ip, 'user'=>$user));
-$PAGE->set_generaltype('popup');
+$PAGE->set_pagelayout('popup');
 
 $info = array($ip);
 $note = array();
index 40e7d6521afcc900c1ff2e6302ad661473686ce2..a31d5e3a8a00ba63d5779dd576ab2e817e9a5e5d 100644 (file)
@@ -304,6 +304,8 @@ $string['configsupportemail'] = 'This email address will be published to users o
 $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.';
@@ -851,7 +853,9 @@ $string['tablenosave'] = 'Changes in table above are saved automatically.';
 $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';
index 5ffdae2bf93aa02e0090866af95e7842a16791df..cfaf9c980d448efa2ec3ba6873b6967eb5a6d7e3 100644 (file)
@@ -1,5 +1,5 @@
-<?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';
index e9bb4a4167d7ae1beadd653ed43033b9b92674b7..08cad4d3aa950e6184695cf5936059001b6a327f 100644 (file)
@@ -5185,6 +5185,12 @@ function admin_externalpage_setup($section, $extrabutton = '',
     $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
 
@@ -5222,7 +5228,7 @@ function admin_externalpage_setup($section, $extrabutton = '',
  * @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
index b4fe79c5ecdada0c71158773c2d65f69dd38b191..86bf646acecf726355d926f3af57e1377278991a 100644 (file)
@@ -32,7 +32,7 @@
  * @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
@@ -41,7 +41,9 @@ function setup_core_javascript(page_requirements_manager $requires) {
     $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;
@@ -74,7 +76,7 @@ function setup_core_javascript(page_requirements_manager $requires) {
  *
  * 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();
@@ -148,11 +150,6 @@ class page_requirements_manager {
      * 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.
      *
@@ -696,10 +693,7 @@ class required_js extends linked_requirement {
  *
  * 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
@@ -726,15 +720,10 @@ class required_yui_lib extends linked_requirement {
         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() {
@@ -1150,8 +1139,7 @@ function ajax_generate_script_tag($js) {
 
 
 /**
- * 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.
  *
@@ -1159,10 +1147,8 @@ function ajax_generate_script_tag($js) {
  * 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;
@@ -1171,99 +1157,53 @@ function ajax_resolve_yui_lib($libname) {
     // 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) {
@@ -1294,12 +1234,7 @@ function ajax_resolve_yui_lib($libname) {
         }
     }
 
-    $cssurls = array();
-    foreach ($cssfiles as $css) {
-        $cssurls[] = $libpath . $css;
-    }
-
-    return array($jsurls, $cssurls);
+    return $jsurls;
 }
 
 /**
index d235f5a5c39ac3752d892401820ad6835df0a484..0d7d8dc50dd4180ae838a8a474eebe35b4df1fa2 100644 (file)
@@ -296,22 +296,6 @@ class page_requirements_manager_test extends ajaxlib_unit_test_base {
         $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.
@@ -331,10 +315,10 @@ class page_requirements_manager_test extends ajaxlib_unit_test_base {
     }
 
     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() {
index b6e6489aa51577c5d1a51bc283bad8326ed6c608..7bb4d615ea2403d4fe8ca857cb5f294e991fa48f 100644 (file)
@@ -167,9 +167,9 @@ class block_manager {
      * @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);
     }
 
@@ -303,7 +303,7 @@ class block_manager {
      * 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) {
@@ -781,7 +781,7 @@ class block_manager {
      * 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.
      */
@@ -1056,7 +1056,7 @@ class block_manager {
         }
 
         $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));
@@ -1455,11 +1455,11 @@ function blocks_remove_inappropriate($course) {
     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;
     }
 
diff --git a/lib/configonlylib.php b/lib/configonlylib.php
new file mode 100644 (file)
index 0000000..3913232
--- /dev/null
@@ -0,0 +1,55 @@
+<?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;
+}
+
index 2f210f0c9d023e8d31e0326dbcdd8d5b6d71dc6d..f0e2a73e5df210f1c1e4a17e6986b3ae0843cc97 100644 (file)
@@ -49,7 +49,7 @@ function xmldb_main_install() {
         '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,
@@ -216,4 +216,6 @@ function xmldb_main_install() {
     set_role_contextlevels($guestrole,          get_default_contextlevels('guest'));
     set_role_contextlevels($userrole,           get_default_contextlevels('user'));
 
+    // init themes
+    set_config('themerev', 1);
 }
index 9e4d532cc63fa24a2c84af013fddec20698c88e0..6e013c4929795d470293b87fbc430c5a2bb0283c 100644 (file)
@@ -20,7 +20,7 @@
 // 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
 
index 05bd527da692fa257c216186aee1e26ce6e158fc..3be437d27a70b042a27e93cc4266bf8cdfa60a1a 100644 (file)
@@ -585,7 +585,7 @@ function get_current_group($courseid, $full = false) {
  * @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()');
 }
 
 
@@ -1720,33 +1720,6 @@ function make_mod_upload_directory($courseid) {
     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.
@@ -1777,25 +1750,6 @@ function current_theme() {
     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 .
@@ -1895,7 +1849,7 @@ function print_heading($text, $deprecated = '', $size = 2, $class = 'main', $ret
 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 {
@@ -2012,6 +1966,13 @@ function print_container_start($clearfix=false, $classes='', $idbase='', $return
     }
 }
 
+/**
+ * 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)
  *
@@ -2193,7 +2154,7 @@ function print_footer($course = NULL, $usercourse = NULL, $return = false) {
     // 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.');
     }
@@ -3702,8 +3663,6 @@ function build_navigation($extranavlinks, $cm = null) {
  * @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
 
@@ -3776,7 +3735,7 @@ function delete_event($id) {
 /**
  * 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
  */
diff --git a/lib/editor/tinymce/editor_styles.css b/lib/editor/tinymce/editor_styles.css
new file mode 100644 (file)
index 0000000..e69de29
index a55ec42ec3edc37b8e2a209f635a31d28845dcf5..0b93e7996ca5db8ce77f9522781248a11fb0a1b6 100644 (file)
@@ -74,8 +74,8 @@ class tinymce_texteditor extends texteditor {
         $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'])) {
index f650b692650d311d3836c8e69615571b3befdbd5..3e699678bd587596fc1ca50f56ba5625816a54e8 100644 (file)
@@ -2068,9 +2068,10 @@ function file_modify_html_header($text) {
     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')) {
index 5af8c22bc9cf53e8dc227f242c452361c2dcd900..bd4f3b6378f73b0c50500b1fcb06cfc388695358 100644 (file)
@@ -233,7 +233,7 @@ function install_print_help_page($help) {
     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" />
@@ -279,7 +279,7 @@ function install_print_header($config, $stagename, $heading, $stagetext) {
     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();
index 1328185c207d785d9a4b7bc3981ef36e06a82daa..be4183b20df3f26ce63b0b9f28f4c95697209ac3 100644 (file)
@@ -321,7 +321,7 @@ navigation_tree.prototype.move_to_sidebar_popout = function(e) {
             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);
                 }
@@ -406,7 +406,7 @@ navigation_tree.prototype.move_to_block_position = function(e) {
             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);
                 }
@@ -471,7 +471,7 @@ navigation_tab_panel.prototype.create_tab_panel = function () {
     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);
index c64271a640e4b7c1e1a5f43d834defa03f3eb3ba..a24683f40bef8b0ecb7890e646a1634d62669f50 100644 (file)
@@ -1385,3 +1385,17 @@ function update_progress_bar (id, width, pt, msg, es){
 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
index e11b6f51b2eb96bd2ee7713482fb136a4ef78789..44e7a3b77c74b5659f0f703b2df6c874764d4202 100644 (file)
@@ -6439,16 +6439,9 @@ function get_list_of_themes() {
         $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);
 
@@ -6709,7 +6702,12 @@ function get_component_directory($component, $fullpaths=true) {
     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);
     }
 
@@ -6747,7 +6745,8 @@ function get_plugin_types($fullpaths=true) {
                       '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) {
@@ -6759,19 +6758,13 @@ function get_plugin_types($fullpaths=true) {
             }
         }
 
-        // 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);
@@ -6780,10 +6773,9 @@ function get_plugin_types($fullpaths=true) {
 /**
  * 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');
@@ -6799,40 +6791,53 @@ function get_plugin_list($plugintype, $fullpaths=true) {
         $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);
@@ -6858,14 +6863,8 @@ function get_list_of_plugins($directory='mod', $exclude='', $basedir='') {
     $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;
@@ -6966,37 +6965,37 @@ function plugin_supports($type, $name, $feature, $default=null) {
     $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;
index a803792b3ea075a70ab8f5013d72f29ca4f19881..38473f7f9227280b700f6925ec4a12487aa9ac38 100644 (file)
@@ -433,7 +433,7 @@ class navigation_node {
                 $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);
             }
index f9faada944d99b41804a8df4571bf1af18119173..0ea766179511bb1823e0df0f80f68185b728e50c 100644 (file)
@@ -283,7 +283,7 @@ class html_label extends moodle_html_component {
 
 /**
  * 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
@@ -915,7 +915,7 @@ class html_field extends labelled_html_component {
 
 /**
  * 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:
index 66540cfe97c5059371ed7eb0c88d5eb605d30ae0..3fa552887e03f75b330645c9e2697fc13cd1b1f4 100644 (file)
@@ -45,26 +45,21 @@ interface renderer_factory {
     /**
      * 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.
@@ -74,6 +69,7 @@ interface renderer_factory {
     public function get_renderer($component, $page, $subtype=null);
 }
 
+
 /**
  * This is a base class to help you implement the renderer_factory interface.
  *
@@ -95,9 +91,10 @@ abstract class renderer_factory_base implements renderer_factory {
      * 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.
@@ -109,17 +106,24 @@ abstract class renderer_factory_base implements renderer_factory {
      * @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);
@@ -140,16 +144,16 @@ abstract class renderer_factory_base implements renderer_factory {
 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));
         }
     }
@@ -166,16 +170,16 @@ class standard_renderer_factory extends renderer_factory_base {
 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);
         }
     }
 }
@@ -188,11 +192,9 @@ class cli_renderer_factory extends standard_renderer_factory {
  * 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
@@ -204,129 +206,40 @@ class theme_overridden_renderer_factory extends standard_renderer_factory {
      * 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);
     }
 }
index 14dec6e4d5c41b87fa7731eeb6d40a7a57aee497..067fea2a1132da25888f60bc3089e9be8532c705 100644 (file)
 // 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="");
@@ -29,15 +40,46 @@ require_once($CFG->libdir.'/outputfactories.php');
 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.
@@ -60,144 +102,74 @@ require_once($CFG->libdir.'/outputrenderers.php');
  */
 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'
      *       ),
@@ -205,19 +177,9 @@ class theme_config {
      *   );
      * </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>
@@ -236,13 +198,6 @@ class theme_config {
      */
     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.
@@ -252,28 +207,13 @@ class theme_config {
     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 = '&#x25BA;' //OR '&rarr;';
-     *$THEME->larrow = '&#x25C4;' //OR '&larr;';
-     *$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 &lt; &gt; &raquo; - these are confusing for blind users.
-     */
-
     /**
      * Name of the renderer factory class to use.
      *
@@ -287,8 +227,7 @@ class theme_config {
      * <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.
@@ -296,63 +235,76 @@ class theme_config {
     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 &lt; &gt; &raquo; - 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 &lt; &gt; &raquo; - 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
@@ -364,384 +316,696 @@ class theme_config {
     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 &gt; &raquo;), 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 = '&#x25BA;';
+            $this->larrow = '&#x25C4;';
+            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 = '&#x25B6;';
+                $this->larrow = '&#x25C0;';
+            }
+            elseif (false !== strpos($uagent, 'Konqueror')) {
+                $this->rarrow = '&rarr;';
+                $this->larrow = '&larr;';
+            }
+            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 = '&gt;';
+                $this->larrow = '&lt;';
+            }
+
+        /// 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 &amp; 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 &amp; 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] .= '&amp;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.
  *
@@ -892,311 +1156,3 @@ class xhtml_container_stack {
         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";
-    }
-}
index 9c26d4f8f5945187f257d2db53fe3044f7b064cb..e88676de678a3222bf26e6b62a0a646b520a56bc 100644 (file)
@@ -37,7 +37,7 @@
  * @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. */
@@ -149,31 +149,27 @@ class moodle_renderer_base {
         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);
     }
 
     /**
@@ -220,198 +216,13 @@ class moodle_renderer_base {
 
 
 /**
- * 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()}. */
@@ -510,7 +321,14 @@ class moodle_core_renderer extends moodle_renderer_base {
             }
         }
 
-        /// 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();
@@ -519,9 +337,6 @@ class moodle_core_renderer extends moodle_renderer_base {
             $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();
 
@@ -698,28 +513,22 @@ class moodle_core_renderer extends moodle_renderer_base {
 
         $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;
         }
 
@@ -732,17 +541,15 @@ class moodle_core_renderer extends moodle_renderer_base {
     }
 
     /**
-     * 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.
@@ -750,131 +557,11 @@ class moodle_core_renderer extends moodle_renderer_base {
         $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;
     }
 
     /**
@@ -926,7 +613,7 @@ class moodle_core_renderer extends moodle_renderer_base {
         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));
@@ -1006,7 +693,7 @@ class moodle_core_renderer extends moodle_renderer_base {
             $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)));
         }
     }
 
@@ -1264,7 +951,7 @@ class moodle_core_renderer extends moodle_renderer_base {
         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)) {
@@ -1391,7 +1078,7 @@ class moodle_core_renderer extends moodle_renderer_base {
         $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();
@@ -1947,12 +1634,12 @@ class moodle_core_renderer extends moodle_renderer_base {
 
             // 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();
         }
@@ -1996,7 +1683,7 @@ class moodle_core_renderer extends moodle_renderer_base {
      */
     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));
     }
 
     /**
@@ -2139,7 +1826,7 @@ class moodle_core_renderer extends moodle_renderer_base {
             $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)) {
@@ -2248,7 +1935,7 @@ class moodle_core_renderer extends moodle_renderer_base {
             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);
     }
 
     /**
@@ -2271,7 +1958,7 @@ class moodle_core_renderer extends moodle_renderer_base {
     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)));
     }
 
     /**
@@ -2302,7 +1989,7 @@ class moodle_core_renderer extends moodle_renderer_base {
     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)));
     }
 
     /**
@@ -2382,7 +2069,7 @@ class moodle_core_renderer extends moodle_renderer_base {
     public function navbar() {
         return $this->page->navbar->content();
     }
-    }
+}
 
 
 /// RENDERERS
@@ -2396,7 +2083,7 @@ class moodle_core_renderer extends moodle_renderer_base {
  * @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
index a6316560449dfb009db43abbf4efeee4cfdf0170..3b34c2aaeaa52a3065a41444640f3129102e34d3 100644 (file)
@@ -39,7 +39,7 @@
  * @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>.
@@ -99,7 +99,14 @@ class moodle_page {
 
     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 = '';
 
@@ -156,7 +163,7 @@ class moodle_page {
      * 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;
 
@@ -284,12 +291,20 @@ class moodle_page {
     }
 
     /**
-     * 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;
     }
 
     /**
@@ -373,7 +388,7 @@ class moodle_page {
      * @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;
@@ -549,7 +564,7 @@ class moodle_page {
      */
     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 . '). ';
         }
@@ -682,14 +697,13 @@ class moodle_page {
     }
 
     /**
-     * @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;
     }
 
     /**
@@ -951,10 +965,8 @@ class moodle_page {
         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;
         }
     }
 
@@ -995,21 +1007,6 @@ class moodle_page {
         // 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();
     }
 
@@ -1035,15 +1032,14 @@ class moodle_page {
         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();
index 3b6a008be7572905f7253bc3112e13bfa1aee5e7..3e7f72fe9e54fe00e7ba76675112005ae85ee1d6 100644 (file)
@@ -33,7 +33,7 @@
 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()!
 //
index 1478abbba4478d2955ae4f4e89f86b4bd63ace66..2e2c9a3f5a3d0831779275c05ecbebfb4d39ce8b 100644 (file)
  * @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.
@@ -94,7 +102,7 @@ global $PAGE;
 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}
@@ -202,15 +210,9 @@ $CFG->config_php_settings = (array)$CFG;
 // 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
 
index d33816904956269dfee4bfd98cc3aaf584e607eb..b5dbca77fde730495372d14667a6efc0d420560d 100644 (file)
@@ -665,8 +665,6 @@ get_string('experimental', 'admin', NULL);
 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);
index 543029fee56fb356bae35e6842ecfa10b096a7fb..c6523a663c1af9636d21bebd5a4251d906873723 100644 (file)
@@ -665,8 +665,6 @@ old_get_string('experimental', '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);
index cf198ed386ea6ca5cc918758b8e9bc943b031ad1..19427acc3549db05bd88c9310001d41a3715fb28 100644 (file)
@@ -29,55 +29,6 @@ if (!defined('MOODLE_INTERNAL')) {
 }
 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.
@@ -96,11 +47,11 @@ class testable_renderer_factory extends renderer_factory_base {
         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);
     }
 }
 
@@ -111,7 +62,7 @@ class testable_renderer_factory extends renderer_factory_base {
  * @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);
     }
@@ -144,7 +95,7 @@ class moodle_mod_test_renderer extends moodle_core_renderer {
  * @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);
     }
@@ -177,39 +128,39 @@ class renderer_factory_base_test extends UnitTestCase {
 
     }
 
-    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');
     }
 }
 
@@ -237,55 +188,17 @@ class standard_renderer_factory_test extends UnitTestCase {
 
     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');
     }
 }
 
@@ -311,7 +224,7 @@ class testable_theme_overridden_renderer_factory extends theme_overridden_render
  * @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;
@@ -322,6 +235,7 @@ class theme_overridden_renderer_factory_test extends UnitTestCase {
     public function setUp() {
         global $CFG;
         parent::setUp();
+
         $this->originalcfgthemedir = $CFG->themedir;
 
         $this->workspace = 'temp/theme_overridden_renderer_factory_fixtures';
@@ -352,7 +266,7 @@ class theme_overridden_renderer_factory_test extends UnitTestCase {
     }
 
     protected function write_renderers_file($theme, $code) {
-        $filename = $theme->dir . '/renderers.php';
+        $filename = $theme->dir . '/lib.php';
         file_put_contents($filename, "<?php\n" . $code);
     }
 
@@ -404,15 +318,15 @@ class theme_overridden_renderer_factory_test extends UnitTestCase {
         $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);
 
@@ -422,7 +336,7 @@ class theme_overridden_renderer_factory_test extends UnitTestCase {
 
         // 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() {
@@ -432,7 +346,7 @@ class theme_overridden_renderer_factory_test extends UnitTestCase {
         $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);
 
@@ -449,10 +363,10 @@ class theme_overridden_renderer_factory_test extends UnitTestCase {
         $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);
 
@@ -462,199 +376,7 @@ class theme_overridden_renderer_factory_test extends UnitTestCase {
         // 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.
@@ -813,92 +535,20 @@ class xhtml_container_stack_test extends UnitTestCase {
     }
 }
 
-
-/**
- * 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() {
@@ -1139,7 +789,7 @@ class moodle_core_renderer_test extends UnitTestCase {
                  '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');
 
@@ -1147,7 +797,7 @@ class moodle_core_renderer_test extends UnitTestCase {
 
         $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);
 
     }
@@ -1249,7 +899,7 @@ class moodle_core_renderer_test extends UnitTestCase {
         $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);
@@ -1259,7 +909,7 @@ class moodle_core_renderer_test extends UnitTestCase {
         $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);
     }
 }
index f8be3ed64bb8ebfdd7eeff8916676ff6182ca901..d6f18124cd1187291e9fdb0d4c5f5e9d32d1c258 100644 (file)
@@ -177,9 +177,9 @@ class moodle_page_test extends UnitTestCase {
 
     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);
@@ -377,16 +377,16 @@ class moodle_page_test extends UnitTestCase {
         $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);
     }
 }
 
index 9b6992812131423d1da4c081bcda5ca444aef184..dc9d70ff527ca68481eb90866dc99e9474591e6c 100644 (file)
@@ -949,7 +949,7 @@ function upgrade_started($preinstall=false) {
     } 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);
index 70ec92371b24b0de55b81f1a449da9d103c38cdf..407b4b36fd207cae67936dd703eb6a7b7c5fbd4b 100644 (file)
@@ -1909,69 +1909,8 @@ function user_login_string($course=NULL, $user=NULL) {
     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 &gt; &raquo;), 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 = '►'; // &#x25BA;
-        $THEME->larrow = '◄'; // &#x25C4;
-        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 = '▶'; // &#x25B6;
-            $THEME->larrow = '◀'; // &#x25C0;
-        }
-        elseif (false !== strpos($uagent, 'Konqueror')) {
-            $THEME->rarrow = '→'; // &rarr;
-            $THEME->larrow = '←'; // &larr;
-        }
-        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 = '&gt;';
-            $THEME->larrow = '&lt;';
-        }
-
-    /// 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).
@@ -1982,7 +1921,6 @@ function check_theme_arrows() {
  */
 function link_arrow_right($text, $url='', $accesshide=false, $addclass='') {
     global $THEME;
-    check_theme_arrows();
     $arrowclass = 'arrow ';
     if (! $url) {
         $arrowclass .= $addclass;
@@ -2007,7 +1945,6 @@ function link_arrow_right($text, $url='', $accesshide=false, $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).
@@ -2018,7 +1955,6 @@ function link_arrow_right($text, $url='', $accesshide=false, $addclass='') {
  */
 function link_arrow_left($text, $url='', $accesshide=false, $addclass='') {
     global $THEME;
-    check_theme_arrows();
     $arrowclass = 'arrow ';
     if (! $url) {
         $arrowclass .= $addclass;
@@ -2802,7 +2738,7 @@ function redirect($url, $message='', $delay=-1) {
     }
 
     // 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;
@@ -2908,7 +2844,7 @@ function print_maintenance_message() {
     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();
index aa22f2a62dae0778ad542c2bc888a5719cb5ac31..cf15e9248c8954905c13caccbcc41d43400f319b 100644 (file)
@@ -4,9 +4,7 @@ from:
 
         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
index cfc577c2735667ae45580a8183d2722dd6790c13..cdacf129e0f8503c50733d2e464ca702319b074b 100755 (executable)
@@ -4,414 +4,4 @@ Code licensed under the BSD License:
 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
index 52ac5b5a92e24459665e9a980277787dfb0e09f3..ad09fdd5b62d96c6d365e5f0d0287751d36ef491 100644 (file)
@@ -32,6 +32,7 @@ $testcookies = optional_param('testcookies', 0, PARAM_BOOL); // request cookie t
 
 $context = get_context_instance(CONTEXT_SYSTEM);
 $PAGE->set_course($SITE);
+$PAGE->set_pagelayout('form');
 
 /// Initialize variables
 $errormsg = '';
index f391a123e496ba7e82a816b7e5fe60623b05a20e..49ebfc3b5f7738844422dace4c15dd2dedbb2248 100644 (file)
@@ -52,7 +52,7 @@
     }
 
     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);
@@ -72,7 +72,7 @@
      <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();
 
index df821717eaf7a42ac81850467eaa659bdb0a34c3..81e1b25647ef7f33d70d5fe59590be7290d959bd 100644 (file)
@@ -68,7 +68,7 @@ $PAGE->set_url($url);
 
 /// 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);
@@ -99,7 +99,7 @@ if ($tab == 'contacts') {
     $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">';
index 3731365ecf540c63273257c67423db079dc198c9..55f8e9fb84a0ae8a0b5a4b6dc9344b3b5d761fc8 100644 (file)
@@ -25,7 +25,7 @@ require('../config.php');
 
 @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();
index 992f457a266ce49e867756f342c96c8e49b92ad1..72fe08a568aa5c2b9e54d4f27117ca82cc2f8fca 100644 (file)
@@ -36,7 +36,7 @@ if (empty($CFG->messaging)) {
     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');
index 6e8541c107ede9060443f202a9cc1bdb96c28686..36228eff84bdcc561c925966a39c3b4d71e597f1 100644 (file)
@@ -37,7 +37,7 @@ if (empty($CFG->messaging)) {
 
 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');
 
index c6855ae1e2ad904b53d739a7e8d9c53155965b6c..8fc8048bac8cea39dc0521c6895d82a2e23eccb3 100644 (file)
@@ -86,7 +86,7 @@ if ($unblockcontact and confirm_sesskey()) {
 }
 
 //$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">';
diff --git a/mod/assignment/pix/icon.gif b/mod/assignment/pix/icon.gif
new file mode 100755 (executable)
index 0000000..0828117
Binary files /dev/null and b/mod/assignment/pix/icon.gif differ
index 19b0cd617d3781b500cb537d3d864ac2e7b17376..5c5015429209caa1a316be4ba7f297d04ae60356 100644 (file)
@@ -39,7 +39,7 @@ if ($assignment->assignmenttype != 'online') {
 $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');
diff --git a/mod/chat/chat.css b/mod/chat/chat.css
deleted file mode 100644 (file)
index 1ac39cb..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#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;
-}
index 4a75cec527e35fbdd7f760fe487efd5832b462d8..eeca5f131a1d06f8f01cd161bef936e3b9b70afa 100644 (file)
@@ -56,7 +56,7 @@ $str_title = format_string($course->shortname) . ": ".format_string($chat->name,
 $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');
@@ -93,9 +93,8 @@ $PAGE->requires->string_for_js('talk', 'chat');
 $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);
index 38f8f6cb155abb2cc8aa253d7a48ea3889acd725..13dc2b3c962b199eaade2df86d67466c2b12bf24 100644 (file)
@@ -43,8 +43,7 @@ if (!$cm = get_coursemodule_from_instance('chat', $chat->id, $course->id)) {
 $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
index d7d85d85c82d2492d6cd65b409c59a7e2da48ae6..8bd8c71c417626edd55ddc9f305c3e05260ea399 100644 (file)
@@ -33,7 +33,7 @@ $USER = $DB->get_record('user', array('id'=>$chatuser->userid));
 //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();
index a7df3425caaf6132d185f726ca3f189a3b481d21..9be9f65b809de7c3c263a81a4b7848395f472dab 100644 (file)
@@ -84,9 +84,10 @@ header("Refresh: $CFG->chat_refresh_room; url=$refreshurl");
 
 /// 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
index c83827f27bac16a24e1c1299aa42bafe5c7e99b4..97ecc0eb53f9d4e318bdb617fd4fcd85d81ca6d5 100644 (file)
@@ -79,9 +79,10 @@ header('Content-Type: text/html; charset=utf-8');
 
 /// 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">
index cf8555c57bf4439c17ede759d4ecb125213228a2..fcb32502f8c075d86dfef50f9bfc4d437476eba5 100644 (file)
@@ -24,7 +24,7 @@ if (!$USER = $DB->get_record('user', array('id'=>$chatuser->userid))) { // no op
     print_error('invaliduser');
 }
 
-$PAGE->set_generaltype('embedded');
+$PAGE->set_pagelayout('embedded');
 
 $USER->description = '';
 
diff --git a/mod/chat/pix/icon.gif b/mod/chat/pix/icon.gif
new file mode 100755 (executable)
index 0000000..cbaaca8
Binary files /dev/null and b/mod/chat/pix/icon.gif differ
similarity index 100%
rename from mod/choice/icon.gif
rename to mod/choice/pix/icon.gif
diff --git a/mod/choice/styles.php b/mod/choice/styles.php
deleted file mode 100644 (file)
index 57946ce..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-.mod-choice .results {
-  border-collapse: separate;
-}
-
-.mod-choice .results .data {
-  border-width:1px;
-  border-style:solid;
-  border-color:#999;
-}
index ebfba40b4b4773022e050fabd38e7ec3961b6b46..5b229eef4a627327e6b241da3f0594b0ea9d2e3e 100755 (executable)
@@ -430,7 +430,7 @@ class data_field_base {     // Base class for Database Field Types (see field/*/
         global $OUTPUT;
 
         $str = '<a href="field.php?d='.$this->data->id.'&amp;fid='.$this->field->id.'&amp;mode=display&amp;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;
     }
diff --git a/mod/data/pix/icon.gif b/mod/data/pix/icon.gif
new file mode 100755 (executable)
index 0000000..2aaeeb3
Binary files /dev/null and b/mod/data/pix/icon.gif differ
index fe1a44b22955a453f209f903e4492b61fe831d46..f0bd6cf4b6862bb14a50b6a7899820df304dcd4f 100644 (file)
@@ -329,13 +329,13 @@ function feedback_print_recent_mod_activity($activity, $courseid, $detail, $modn
     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">';
@@ -970,7 +970,7 @@ function feedback_create_item($data) {
 
     $item->template=0;
     if (isset($data->templateid)) {
-               $item->template = intval($data->templateid);
+            $item->template = intval($data->templateid);
     }
 
     $itemname = trim($data->itemname);
@@ -1024,7 +1024,7 @@ function feedback_update_item($item, $data = null){
 
         $item->required=0;
         if (isset($data->required)) {
-               $item->required=$data->required;
+            $item->required=$data->required;
         }
     }else {
         $item->name = $item->name;
@@ -2299,7 +2299,7 @@ function feedback_print_errors() {
     feedback_init_feedback_session();
 
     if(empty($SESSION->feedback->errors)) {
-               return;
+        return;
     }
 
     echo $OUTPUT->box_start('generalbox errorboxcontent boxaligncenter boxwidthnormal');
diff --git a/mod/feedback/pix/icon.gif b/mod/feedback/pix/icon.gif
new file mode 100644 (file)
index 0000000..8f43cc4
Binary files /dev/null and b/mod/feedback/pix/icon.gif differ
index 2d402592bf50befd46c3b66d283e58b16a77ea79..711b6c620463ce18fa27c8467ce167db602851b2 100644 (file)
@@ -73,17 +73,19 @@ function folder_htmllize_tree($dir, $folder, $context) {
  * @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 = "&nbsp;<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\" />&nbsp;".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 = "&nbsp;<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\" />&nbsp;".s($file->get_filename()).'</a>'.$downloadurl;
 }
 
 /**
similarity index 100%
rename from mod/folder/icon.gif
rename to mod/folder/pix/icon.gif
diff --git a/mod/forum/forum.css b/mod/forum/forum.css
deleted file mode 100644 (file)
index 4e2dde0..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#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
index f46492527933cdbbbe870d5ff53521e20bde4e16..6d7d805f6e77f1e46b00da70807ca26dc8a3ee20 100644 (file)
@@ -783,9 +783,10 @@ function forum_cron() {
                 $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" />';
 
@@ -1055,9 +1056,10 @@ function forum_make_mail_html($course, $cm, $forum, $discussion, $post, $userfro
     $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";
 
@@ -6197,7 +6199,7 @@ function forum_print_recent_mod_activity($activity, $courseid, $detail, $modname
     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}"
diff --git a/mod/forum/pix/icon.gif b/mod/forum/pix/icon.gif
new file mode 100755 (executable)
index 0000000..c727fd1
Binary files /dev/null and b/mod/forum/pix/icon.gif differ
index 597a8546c6478b3760fc1578c39c8a8cf516bb96..b55dd21dd2a12a65803594ff853d08d02a05527e 100644 (file)
@@ -94,7 +94,6 @@ if (data_submitted()) {
 $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) {
index 7c182b2934deedb29703df8ec982c0c1fa06288f..d58adfde9b73505a7f6fabda7c04fa8d7c798cb7 100644 (file)
@@ -953,12 +953,12 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode='',$h
             $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.'&amp;prevmode='.$mode.'&amp;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.'&amp;prevmode='.$mode.'&amp;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');
         }
@@ -1643,7 +1643,7 @@ function glossary_print_sorting_links($cm, $mode, $sortkey = '',$sortorder = '')
              $neworder = '&amp;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' ) {
@@ -1652,7 +1652,7 @@ function glossary_print_sorting_links($cm, $mode, $sortkey = '',$sortorder = '')
          } else {
              $newordertitle = $desc;
              $neworder = '&amp;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     = '';
diff --git a/mod/glossary/pix/asc.gif b/mod/glossary/pix/asc.gif
new file mode 100644 (file)
index 0000000..0cf757c
Binary files /dev/null and b/mod/glossary/pix/asc.gif differ
diff --git a/mod/glossary/pix/comment.gif b/mod/glossary/pix/comment.gif
new file mode 100644 (file)
index 0000000..b7c6f88
Binary files /dev/null and b/mod/glossary/pix/comment.gif differ
diff --git a/mod/glossary/pix/desc.gif b/mod/glossary/pix/desc.gif
new file mode 100644 (file)
index 0000000..74b25c8
Binary files /dev/null and b/mod/glossary/pix/desc.gif differ
diff --git a/mod/glossary/pix/export.gif b/mod/glossary/pix/export.gif
new file mode 100644 (file)
index 0000000..6368927
Binary files /dev/null and b/mod/glossary/pix/export.gif differ
diff --git a/mod/glossary/pix/icon.gif b/mod/glossary/pix/icon.gif
new file mode 100644 (file)
index 0000000..388a3e5
Binary files /dev/null and b/mod/glossary/pix/icon.gif differ
diff --git a/mod/glossary/pix/minus.gif b/mod/glossary/pix/minus.gif
new file mode 100644 (file)
index 0000000..bf50db9
Binary files /dev/null and b/mod/glossary/pix/minus.gif differ
diff --git a/mod/glossary/pix/print.gif b/mod/glossary/pix/print.gif
new file mode 100644 (file)
index 0000000..97428fd
Binary files /dev/null and b/mod/glossary/pix/print.gif differ
index 581c121d095a46e2562c779a01cb7c98cb644245..4f16a8cb1a325f161c60f557ae8d90948e5f33db 100644 (file)
@@ -314,7 +314,7 @@ if ($showcommonelements) {
         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&amp;mode=$mode&amp;hook=".urlencode($hook)."&amp;sortkey=$sortkey&amp;sortorder=$sortorder&amp;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&amp;mode=$mode&amp;hook=".urlencode($hook)."&amp;sortkey=$sortkey&amp;sortorder=$sortorder&amp;offset=$offset\"><img class=\"icon\" src=\"".$OUTPUT->old_icon_url('print', 'glossary')."\" alt=\"". get_string("printerfriendly","glossary") . "\" /></a>";
             echo '</span>';
 //                print_box_end();
         }
index 0561d802d8fbdfca5f6f629ea1296fd2fcdb5851..2bb46353394027d52fac7b5b4d87e377ed103628 100644 (file)
@@ -1267,7 +1267,7 @@ function hotpot_print_recent_mod_activity($activity, $course, $detail=false) {
 
     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
diff --git a/mod/hotpot/pix/icon.gif b/mod/hotpot/pix/icon.gif
new file mode 100644 (file)
index 0000000..463c065
Binary files /dev/null and b/mod/hotpot/pix/icon.gif differ
similarity index 100%
rename from mod/imscp/icon.gif
rename to mod/imscp/pix/icon.gif
index 6a0d55528c33384a7c4f828092ac2f4d1541aedc..e8ad427e2bc5ba7a06f002ece5e56e00a82c7236 100644 (file)
@@ -55,15 +55,14 @@ $PAGE->requires->yui_lib('container')->in_head();
 $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);
similarity index 100%
rename from mod/label/icon.gif
rename to mod/label/pix/icon.gif
diff --git a/mod/lesson/pix/icon.gif b/mod/lesson/pix/icon.gif
new file mode 100755 (executable)
index 0000000..1258793
Binary files /dev/null and b/mod/lesson/pix/icon.gif differ
index 55caa980ec5fb20c64fe5b7802c4fe76e75e7d2a..1fc348976566484d138e29249421eb68c9b37887 100644 (file)
@@ -92,7 +92,6 @@ class moodle_mod_lesson_renderer extends moodle_renderer_base {
         }
 
     /// 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);
similarity index 100%
rename from mod/page/icon.gif
rename to mod/page/pix/icon.gif
index 49e4770534b631f0a7e58f0f1d165c452e67a750..c0fd27976b24c93aed62a0e890e8934eaf8b5d12 100644 (file)
@@ -57,7 +57,7 @@ $PAGE->set_url('mod/page/view.php', array('id' => $cm->id));
 $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);
index 3e01d6e1d18e3e2baaa4a031b290d9121c8138b8..c3310139bda5414c1327c6c5f936f81a3c07c16b 100644 (file)
@@ -115,7 +115,7 @@ function module_specific_controls($totalnumber, $recurse, $category, $cmid, $cmo
 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;
index c4e73960c2df65fb500e2cc62ef3a3791c5b93cc..0caf62fc52e41bae161a1595bc6c2dc40c839e15 100644 (file)
@@ -749,7 +749,6 @@ function quiz_print_singlequestion($question, $returnurl, $quiz) {
  */
 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))) {
index d8e59e7f7c6e35302e029fa868851904ad553e03..c7dcb4f6b9546114fff2be96d4f0d749040e255f 100644 (file)
@@ -838,7 +838,7 @@ function quiz_print_recent_mod_activity($activity, $courseid, $detail, $modnames
     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>';
diff --git a/mod/quiz/pix/icon.gif b/mod/quiz/pix/icon.gif
new file mode 100755 (executable)
index 0000000..47b7040
Binary files /dev/null and b/mod/quiz/pix/icon.gif differ
index a9a3cddf0812557af9e5cfe9512f5c983bc98d44..58826a028b07d2fe6020725adc4f3019dbd4ecf3 100644 (file)
@@ -133,7 +133,6 @@ class quiz_responses_report extends quiz_default_report {
         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', '');
         }
 
index 8075b01591bdbe186d9a10795384295cde8bea8a..0c2b499459f5e4c35f04f69161f50c5373828545 100644 (file)
@@ -134,7 +134,7 @@ function resource_display_frame($resource, $cm, $course, $file) {
     $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);
diff --git a/mod/resource/pix/icon.gif b/mod/resource/pix/icon.gif
new file mode 100644 (file)
index 0000000..41edc0e
Binary files /dev/null and b/mod/resource/pix/icon.gif differ
index c5fab236e42ce26da2d895f7302f356671afa53c..e6fd331c92fbd87549fdf90d9a80a6e5c24cc678 100644 (file)
@@ -435,9 +435,9 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
                 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;
@@ -454,9 +454,9 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
                         $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')) {
@@ -470,7 +470,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
                         }
                         $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)) {
@@ -478,9 +478,9 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
                         }
                         $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) {
index 2f50dfb4d7b3c4a84c1ce5480fc0e2fe529c6d84..a852df4701bd3c8c948c7002b7acfd6061fbb433 100644 (file)
@@ -212,9 +212,9 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
                 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;
@@ -231,9 +231,9 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
                         $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')) {
@@ -248,7 +248,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
                         $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 {
@@ -257,9 +257,9 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
                         }
                         $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) {
index 329ba5e682eaf9741b55d7d8da4144b3cb17490c..bee59a9d9288b2bf87274c2d46a8a7839ddd33b3 100644 (file)
@@ -104,9 +104,9 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
                     $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;
@@ -123,9 +123,9 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
                         $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')) {
@@ -140,7 +140,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
                         $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 {
@@ -148,10 +148,10 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
                             $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').'" />';
                         }
                     }
 
index 154e4adec3cc0a6b1dc04cee9a43ad1123334cd2..e9df44b58de3b673e5906c148f629661281ea5ac 100755 (executable)
@@ -383,7 +383,7 @@ function scorm_user_complete($course, $user, $mod, $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) {
@@ -395,7 +395,7 @@ function scorm_user_complete($course, $user, $mod, $scorm) {
                                 $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;
@@ -406,9 +406,9 @@ function scorm_user_complete($course, $user, $mod, $scorm) {
                             }
                         } 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 .= "&nbsp;$sco->title $score$totaltime</li>\n";
index f15cc7e428f750d67018a2247f86e399dacdd6dc..705c32ec84087f8d245529421af3832528da9ebc 100755 (executable)
                 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');?>. &nbsp; <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');?>. &nbsp; <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() {
diff --git a/mod/scorm/pix/icon.gif b/mod/scorm/pix/icon.gif
new file mode 100755 (executable)
index 0000000..2e0c099
Binary files /dev/null and b/mod/scorm/pix/icon.gif differ
index 10b6560b1bbb22f8c619b8cb8282dacaa06f887d..3ac337e853c69fc2c760d4e812353f896971795f 100755 (executable)
                                     $detailslink = '&nbsp;';
                                 }
                                 $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.'" />&nbsp;'.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.'" />&nbsp;'.$trackdata->total_time.'<br />'.$scoreview.'<br />';
             echo '</div>'."\n";
             echo '<hr /><h2>'.get_string('details','scorm').'</h2>';
similarity index 100%
rename from mod/survey/icon.gif
rename to mod/survey/pix/icon.gif
index df03cfe523ff2e02d356fb7afe7ace0a88f80154..30df086fd085ccfc2086923744ced2759d92d571 100644 (file)
@@ -19,6 +19,10 @@ required changes in code:
 * 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
index d3dad2c1f0a1d831bd53a3df75cb708a8ea466cf..f914a3062d3a9e4067ccf724f228a424a68b796e 100644 (file)
@@ -139,7 +139,7 @@ function url_display_frame($url, $cm, $course) {
     $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);
diff --git a/mod/url/pix/icon.gif b/mod/url/pix/icon.gif
new file mode 100644 (file)
index 0000000..547358b
Binary files /dev/null and b/mod/url/pix/icon.gif differ
similarity index 100%
rename from mod/wiki/icon.gif
rename to mod/wiki/pix/icon.gif
index 4fea5a2f26c5efb8b2b9655c0968de230dae72a0..27ef6d3ed86120517afb577dafa9c8bb6b6a5231 100644 (file)
@@ -22,6 +22,7 @@
 
     $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()) {
diff --git a/pix/smartpix.php b/pix/smartpix.php
deleted file mode 100644 (file)
index dcebbef..0000000
+++ /dev/null
@@ -1,280 +0,0 @@
-<?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);
index 01f5936c1dd7853fc0905c2b1ab3c0040012b3af..53d1a010f0b6a133b550f7919ca98b578e1f22cf 100644 (file)
@@ -60,8 +60,6 @@
 
     // 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) {
index 0b27383d437041adc3b232e54a3628cc953a0842..2d5b356b0543c46b350397d3aa91fde416d33a6e 100644 (file)
@@ -32,7 +32,7 @@
         $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);
index 7559e1dacd5c569942ee1db3cec8454d52f6405a..a380815e615c45ed84d44ec5bdac76487b83f903 100644 (file)
@@ -875,13 +875,6 @@ class default_questiontype {
         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');
-        }
     }
 
     /**
index 1d04d9bcdebdd0cebd74a30cca7dd34a563cd5f2..f7e703441e9de540ae9a5569d91734979ee2bdd0 100755 (executable)
@@ -35,7 +35,7 @@ set_time_limit(0);
 require_login();
 
 // disable blocks in this page
-$PAGE->set_generaltype('embedded');
+$PAGE->set_pagelayout('embedded');
 
 // general parameters
 $action      = optional_param('action', '',        PARAM_ALPHA);
index 7d8d303b8ddb9ebe728eaddf4b6b3184b0df8b82..2e7cee78f3012a0892e94ed38af57fc0b3da1090 100644 (file)
@@ -1777,12 +1777,9 @@ function repository_head_setup() {
     $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();
+
 }
 
 /**
index c1c45c266d99dadbd848742f6c4b2839c607e257..c1190965848bb800962239bca83f35f878bb306b 100755 (executable)
@@ -120,7 +120,7 @@ class repository_local extends repository {
                             'size' => 0,
                             'date' => '',
                             'source'=> $params,
-                            'thumbnail' => $OUTPUT->old_icon_url($icon)
+                            'thumbnail' => $OUTPUT->old_icon_url($icon),
                         );
                         $list[] = $node;
                     }
diff --git a/repository/repository.css b/repository/repository.css
deleted file mode 100644 (file)
index cc4937f..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/* 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{}
-*/
index f05f1d60fbba84e062c2cc1beab1c9b90c585c47..4c302d0c114343e56b952f75673a5c1f76cc8ebf 100644 (file)
                 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>' : '' ;
 
index a282b8f554536abb4836ab5ee5bdce31f6ffdb55..4a0442739246fe389b7f978abceac80df7532fb0 100644 (file)
@@ -31,7 +31,7 @@ $PAGE->set_url('tag/index.php', array('id' => $tag->id));
 $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');
index a941dadc6d2668766972504c8994a5b2e60a06dc..94a76f946d28a6371fdc75fb849414cbfbb1de0a 100644 (file)
@@ -25,5 +25,4 @@
  * @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...');
diff --git a/theme/base/config.php b/theme/base/config.php
new file mode 100644 (file)
index 0000000..d3a626e
--- /dev/null
@@ -0,0 +1,123 @@
+<?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),
+    ),
+);
+
similarity index 72%
rename from theme/standard/layout-embedded.php
rename to theme/base/layout/embedded.php
index 663db71b4fe83cfb8126c02921daa3d4f4a9007e..250da5714a80612ce14d39c4030fb8c6187fe351 100644 (file)
@@ -2,22 +2,22 @@
 <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
diff --git a/theme/base/layout/general.php b/theme/base/layout/general.php
new file mode 100644 (file)
index 0000000..5fc4ee5
--- /dev/null
@@ -0,0 +1,77 @@
+<?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
diff --git a/theme/base/layout/home.php b/theme/base/layout/home.php
new file mode 100644 (file)
index 0000000..965c618
--- /dev/null
@@ -0,0 +1,73 @@
+<?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
diff --git a/theme/base/pix/screenshot.jpg b/theme/base/pix/screenshot.jpg
new file mode 100755 (executable)
index 0000000..de80b0e
Binary files /dev/null and b/theme/base/pix/screenshot.jpg differ
diff --git a/theme/base/style/block_calendar_month.css b/theme/base/style/block_calendar_month.css
new file mode 100644 (file)
index 0000000..ab9b05f
--- /dev/null
@@ -0,0 +1,29 @@
+.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;
+}
diff --git a/theme/base/style/blocks.css b/theme/base/style/blocks.css
new file mode 100644 (file)
index 0000000..f37f39b
--- /dev/null
@@ -0,0 +1,134 @@
+
+/** 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;
+}
diff --git a/theme/base/style/core.css b/theme/base/style/core.css
new file mode 100644 (file)
index 0000000..be4b6bd
--- /dev/null
@@ -0,0 +1,136 @@
+/***
+ * 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;
+}
diff --git a/theme/base/style/pagelayout.css b/theme/base/style/pagelayout.css
new file mode 100644 (file)
index 0000000..1a0caff
--- /dev/null
@@ -0,0 +1,162 @@
+
+#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;
+}
index a941dadc6d2668766972504c8994a5b2e60a06dc..94a76f946d28a6371fdc75fb849414cbfbb1de0a 100644 (file)
@@ -25,5 +25,4 @@
  * @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...');
index a941dadc6d2668766972504c8994a5b2e60a06dc..94a76f946d28a6371fdc75fb849414cbfbb1de0a 100755 (executable)
@@ -25,5 +25,4 @@
  * @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...');
index a941dadc6d2668766972504c8994a5b2e60a06dc..94a76f946d28a6371fdc75fb849414cbfbb1de0a 100644 (file)
@@ -25,5 +25,4 @@
  * @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...');
diff --git a/theme/custom_corners/lib.php b/theme/custom_corners/lib.php
new file mode 100644 (file)
index 0000000..91079b4
--- /dev/null
@@ -0,0 +1,26 @@
+<?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);
+    }
+}
index a941dadc6d2668766972504c8994a5b2e60a06dc..94a76f946d28a6371fdc75fb849414cbfbb1de0a 100644 (file)
@@ -25,5 +25,4 @@
  * @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...');
index a941dadc6d2668766972504c8994a5b2e60a06dc..3147448de8c2904720c0a5fbca6f3460dcb6c9c2 100644 (file)
@@ -25,5 +25,4 @@
  * @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
diff --git a/theme/image.php b/theme/image.php
new file mode 100644 (file)
index 0000000..27ccacf
--- /dev/null
@@ -0,0 +1,175 @@
+<?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
index 139409e3eaf0a13c06ab35753990aef8f5188aa6..61dff8439cca0ef6609f5c1ce873caf41a42d786 100644 (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');
 
@@ -65,71 +59,43 @@ if ($choose and confirm_sesskey()) {
 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;
@@ -143,4 +109,4 @@ foreach ($themes as $themename => $themedir) {
 echo $OUTPUT->table($table);
 
 echo $OUTPUT->footer();
-?>
+
index a941dadc6d2668766972504c8994a5b2e60a06dc..94a76f946d28a6371fdc75fb849414cbfbb1de0a 100755 (executable)
@@ -25,5 +25,4 @@
  * @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...');
index a941dadc6d2668766972504c8994a5b2e60a06dc..94a76f946d28a6371fdc75fb849414cbfbb1de0a 100644 (file)
@@ -25,5 +25,4 @@
  * @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...');
index a941dadc6d2668766972504c8994a5b2e60a06dc..94a76f946d28a6371fdc75fb849414cbfbb1de0a 100644 (file)
@@ -25,5 +25,4 @@
  * @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...');
index a941dadc6d2668766972504c8994a5b2e60a06dc..94a76f946d28a6371fdc75fb849414cbfbb1de0a 100644 (file)
@@ -25,5 +25,4 @@
  * @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...');
index a941dadc6d2668766972504c8994a5b2e60a06dc..1f4e47d0ca8d5c9f388b4aad0e0fdff3aac229f2 100644 (file)
@@ -25,5 +25,4 @@
  * @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
diff --git a/theme/preview.php b/theme/preview.php
deleted file mode 100644 (file)
index 30fb709..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-<?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();
diff --git a/theme/standard/README.html b/theme/standard/README.html
deleted file mode 100644 (file)
index c614124..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<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>
index 1b64146664a45ac4d20c40ba36c718eb6493660c..1afa85babf8004e655ac2da5ee631e4a57c6c115 100644 (file)
 /**
  * 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 = '&#x25BA;' //OR '&rarr;';
-//$THEME->larrow = '&#x25C4;' //OR '&larr;';
-//$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.
diff --git a/theme/standard/footer.html b/theme/standard/footer.html
deleted file mode 100644 (file)
index eedcbde..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<?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&amp;ss=1&amp;uri=<?php echo urlencode(qualified_me()) ?>">Validate HTML</a></li>
-          <li><a href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=-1&amp;url1=<?php echo urlencode(qualified_me()) ?>">Section 508 Check</a></li>
-          <li><a href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=0&amp;warnp2n3e=1&amp;url1=<?php echo urlencode(qualified_me()) ?>">WCAG 1 (2,3) Check</a></li>
-        </ul></div>
-<?php }
-
-    echo $OUTPUT->container_end();
-?>
-
-</div>
-</body>
-</html>
diff --git a/theme/standard/gradient.jpg b/theme/standard/gradient.jpg
deleted file mode 100755 (executable)
index e389b3c..0000000
Binary files a/theme/standard/gradient.jpg and /dev/null differ
diff --git a/theme/standard/header.html b/theme/standard/header.html
deleted file mode 100644 (file)
index 86dac63..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<!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'); ?>
similarity index 85%
rename from theme/standard/layout-popup.php
rename to theme/standard/layout/embedded.php
index 8eaf1d9be3c292a2b59c858ef929ea5c6e2a1d7b..94cde55734b64f723b91589a83cacd9a258f8fc8 100644 (file)
@@ -2,7 +2,7 @@
 <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() ?>
similarity index 85%
rename from theme/standard/layout-topframe.php
rename to theme/standard/layout/frametop.php
index 8eaf1d9be3c292a2b59c858ef929ea5c6e2a1d7b..94cde55734b64f723b91589a83cacd9a258f8fc8 100644 (file)
@@ -2,7 +2,7 @@
 <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() ?>
similarity index 90%
rename from theme/standard/layout-home.php
rename to theme/standard/layout/home.php
index eef0391605eafbbd61127cb2a3498ab899073ea6..fd5ceb9f7b6c76351cd32fa95e57594652d8fc01 100644 (file)
@@ -1,10 +1,10 @@
 <?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>
@@ -35,7 +34,7 @@
             </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">
diff --git a/theme/standard/layout/minimal.php b/theme/standard/layout/minimal.php
new file mode 100644 (file)
index 0000000..309fd9b
--- /dev/null
@@ -0,0 +1,33 @@
+<?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
similarity index 93%
rename from theme/standard/layout.php
rename to theme/standard/layout/normal.php
index c379ee32bcccadd99a932e25b1fa108c0277a412..c00eeab82f07e86b8d10c82b24851ec298a18f66 100644 (file)
@@ -2,7 +2,7 @@
 <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 ?>">
@@ -38,7 +38,7 @@
             </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">
diff --git a/theme/standard/meta.php b/theme/standard/meta.php
deleted file mode 100644 (file)
index a333f19..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<!--[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]-->
diff --git a/theme/standard/rtl.css b/theme/standard/rtl.css
deleted file mode 100755 (executable)
index a143847..0000000
+++ /dev/null
@@ -1,643 +0,0 @@
-/*******************************************************************
- 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;
-}
diff --git a/theme/standard/style/block_calendar_month.css b/theme/standard/style/block_calendar_month.css
new file mode 100644 (file)
index 0000000..9ae6d96
--- /dev/null
@@ -0,0 +1,23 @@
+.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;
+}
diff --git a/theme/standard/style/block_course_summary.css b/theme/standard/style/block_course_summary.css
new file mode 100644 (file)
index 0000000..0c71c3d
--- /dev/null
@@ -0,0 +1,7 @@
+.block_course_summary .content {
+    padding:10px;
+}
+
+.block_course_summary .editbutton {
+    text-align:right;
+}
similarity index 99%
rename from blocks/quiz_results/styles.php
rename to theme/standard/style/block_quiz_results.css
index 02611747061b5b6307722781da6d3f14eeb6d137..db797442e213cc970f4c9819066cb471638fdf03 100644 (file)
@@ -23,4 +23,4 @@
     margin: 4px;
     font-weight: bold;
     font-size: 1.1em;
-}
+}
\ No newline at end of file
diff --git a/theme/standard/style/block_rss_client.css b/theme/standard/style/block_rss_client.css
new file mode 100644 (file)
index 0000000..35298cf
--- /dev/null
@@ -0,0 +1,54 @@
+.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;
+}
diff --git a/theme/standard/style/block_tags.css b/theme/standard/style/block_tags.css
new file mode 100644 (file)
index 0000000..e7344b1
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * 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%;
+}
diff --git a/theme/standard/style/blog_tags.css b/theme/standard/style/blog_tags.css
new file mode 100644 (file)
index 0000000..15594fb
--- /dev/null
@@ -0,0 +1,68 @@
+.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;
+}
similarity index 85%
rename from grade/edit/tree/tree.css
rename to theme/standard/style/gradebook.css
index 69a67be50dae8ee74ce5c592210f84646d0f0908..10e35e7f58269e065525b93c24aaadcc9a6b5a6c 100755 (executable)
     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;
 }
 
@@ -58,13 +58,13 @@ img.icon {
     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;
 }
@@ -103,23 +103,23 @@ img.icon {
     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;
 }
diff --git a/theme/standard/style/mod_assignment.css b/theme/standard/style/mod_assignment.css
new file mode 100644 (file)
index 0000000..05a16f3
--- /dev/null
@@ -0,0 +1,202 @@
+.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;
+}
+
diff --git a/theme/standard/style/mod_chat.css b/theme/standard/style/mod_chat.css
new file mode 100644 (file)
index 0000000..60e82c7
--- /dev/null
@@ -0,0 +1,164 @@
+
+/***
+ *** 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;
+}
diff --git a/theme/standard/style/mod_choice.css b/theme/standard/style/mod_choice.css
new file mode 100644 (file)
index 0000000..9065497
--- /dev/null
@@ -0,0 +1,56 @@
+.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;
+}
+
+
+
diff --git a/theme/standard/style/mod_data.css b/theme/standard/style/mod_data.css
new file mode 100644 (file)
index 0000000..2ff3cc6
--- /dev/null
@@ -0,0 +1,63 @@
+.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;
+}
diff --git a/theme/standard/style/mod_feedback.css b/theme/standard/style/mod_feedback.css
new file mode 100644 (file)
index 0000000..2cfc196
--- /dev/null
@@ -0,0 +1,9 @@
+/* styles using by feedback */
+.feedback_required_mark {
+    color: #FF0000;
+}
+
+.feedback_switchrequired img{
+}
+
+
diff --git a/theme/standard/style/mod_folder.css b/theme/standard/style/mod_folder.css
new file mode 100644 (file)
index 0000000..e178a38
--- /dev/null
@@ -0,0 +1,10 @@
+/***
+ ***
+ *** Modules: Folder
+ ***/
+
+#mod-folder-view .foldertree {
+  width: 90%;
+  margin-left: auto;
+  margin-right: auto;
+}
diff --git a/theme/standard/style/mod_forum.css b/theme/standard/style/mod_forum.css
new file mode 100644 (file)
index 0000000..3c65299
--- /dev/null
@@ -0,0 +1,361 @@
+
+/***
+ *** 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;
+}
+
diff --git a/theme/standard/style/mod_glossary.css b/theme/standard/style/mod_glossary.css
new file mode 100644 (file)
index 0000000..ed5588a
--- /dev/null
@@ -0,0 +1,262 @@
+
+
+/***
+ *** 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;
+}
similarity index 91%
rename from mod/lesson/lesson.css
rename to theme/standard/style/mod_lesson.css
index d2739a27e58ebe964b84738ba5ffc9d6ccfa6b0b..e18f94a0fd114dc962b1f66e6d8e02d04e1f9c39 100644 (file)
 }
 
 .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;
diff --git a/theme/standard/style/mod_page.css b/theme/standard/style/mod_page.css
new file mode 100644 (file)
index 0000000..9c76552
--- /dev/null
@@ -0,0 +1,8 @@
+/***
+ *** Modules: Resource
+ ***/
+
+.mod-page .modified {
+  font-size:0.6em;
+}
+
diff --git a/theme/standard/style/mod_quiz.css b/theme/standard/style/mod_quiz.css
new file mode 100644 (file)
index 0000000..fd2769d
--- /dev/null
@@ -0,0 +1,1206 @@
+
+/***
+ *** 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;
+}
+
diff --git a/theme/standard/style/mod_resource.css b/theme/standard/style/mod_resource.css
new file mode 100644 (file)
index 0000000..f77ce84
--- /dev/null
@@ -0,0 +1,52 @@
+
+/***
+ *** 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;
+}
+
diff --git a/theme/standard/style/mod_scorm.css b/theme/standard/style/mod_scorm.css
new file mode 100644 (file)
index 0000000..4d990c9
--- /dev/null
@@ -0,0 +1,160 @@
+.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;
+}
+
diff --git a/theme/standard/style/mod_survey.css b/theme/standard/style/mod_survey.css
new file mode 100644 (file)
index 0000000..8cf43fc
--- /dev/null
@@ -0,0 +1,96 @@
+
+/***
+ *** 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;
+}
+
diff --git a/theme/standard/style/mod_wiki.css b/theme/standard/style/mod_wiki.css
new file mode 100644 (file)
index 0000000..ed920b4
--- /dev/null
@@ -0,0 +1,35 @@
+
+/***
+ *** 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;
+}
+
similarity index 67%
rename from theme/standard/styles_color.css
rename to theme/standard/style/styles_color.css
index 1052720676a25253a1e46cd877eb75dceb71e9c6..c1ff02eadfa45171f5604356eecf57312d706aca 100644 (file)
@@ -21,8 +21,6 @@
   tabs
   user
 
-  various modules
-
 *******************************************************************/
 
 /***
@@ -62,7 +60,7 @@ img.grouppicture {
   border:#888
 }
 
-body, body#tinymce {
+html, body#tinymce {
   background-color:#FAFAFA;
   color:#000;
 }
@@ -757,7 +755,7 @@ body#course-user .section {
  * course/view.php
  **/
 #course-view .unread{
-       background: #9EBEFF;
+    background: #9EBEFF;
 }
 
 
@@ -944,402 +942,6 @@ table.message_search_results td {
   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;
similarity index 72%
rename from theme/standard/styles_fonts.css
rename to theme/standard/style/styles_fonts.css
index ee0378b132386aa59e1d78873809089be85d7024..dd02d8216364eb86f42cfd4ff2eea0d7d2f5b127 100644 (file)
@@ -22,8 +22,6 @@
   tabs
   user
 
-  various modules
-
 *******************************************************************/
 
 
@@ -185,10 +183,6 @@ a.useredit, a:hover.useredit, .blink {
   cursor: help;
 }
 
-.currentlink {
-  font-style: italic;
-  display: inline;
-}
 /***
  *** Header
  ***/
@@ -883,285 +877,6 @@ body#user-index #longtimenosee {
   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
similarity index 67%
rename from theme/standard/styles_layout.css
rename to theme/standard/style/styles_layout.css
index 99505addf4c5aea5dbbc61d87d8b964f76e172a4..155f325091654a8635f0e2d00abd3bd7d416cce5 100644 (file)
@@ -26,8 +26,6 @@
   tags
   user
 
-  various modules
-
 *******************************************************************/
 
 
@@ -44,6 +42,10 @@ h6.main {
   text-align: center;
 }
 
+body {
+ padding: 4px;
+}
+
 #layout-table {
   width:100%;
   border-collapse:separate;
@@ -464,7 +466,7 @@ form.popupform label {
   width: 90%;
 }
 .groupmanagementtable td {
-  vertical-align: top;
+  vertical-align: middle;
 }
 .groupmanagementtable p {
   text-align: left;
@@ -684,7 +686,7 @@ fieldset.fdate_selector label {
 }
 /* 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;
@@ -1325,10 +1327,6 @@ table.explainpermissions .cell {
   margin:auto;
 }
 
-.generalboxcontent table{
-  width:100%;
-}
-
 #admin-index .adminerror,
 #admin-index .adminwarning {
   text-align:center;
@@ -1819,6 +1817,7 @@ a.skip:focus, a.skip:active {
   list-style: none;
   padding-left:0px;
   margin:3px;
+  text-align: left;
 }
 .block_tree ul {
   margin-left: 0px;
@@ -1843,7 +1842,7 @@ a.skip:focus, a.skip:active {
   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;
 }
@@ -1858,10 +1857,10 @@ a.skip:focus, a.skip:active {
   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;
 }
@@ -1884,7 +1883,7 @@ body.has_navigation_bar {
   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;
 }
@@ -1974,10 +1973,6 @@ body.has_navigation_bar {
   padding-bottom:2px;
 }
 
-.sideblock_js_expansion .footer .adminsearchform {
-    text-align:left;
-}
-
 /***
  *** Blogs
  ***/
@@ -2001,9 +1996,14 @@ body.has_navigation_bar {
   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%;
 }
 
 /***
@@ -2333,6 +2333,10 @@ border-width:0px;
   width: 1.5em;
 }
 
+.course-view .activity {
+  text-align:left;
+}
+
 .course-view .current .side {
 }
 
@@ -2437,11 +2441,10 @@ border-width:0px;
   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,
@@ -2634,6 +2637,7 @@ body#course-info .generalbox.info {
   width: 90%;
   margin-left: auto;
   margin-right: auto;
+  text-align: left;
 }
 
 .categorylist .category.image {
@@ -2816,6 +2820,7 @@ div.allcoursegrades {
 /* gradebook edit tree */
 
 .grade-edit-tree .gradetreebox {
+  width:70%;
   margin-left:auto;
   margin-right:auto;
   margin-top:10px;
@@ -2882,10 +2887,6 @@ div.allcoursegrades {
   margin-top: 7px;
 }
 
-.gradetreebox table.simple {
-  width: 70%;
-}
-
 /***
  *** Login
  ***/
@@ -3224,7 +3225,6 @@ body.notes .notesgroup {
 
 #qtypechoicecontainer {
   display: none;
-  background: white;
 }
 body.jsenabled #qtypechoicecontainer {
   display: block;
@@ -3493,7 +3493,7 @@ body.jsenabled #qtypechoicecontainer {
 
 .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 {
@@ -3502,29 +3502,29 @@ body.jsenabled #qtypechoicecontainer {
 
 .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 {
@@ -3557,7 +3557,7 @@ body.jsenabled #qtypechoicecontainer {
   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%;
 }
 
@@ -4011,1915 +4011,439 @@ table.mod_index {
   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;
 }
diff --git a/theme/standard/style/styles_tinymce.css b/theme/standard/style/styles_tinymce.css
new file mode 100644 (file)
index 0000000..8eeec1e
--- /dev/null
@@ -0,0 +1,5 @@
+
+.mceContentBody  {
+  background-color:#FAFAFA;
+  color:#000;
+}
diff --git a/theme/standard/styles.php b/theme/standard/styles.php
deleted file mode 100644 (file)
index a941dad..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?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
diff --git a/theme/standard/styles_ie6.css b/theme/standard/styles_ie6.css
deleted file mode 100755 (executable)
index 2dab094..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * 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;
-}
diff --git a/theme/standard/styles_ie7.css b/theme/standard/styles_ie7.css
deleted file mode 100755 (executable)
index 3a5d685..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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;
-}
diff --git a/theme/standardblue/config.php b/theme/standardblue/config.php
deleted file mode 100644 (file)
index 52548d6..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-<?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.
-////////////////////////////////////////////////////////////////////////////////
-
-
diff --git a/theme/standardblue/footer.html b/theme/standardblue/footer.html
deleted file mode 100644 (file)
index e1669c7..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?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>
diff --git a/theme/standardblue/gradient.jpg b/theme/standardblue/gradient.jpg
deleted file mode 100755 (executable)
index c7abdc2..0000000
Binary files a/theme/standardblue/gradient.jpg and /dev/null differ
diff --git a/theme/standardblue/gradients.css b/theme/standardblue/gradients.css
deleted file mode 100644 (file)
index e929fb8..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
-  *  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;
-}
-
diff --git a/theme/standardblue/header.html b/theme/standardblue/header.html
deleted file mode 100644 (file)
index 86dac63..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<!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'); ?>
diff --git a/theme/standardblue/styles.php b/theme/standardblue/styles.php
deleted file mode 100644 (file)
index a941dad..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?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
diff --git a/theme/standardgreen/config.php b/theme/standardgreen/config.php
deleted file mode 100644 (file)
index 52548d6..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-<?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.
-////////////////////////////////////////////////////////////////////////////////
-
-
diff --git a/theme/standardgreen/favicon.ico b/theme/standardgreen/favicon.ico
deleted file mode 100644 (file)
index 5a7a36a..0000000
Binary files a/theme/standardgreen/favicon.ico and /dev/null differ
diff --git a/theme/standardgreen/footer.html b/theme/standardgreen/footer.html
deleted file mode 100644 (file)
index e1669c7..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?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>
diff --git a/theme/standardgreen/gradient.jpg b/theme/standardgreen/gradient.jpg
deleted file mode 100755 (executable)
index 1f7af1b..0000000
Binary files a/theme/standardgreen/gradient.jpg and /dev/null differ
diff --git a/theme/standardgreen/gradients.css b/theme/standardgreen/gradients.css
deleted file mode 100644 (file)
index e929fb8..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
-  *  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;
-}
-
diff --git a/theme/standardgreen/header.html b/theme/standardgreen/header.html
deleted file mode 100644 (file)
index 86dac63..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<!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'); ?>
diff --git a/theme/standardgreen/styles.php b/theme/standardgreen/styles.php
deleted file mode 100644 (file)
index a941dad..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?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
diff --git a/theme/standardlogo/README.html b/theme/standardlogo/README.html
deleted file mode 100644 (file)
index 810f291..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<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>
-
diff --git a/theme/standardlogo/config.php b/theme/standardlogo/config.php
deleted file mode 100644 (file)
index af9b94c..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-<?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.
-////////////////////////////////////////////////////////////////////////////////
-
-
diff --git a/theme/standardlogo/favicon.ico b/theme/standardlogo/favicon.ico
deleted file mode 100644 (file)
index 5a7a36a..0000000
Binary files a/theme/standardlogo/favicon.ico and /dev/null differ
diff --git a/theme/standardlogo/footer.html b/theme/standardlogo/footer.html
deleted file mode 100644 (file)
index e1669c7..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?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>
diff --git a/theme/standardlogo/gradient.jpg b/theme/standardlogo/gradient.jpg
deleted file mode 100755 (executable)
index a122ff2..0000000
Binary files a/theme/standardlogo/gradient.jpg and /dev/null differ
diff --git a/theme/standardlogo/header.html b/theme/standardlogo/header.html
deleted file mode 100644 (file)
index f261a54..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-<!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'); ?>
diff --git a/theme/standardlogo/logo.gif b/theme/standardlogo/logo.gif
deleted file mode 100644 (file)
index b47c1ce..0000000
Binary files a/theme/standardlogo/logo.gif and /dev/null differ
diff --git a/theme/standardlogo/styles.php b/theme/standardlogo/styles.php
deleted file mode 100644 (file)
index a941dad..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?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
diff --git a/theme/standardred/config.php b/theme/standardred/config.php
deleted file mode 100644 (file)
index 52548d6..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-<?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.
-////////////////////////////////////////////////////////////////////////////////
-
-
diff --git a/theme/standardred/favicon.ico b/theme/standardred/favicon.ico
deleted file mode 100644 (file)
index 5a7a36a..0000000
Binary files a/theme/standardred/favicon.ico and /dev/null differ
diff --git a/theme/standardred/footer.html b/theme/standardred/footer.html
deleted file mode 100644 (file)
index e1669c7..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?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>
diff --git a/theme/standardred/gradient.jpg b/theme/standardred/gradient.jpg
deleted file mode 100755 (executable)
index a9f2a1b..0000000
Binary files a/theme/standardred/gradient.jpg and /dev/null differ
diff --git a/theme/standardred/gradients.css b/theme/standardred/gradients.css
deleted file mode 100644 (file)
index e929fb8..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
-  *  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;
-}
-
diff --git a/theme/standardred/header.html b/theme/standardred/header.html
deleted file mode 100644 (file)
index 86dac63..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<!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'); ?>
diff --git a/theme/standardred/styles.php b/theme/standardred/styles.php
deleted file mode 100644 (file)
index a941dad..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?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
diff --git a/theme/standardwhite/config.php b/theme/standardwhite/config.php
deleted file mode 100644 (file)
index 2b00497..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-<?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 = '&#x25BA;' //OR '&rarr;';
-//$THEME->larrow = '&#x25C4;' //OR '&larr;';
-//$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.
diff --git a/theme/standardwhite/favicon.ico b/theme/standardwhite/favicon.ico
deleted file mode 100644 (file)
index 5a7a36a..0000000
Binary files a/theme/standardwhite/favicon.ico and /dev/null differ
diff --git a/theme/standardwhite/footer.html b/theme/standardwhite/footer.html
deleted file mode 100644 (file)
index 6fbdf2a..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<?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&amp;ss=1&amp;uri=<?php echo urlencode(qualified_me()) ?>">Validate HTML</a></li>
-          <li><a href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=-1&amp;url1=<?php echo urlencode(qualified_me()) ?>">Section 508 Check</a></li>
-          <li><a href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=0&amp;warnp2n3e=1&amp;url1=<?php echo urlencode(qualified_me()) ?>">WCAG 1 (2,3) Check</a></li>
-        </ul></div>
-<?php }
-    echo $OUTPUT->container_end();
-?>
-
-</div>
-</body>
-</html>
diff --git a/theme/standardwhite/gradient.jpg b/theme/standardwhite/gradient.jpg
deleted file mode 100755 (executable)
index e389b3c..0000000
Binary files a/theme/standardwhite/gradient.jpg and /dev/null differ
diff --git a/theme/standardwhite/gradients.css b/theme/standardwhite/gradients.css
deleted file mode 100644 (file)
index ef4545c..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
-  *  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;
-}
diff --git a/theme/standardwhite/header.html b/theme/standardwhite/header.html
deleted file mode 100644 (file)
index 1bbab04..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<!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'); ?>
diff --git a/theme/standardwhite/styles.php b/theme/standardwhite/styles.php
deleted file mode 100644 (file)
index a941dad..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?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
index e1d2f46a3c2559c2b0edcc78162c6d3dda0aa73e..4be3059314ac4b8f36eac347589959af98ed8973 100644 (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;
 }
diff --git a/theme/styles_debug.php b/theme/styles_debug.php
new file mode 100644 (file)
index 0000000..d558d7e
--- /dev/null
@@ -0,0 +1,96 @@
+<?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
index a941dadc6d2668766972504c8994a5b2e60a06dc..94a76f946d28a6371fdc75fb849414cbfbb1de0a 100644 (file)
@@ -25,5 +25,4 @@
  * @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...');
index 7f5dfac72143f96fa54e96528bf8204f2f5c5366..b8ff1f5d9d0fd237a8d02d27482219d702fb3b26 100644 (file)
@@ -46,7 +46,7 @@ if (!$course = $DB->get_record('course', array('id'=>$course))) {
 }
 if (!empty($USER->newadminuser)) {
     $PAGE->set_course($SITE);
-    $PAGE->set_generaltype('maintenance');
+    $PAGE->set_pagelayout('maintenance');
 } else {
     require_login($course);
 }
index f16e3aa2b2d4f3999fd4a9e841df6f84234e222e..b51ac5278a59925629bfdb9d18ccf3dc999e5cf0 100644 (file)
@@ -232,7 +232,7 @@ class webservice_documentation_generator {
         $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
@@ -262,7 +262,7 @@ class webservice_documentation_generator {
         $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);