Merge branch 'MDL-22478-alternative-langcacheroot' of git://github.com/mudrd8mz/moodle
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Mon, 14 Mar 2011 11:03:36 +0000 (12:03 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Mon, 14 Mar 2011 11:03:36 +0000 (12:03 +0100)
101 files changed:
admin/bloglevelupgrade.php
admin/replace.php
admin/user.php
auth/ldap/lang/en/auth_ldap.php
backup/moodle2/backup_plagiarism_plugin.class.php [new file with mode: 0644]
backup/moodle2/backup_plan_builder.class.php
backup/moodle2/backup_stepslib.php
backup/moodle2/backup_theme_plugin.class.php
backup/moodle2/restore_plagiarism_plugin.class.php [new file with mode: 0644]
backup/moodle2/restore_plan_builder.class.php
backup/moodle2/restore_stepslib.php
blocks/html/lib.php
course/modedit.php
filter/algebra/algebra2tex.pl [changed mode: 0644->0755]
filter/algebra/filter.php
filter/tex/db/upgrade.php [new file with mode: 0644]
filter/tex/displaytex.php
filter/tex/filter.php
filter/tex/filtersettings.php
filter/tex/lang/en/filter_tex.php
filter/tex/lib.php
filter/tex/pix.php
filter/tex/texdebug.php
filter/tex/version.php
install/lang/de_kids/langconfig.php [new file with mode: 0644]
install/lang/pl/admin.php
install/lang/pl/install.php
lib/adminlib.php
lib/completionlib.php
lib/enrollib.php
lib/excellib.class.php
lib/form/radio.php
lib/outputrenderers.php
lib/outputrequirementslib.php
lib/weblib.php
mod/forum/lang/en/forum.php
mod/forum/lib.php
mod/quiz/attemptlib.php
mod/quiz/lib.php
mod/quiz/review.php
question/type/essay/questiontype.php
question/type/multianswer/questiontype.php
question/type/numerical/display.html
repository/filepicker.js
theme/canvas/style/text.css
theme/formal_white/config.php [changed mode: 0644->0755]
theme/formal_white/javascript/navigation.js [deleted file]
theme/formal_white/lang/en/theme_formal_white.php [changed mode: 0644->0755]
theme/formal_white/layout/embedded.php [new file with mode: 0755]
theme/formal_white/layout/frontpage.php [new file with mode: 0755]
theme/formal_white/layout/general.php [changed mode: 0644->0755]
theme/formal_white/layout/report.php [deleted file]
theme/formal_white/lib.php [changed mode: 0644->0755]
theme/formal_white/pix/custommenubg.jpg [new file with mode: 0755]
theme/formal_white/pix/dock_removeall.png [deleted file]
theme/formal_white/pix/gradient-sb.jpg [new file with mode: 0644]
theme/formal_white/pix/hgradient.jpg [new file with mode: 0644]
theme/formal_white/pix/logo.jpg [deleted file]
theme/formal_white/pix/logo.png [new file with mode: 0644]
theme/formal_white/pix/logo_small.jpg [deleted file]
theme/formal_white/pix/logo_small.png [new file with mode: 0644]
theme/formal_white/pix/movedock.png [deleted file]
theme/formal_white/pix/roundcorner/body_l.jpg
theme/formal_white/pix/roundcorner/body_r.jpg
theme/formal_white/pix/roundcorner/footer.jpg
theme/formal_white/pix/roundcorner/footer_l.jpg
theme/formal_white/pix/roundcorner/footer_r.jpg
theme/formal_white/pix/roundcorner/header.jpg
theme/formal_white/pix/roundcorner/header_l.jpg
theme/formal_white/pix/roundcorner/header_r.jpg
theme/formal_white/pix/sprite.png [new file with mode: 0755]
theme/formal_white/settings.php [changed mode: 0644->0755]
theme/formal_white/style/base.css [deleted file]
theme/formal_white/style/calendar.css [new file with mode: 0644]
theme/formal_white/style/core.css [new file with mode: 0644]
theme/formal_white/style/course.css [new file with mode: 0755]
theme/formal_white/style/dock.css [deleted file]
theme/formal_white/style/editor.css [deleted file]
theme/formal_white/style/formal_white.css [new file with mode: 0755]
theme/formal_white/style/formalwhite.css [deleted file]
theme/formal_white/style/frame.css [new file with mode: 0755]
theme/formal_white/style/fw_corners.css [deleted file]
theme/formal_white/style/general.css [deleted file]
theme/formal_white/style/menu.css [new file with mode: 0755]
theme/formal_white/style/pagelayout.css [new file with mode: 0755]
theme/formal_white/style/quiz.css [new file with mode: 0755]
theme/formal_white/style/settings.css [deleted file]
theme/formal_white/style/tabs.css [new file with mode: 0644]
theme/fusion/style/core.css
theme/leatherbound/layout/frontpage.php
theme/leatherbound/layout/general.php
theme/leatherbound/layout/report.php
theme/leatherbound/style/core.css
theme/magazine/layout/frontpage.php
theme/magazine/layout/general.php
theme/magazine/style/core.css
theme/nonzero/layout/frontpage.php
theme/nonzero/layout/general.php
theme/nonzero/style/core.css
theme/splash/style/orange.css
user/profile.php

index 7d20ef5..1edc0b1 100644 (file)
@@ -88,8 +88,8 @@ function bloglevelupgrade_entries($blogentries, $forum, $cm, $groupid=-1) {
         $discussion->course = $forum->course;
         $discussion->forum = $forum->id;
         $discussion->name = $blogentry->subject;
-        $discussion->intro = $blogentry->summary;
         $discussion->assessed = $forum->assessed;
+        $discussion->message = $blogentry->summary;
         $discussion->messageformat = $forum->introformat;
         $discussion->messagetrust = 0;
         $discussion->attachments = 0;
index e77070b..8217876 100644 (file)
@@ -11,23 +11,32 @@ admin_externalpage_setup('replace');
 
 $search  = optional_param('search', '', PARAM_RAW);
 $replace = optional_param('replace', '', PARAM_RAW);
+$sure    = optional_param('sure', 0, PARAM_BOOL);
 
 ###################################################################
 echo $OUTPUT->header();
 
 echo $OUTPUT->heading('Search and replace text throughout the whole database');
 
+if ($DB->get_dbfamily() !== 'mysql' and $DB->get_dbfamily() !== 'postgres') {
+    //TODO: add $DB->text_replace() to DML drivers
+    echo $OUTPUT->notification('Sorry, this feature is implemented only for MySQL and PostgreSQL databases.');
+    echo $OUTPUT->footer();
+    die;
+}
 
-if (!data_submitted() or !$search or !$replace or !confirm_sesskey()) {   /// Print a form
+if (!data_submitted() or !$search or !$replace or !confirm_sesskey() or !$sure) {   /// Print a form
+    echo $OUTPUT->notification('This script is not supported, always make complete backup before proceeding!<br />This operation can not be reverted!');
 
     echo $OUTPUT->box_start();
     echo '<div class="mdl-align">';
-    echo '<form action="replace.php" method="post">';
+    echo '<form action="replace.php" method="post"><div>';
     echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
-    echo 'Search whole database for: <input type="text" name="search" /><br />';
-    echo 'Replace with this string: <input type="text" name="replace" /><br />';
-    echo '<input type="submit" value="Yes, do it now" /><br />';
-    echo '</form>';
+    echo '<div><label for="search">Search whole database for: </label><input id="search" type="text" name="search" size="40" /> (usually previous server URL)</div>';
+    echo '<div><label for="replace">Replace with this string: </label><input type="text" id="replace" name="replace" size="40" /> (usually new server URL)</div>';
+    echo '<div><label for="sure">I understand the risks of this operation: </label><input type="checkbox" id="sure" name="sure" value="1" /></div>';
+    echo '<div class="buttons"><input type="submit" class="singlebutton" value="Yes, do it now" /></div>';
+    echo '</div></form>';
     echo '</div>';
     echo $OUTPUT->box_end();
     echo $OUTPUT->footer();
@@ -35,23 +44,9 @@ if (!data_submitted() or !$search or !$replace or !confirm_sesskey()) {   /// Pr
 }
 
 echo $OUTPUT->box_start();
-
-if (!db_replace($search, $replace)) {
-    print_error('erroroccur', debug);
-}
-
+db_replace($search, $replace);
 echo $OUTPUT->box_end();
 
-/// Try to replace some well-known serialised contents (html blocks)
-echo $OUTPUT->notification('Replacing in html blocks...');
-$instances = $DB->get_recordset('block_instances', array('blockname' => 'html'));
-foreach ($instances as $instance) {
-    $blockobject = block_instance('html', $instance);
-    $blockobject->config->text = str_replace($search, $replace, $blockobject->config->text);
-    $blockobject->instance_config_commit();
-}
-$instances->close();
-
 /// Rebuild course cache which might be incorrect now
 echo $OUTPUT->notification('Rebuilding course cache...', 'notifysuccess');
 rebuild_course_cache();
index d2ad915..2827ccf 100644 (file)
         }
 
         foreach ($users as $key => $user) {
-            if (!empty($user->country)) {
+            if (isset($countries[$user->country])) {
                 $users[$key]->country = $countries[$user->country];
             }
         }
index a6e4ff6..7962513 100644 (file)
@@ -101,7 +101,7 @@ $string['auth_ntlmsso_enabled'] = 'Set to yes to attempt Single Sign On with the
 $string['auth_ntlmsso_enabled_key'] = 'Enable';
 $string['auth_ntlmsso_ie_fastpath'] = 'Set to yes to enable the NTLM SSO fast path (bypasses certain steps and only works if the client\'s browser is MS Internet Explorer).';
 $string['auth_ntlmsso_ie_fastpath_key'] = 'MS IE fast path?';
-$string['auth_ntlmsso_subnet'] = 'If set, it will only attempt SSO with clients in this subnet. Format: xxx.xxx.xxx.xxx/bitmask';
+$string['auth_ntlmsso_subnet'] = 'If set, it will only attempt SSO with clients in this subnet. Format: xxx.xxx.xxx.xxx/bitmask. Separate multiple subnets with \',\' (comma).';
 $string['auth_ntlmsso_subnet_key'] = 'Subnet';
 $string['auth_ntlmsso_type_key'] = 'Authentication type';
 $string['auth_ntlmsso_type'] = 'The authentication method configured in the web server to authenticate the users (if in doubt, choose NTLM)';
diff --git a/backup/moodle2/backup_plagiarism_plugin.class.php b/backup/moodle2/backup_plagiarism_plugin.class.php
new file mode 100644 (file)
index 0000000..17a1d23
--- /dev/null
@@ -0,0 +1,44 @@
+<?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/>.
+
+/**
+ * @package    moodlecore
+ * @subpackage backup-moodle2
+ * @copyright  2011 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+/**
+ * Class extending standard backup_plugin in order to implement some
+ * helper methods related with the plagiarism plugins (plagiarism plugin)
+ *
+ * TODO: Finish phpdocs
+ */
+abstract class backup_plagiarism_plugin extends backup_plugin {
+
+    public function define_plugin_structure($connectionpoint) {
+        global $CFG;
+        require_once($CFG->libdir . '/plagiarismlib.php');
+        //check if enabled at site level and plugin is enabled.
+        $enabledplugins = plagiarism_load_available_plugins();
+        if (!array_key_exists($this->pluginname, $enabledplugins)) {
+            return;
+        }
+
+        parent::define_plugin_structure($connectionpoint);
+    }
+}
\ No newline at end of file
index 4c9e876..b85e2b1 100644 (file)
@@ -36,6 +36,7 @@ require_once($CFG->dirroot . '/backup/moodle2/backup_plugin.class.php');
 require_once($CFG->dirroot . '/backup/moodle2/backup_qtype_plugin.class.php');
 require_once($CFG->dirroot . '/backup/moodle2/backup_format_plugin.class.php');
 require_once($CFG->dirroot . '/backup/moodle2/backup_theme_plugin.class.php');
+require_once($CFG->dirroot . '/backup/moodle2/backup_plagiarism_plugin.class.php');
 require_once($CFG->dirroot . '/backup/moodle2/backup_subplugin.class.php');
 require_once($CFG->dirroot . '/backup/moodle2/backup_settingslib.php');
 require_once($CFG->dirroot . '/backup/moodle2/backup_stepslib.php');
index 051a409..0c3ddb6 100644 (file)
@@ -321,6 +321,9 @@ class backup_module_structure_step extends backup_structure_step {
         // attach format plugin structure to $module element, only one allowed
         $this->add_plugin_structure('format', $module, false);
 
+        // attach plagiarism plugin structure to $module element, only one allowed
+        $this->add_plugin_structure('plagiarism', $module, false);
+
         // Define the tree
         $module->add_child($availinfo);
         $availinfo->add_child($availability);
@@ -416,6 +419,9 @@ class backup_course_structure_step extends backup_structure_step {
         // save course data (in case of user theme, legacy theme, etc)
         $this->add_plugin_structure('theme', $course, true);
 
+        // attach plagiarism plugin structure to $course element, only one allowed
+        $this->add_plugin_structure('plagiarism', $course, false);
+
         // Build the tree
 
         $course->add_child($category);
index 2fd7591..d4a3a09 100644 (file)
  */
 abstract class backup_theme_plugin extends backup_plugin {
 
-    // Stores current theme for course. Lazily initialised.
-    protected $theme;
+    /**
+     * @var string Current theme for course (may not be the same as plugin).
+     */
+    protected $coursetheme;
 
     /**
-     * Checks if an expected theme is actually the current theme for the course.
-     * @param string $expected Name of theme you are expecting e.g. 'standard'
-     * @return bool True if that theme is the current course theme
+     * @param string $plugintype Plugin type (always 'theme')
+     * @param string $pluginname Plugin name (name of theme)
+     * @param backup_optigroup $optigroup Group that will contain this data
+     * @param backup_course_structure_step $step Backup step that this is part of
      */
-    protected function is_current_theme($expected) {
-        if (!$this->theme) {
-            $this->theme = backup_plan_dbops::get_theme_from_courseid(
+    public function __construct($plugintype, $pluginname, $optigroup, $step) {
+
+        parent::__construct($plugintype, $pluginname, $optigroup, $step);
+
+        $this->coursetheme = backup_plan_dbops::get_theme_from_courseid(
                     $this->task->get_courseid());
-        }
-        return $this->theme === $expected;
+
+    }
+
+    /**
+     * Return condition for whether this theme should be backed up (= if it
+     * is the same theme as the one used in this course). This condition has
+     * the theme used in the course. It will be compared against the name
+     * of the theme, by use of third parameter in get_plugin_element; in
+     * subclass, you should do:
+     * $plugin = $this->get_plugin_element(null, $this->get_theme_condition(), 'mytheme');
+     */
+    protected function get_theme_condition() {
+        return array('sqlparam' => $this->coursetheme);
     }
 }
diff --git a/backup/moodle2/restore_plagiarism_plugin.class.php b/backup/moodle2/restore_plagiarism_plugin.class.php
new file mode 100644 (file)
index 0000000..238ebc1
--- /dev/null
@@ -0,0 +1,46 @@
+<?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/>.
+
+/**
+ * @package    moodlecore
+ * @subpackage backup-moodle2
+ * @copyright  2011 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+/**
+ * Class extending standard restore_plugin in order to implement some
+ * helper methods related with the plagiarism plugins
+ *
+ * TODO: Finish phpdocs
+ */
+abstract class restore_plagiarism_plugin extends restore_plugin {
+    public function define_plugin_structure($connectionpoint) {
+        global $CFG;
+        if (!$connectionpoint instanceof restore_path_element) {
+            throw new restore_step_exception('restore_path_element_required', $connectionpoint);
+        }
+
+        //check if enabled at site level and plugin is enabled.
+        require_once($CFG->libdir . '/plagiarismlib.php');
+        $enabledplugins = plagiarism_load_available_plugins();
+        if (!array_key_exists($this->pluginname, $enabledplugins)) {
+            return;
+        }
+        parent::define_plugin_structure($connectionpoint);
+    }
+}
index 122b05e..a2883d0 100644 (file)
@@ -35,10 +35,12 @@ require_once($CFG->dirroot . '/backup/moodle2/restore_plugin.class.php');
 require_once($CFG->dirroot . '/backup/moodle2/restore_qtype_plugin.class.php');
 require_once($CFG->dirroot . '/backup/moodle2/restore_format_plugin.class.php');
 require_once($CFG->dirroot . '/backup/moodle2/restore_theme_plugin.class.php');
+require_once($CFG->dirroot . '/backup/moodle2/restore_plagiarism_plugin.class.php');
 require_once($CFG->dirroot . '/backup/moodle2/backup_plugin.class.php');
 require_once($CFG->dirroot . '/backup/moodle2/backup_qtype_plugin.class.php');
 require_once($CFG->dirroot . '/backup/moodle2/backup_format_plugin.class.php');
 require_once($CFG->dirroot . '/backup/moodle2/backup_theme_plugin.class.php');
+require_once($CFG->dirroot . '/backup/moodle2/backup_plagiarism_plugin.class.php');
 require_once($CFG->dirroot . '/backup/moodle2/restore_subplugin.class.php');
 require_once($CFG->dirroot . '/backup/moodle2/restore_settingslib.php');
 require_once($CFG->dirroot . '/backup/moodle2/restore_stepslib.php');
index b7b28a3..3f376ed 100644 (file)
@@ -1010,6 +1010,9 @@ class restore_course_structure_step extends restore_structure_step {
         // Apply for 'theme' plugins optional paths at course level
         $this->add_plugin_structure('theme', $course);
 
+        // Apply for plagiarism plugins optional paths at course level
+        $this->add_plugin_structure('plagiarism', $course);
+
         return array($course, $category, $tag, $allowed_module);
     }
 
@@ -2007,6 +2010,9 @@ class restore_module_structure_step extends restore_structure_step {
         // Apply for 'format' plugins optional paths at module level
         $this->add_plugin_structure('format', $module);
 
+        // Apply for 'plagiarism' plugins optional paths at module level
+        $this->add_plugin_structure('plagiarism', $module);
+
         return $paths;
     }
 
index 6945216..4d8fc11 100644 (file)
@@ -59,3 +59,24 @@ function block_html_pluginfile($course, $birecord_or_cm, $context, $filearea, $a
     session_get_instance()->write_close();
     send_stored_file($file, 60*60, 0, $forcedownload);
 }
+
+/**
+ * Perform global search replace such as when migrating site to new URL.
+ * @param  $search
+ * @param  $replace
+ * @return void
+ */
+function block_html_global_db_replace($search, $replace) {
+    global $DB;
+
+    $instances = $DB->get_recordset('block_instances', array('blockname' => 'html'));
+    foreach ($instances as $instance) {
+        // TODO: intentionally hardcoded until MDL-26800 is fixed
+        $config = unserialize(base64_decode($instance->configdata));
+        if (isset($config->text) and is_string($config->text)) {
+            $config->text = str_replace($search, $replace, $config->text);
+            $DB->set_field('block_instances', 'configdata', base64_encode(serialize($config)), array('id' => $instance->id));
+        }
+    }
+    $instances->close();
+}
\ No newline at end of file
index 4b5c615..cd84c00 100644 (file)
@@ -325,7 +325,7 @@ if ($mform->is_cancelled()) {
         }
 
         if (!$updateinstancefunction($fromform, $mform)) {
-            print_error('cannotupdatemod', '', 'view.php?id=$course->id', $fromform->modulename);
+            print_error('cannotupdatemod', '', "view.php?id={$course->id}#section-{$cw->section}", $fromform->modulename);
         }
 
         // make sure visibility is set correctly (in particular in calendar)
@@ -416,9 +416,9 @@ if ($mform->is_cancelled()) {
             $DB->delete_records('course_modules', array('id'=>$fromform->coursemodule));
 
             if (!is_number($returnfromfunc)) {
-                print_error('invalidfunction', '', 'view.php?id=$course->id');
+                print_error('invalidfunction', '', "view.php?id={$course->id}#section-{$cw->section}");
             } else {
-                print_error('cannotaddnewmodule', '', "view.php?id=$course->id", $fromform->modulename);
+                print_error('cannotaddnewmodule', '', "view.php?id={$course->id}#section-{$cw->section}", $fromform->modulename);
             }
         }
 
@@ -568,7 +568,7 @@ if ($mform->is_cancelled()) {
     if (isset($fromform->submitbutton)) {
         redirect("$CFG->wwwroot/mod/$module->name/view.php?id=$fromform->coursemodule");
     } else {
-        redirect("$CFG->wwwroot/course/view.php?id=$course->id");
+        redirect("$CFG->wwwroot/course/view.php?id={$course->id}#section-{$cw->section}");
     }
     exit;
 
@@ -591,7 +591,7 @@ if ($mform->is_cancelled()) {
     if (get_string_manager()->string_exists('modulename_help', $module->name)) {
         echo $OUTPUT->heading_with_help($pageheading, 'modulename', $module->name, 'icon');
     } else {
-        echo $OUTPUT->heading_with_help($pageheading, '', '', 'icon');
+        echo $OUTPUT->heading_with_help($pageheading, '', $module->name, 'icon');
     }
 
     $mform->display();
old mode 100644 (file)
new mode 100755 (executable)
index f5ff028..a6fc6a2 100644 (file)
@@ -50,15 +50,11 @@ function filter_algebra_image($imagefile, $tex= "", $height="", $width="", $alig
   global $CFG, $OUTPUT;
 
   $output = "";
-  $origtex = $tex;
   $style = 'style="border:0px; vertical-align:'.$align.';';
+  $title = '';
   if ($tex) {
-    $tex = str_replace('&','&amp;',$tex);
-    $tex = str_replace('<','&lt;',$tex);
-    $tex = str_replace('>','&gt;',$tex);
-    $tex = str_replace('"','&quot;',$tex);
-    $tex = str_replace("\'",'&#39;',$tex);
-    $title = "title=\"$tex\"";
+    $tex = html_entity_decode($tex, ENT_QUOTES, 'UTF-8');
+    $title = 'title="'.s($tex).'"';
   }
   if ($height) {
     $style .= " height:{$height}px;";
@@ -69,7 +65,7 @@ function filter_algebra_image($imagefile, $tex= "", $height="", $width="", $alig
   $style .= '"';
   $anchorcontents = '';
   if ($imagefile) {
-    $anchorcontents .= "<img $title alt=\"".s($origtex)."\" src=\"";
+    $anchorcontents .= "<img $title alt=\"".s($tex)."\" src=\"";
     if ($CFG->slasharguments) {        // Use this method if possible for better caching
       $anchorcontents .= "$CFG->wwwroot/filter/algebra/pix.php/$imagefile";
     } else {
@@ -77,12 +73,12 @@ function filter_algebra_image($imagefile, $tex= "", $height="", $width="", $alig
     }
     $anchorcontents .= "\" $style />";
 
-    $link = $action = null;
     if (!file_exists("$CFG->dataroot/filter/algebra/$imagefile") && has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))) {
         $link = '/filter/algebra/algebradebug.php';
+        $action = null;
     } else {
-        $link = '/filter/algebra/displaytex.php?'.urlencode($tex);
-        $action = new popup_action('click', $link, 'popup', array('height'=>300,'width'=>240));
+        $link = new moodle_url('/filter/tex/displaytex.php', array('texexp'=>$tex));
+        $action = new popup_action('click', $link, 'popup', array('width'=>320,'height'=>240)); //TODO: the popups do not work when text caching is enabled!!
     }
     $output .= $OUTPUT->action_link($link, $anchorcontents, $action, array('title'=>'TeX'));
 
diff --git a/filter/tex/db/upgrade.php b/filter/tex/db/upgrade.php
new file mode 100644 (file)
index 0000000..db04601
--- /dev/null
@@ -0,0 +1,42 @@
+<?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/>.
+
+/**
+ * TeX filter upgrade code.
+ *
+ * @package    filter
+ * @subpackage tex
+ * @copyright  2011 Petr Skoda (http://skodak.org)
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+/**
+ * @param int $oldversion the version we are upgrading from
+ * @return bool result
+ */
+function xmldb_filter_tex_upgrade($oldversion) {
+    global $CFG, $DB, $OUTPUT;
+
+    if ($oldversion < 2011031301) {
+        // clear caches
+        require_once("$CFG->dirroot/filter/tex/lib.php");
+        filter_tex_updatedcallback(null);
+
+        upgrade_plugin_savepoint(true, 2011031301, 'filter', 'tex');
+    }
+
+    return true;
+}
index be70dc7..ddc6ee6 100644 (file)
@@ -1,20 +1,55 @@
 <?php
-      // This script displays tex source code.
+// 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/>.
 
-    require_once('../../config.php');
+/**
+ * This script displays tex source code, it is used also from the algebra filter.
+ *
+ * @package    filter
+ * @subpackage tex
+ * @copyright  2004 Zbigniew Fiedorowicz fiedorow@math.ohio-state.edu
+ *             Originally based on code provided by Bruno Vernier bruno@vsbeducation.ca
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
+define('NO_MOODLE_COOKIES', true); // Because it interferes with caching
+
+require('../../config.php');
+
+if (!filter_is_enabled('filter/tex') and !filter_is_enabled('filter/algebra')) {
+    print_error('filternotenabled');
+}
+
+$texexp = optional_param('texexp', '', PARAM_RAW);
+
+$title = get_string('source', 'filter_tex')
 
-    $texexp = urldecode($_SERVER['QUERY_STRING']);
-    // entities are usually encoded twice, first in HTML editor then in tex/filter.php
-    $texexp = html_entity_decode(html_entity_decode($texexp));
-    // encode all entities (saves non-ISO)
-    $texexp = htmlentities($texexp,ENT_COMPAT,'utf-8');
 ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html>
   <head>
-    <title>TeX Source</title>
-    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+    <title><?php echo $title; ?></title>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   </head>
-  <body bgcolor="#FFFFFF">
-    <?php echo $texexp; ?>
+  <body>
+    <div>
+      <dl>
+      <dt><?php echo $title; ?>:</dt>
+        <dd><?php p($texexp); ?></dd>
+      </dl>
+    </div>
   </body>
-</html>
\ No newline at end of file
+</html>
index 78a831e..ddff02c 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 // This file is part of Moodle - http://moodle.org/
 //
 // Moodle is free software: you can redistribute it and/or modify
 
 /**
  * Moodle - Filter for converting TeX expressions to cached gif images
+ *
+ * This Moodle text filter converts TeX expressions delimited
+ * by either $$...$$ or by <tex...>...</tex> tags to gif images using
+ * mimetex.cgi obtained from http: *www.forkosh.com/mimetex.html authored by
+ * John Forkosh john@forkosh.com.  Several binaries of this areincluded with
+ * this distribution.
+ * Note that there may be patent restrictions on the production of gif images
+ * in Canada and some parts of Western Europe and Japan until July 2004.
+ *
  * @package    filter
  * @subpackage tex
  * @copyright  2004 Zbigniew Fiedorowicz fiedorow@math.ohio-state.edu
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-//-------------------------------------------------------------------------
-// NOTE: This Moodle text filter converts TeX expressions delimited
-// by either $$...$$ or by <tex...>...</tex> tags to gif images using
-// mimetex.cgi obtained from http://www.forkosh.com/mimetex.html authored by
-// John Forkosh john@forkosh.com.  Several binaries of this areincluded with
-// this distribution.
-// Note that there may be patent restrictions on the production of gif images
-// in Canada and some parts of Western Europe and Japan until July 2004.
-//-------------------------------------------------------------------------
-/////////////////////////////////////////////////////////////////////////////
-//  To activate this filter, add a line like this to your                  //
-//  list of filters in your Filter configuration:                          //
-//                                                                         //
-//       filter/tex/filter.php                                             //
-/////////////////////////////////////////////////////////////////////////////
-
-function filter_text_image($imagefile, $tex= "", $height="", $width="", $align="middle", $alt='') {
+defined('MOODLE_INTERNAL') || die;
+
+/**
+ * Create TeX image link.
+ *
+ * @param string $imagefile name of file
+ * @param string $tex TeX notation (html entities already decoded)
+ * @param int $height O means automatic
+ * @param int $width O means automatic
+ * @param string $align
+ * @param string $alt
+ * @return string HTML markup
+ */
+function filter_text_image($imagefile, $tex, $height, $width, $align, $alt) {
     global $CFG, $OUTPUT;
 
-    if ($alt==='') {
-        $alt = s($tex);
+    if (!$imagefile) {
+        throw new coding_exception('image file argument empty in filter_text_image()');
     }
 
     // Work out any necessary inline style.
@@ -65,47 +70,46 @@ function filter_text_image($imagefile, $tex= "", $height="", $width="", $align="
     }
 
     // Prepare the title attribute.
-    if ($tex) {
-        $tex = str_replace('&','&amp;',$tex);
-        $tex = str_replace('<','&lt;',$tex);
-        $tex = str_replace('>','&gt;',$tex);
-        $tex = str_replace('"','&quot;',$tex);
-        $tex = str_replace("\'",'&#39;',$tex);
-        // Note that we retain the title tag as TeX format rather than using
-        // the alt text, even if supplied. The alt text is intended for blind
-        // users (to provide a text equivalent to the equation) while the title
-        // is there as a convenience for sighted users who want to see the TeX
-        // code.
-        $title = "title=\"$tex\"";
+    // Note that we retain the title tag as TeX format rather than using
+    // the alt text, even if supplied. The alt text is intended for blind
+    // users (to provide a text equivalent to the equation) while the title
+    // is there as a convenience for sighted users who want to see the TeX
+    // code.
+    $title = 'title="'.s($tex).'"';
+
+    if ($alt === '') {
+        $alt = s($tex);
+    } else {
+        $alt = s(html_entity_decode($tex, ENT_QUOTES, 'UTF-8'));
     }
 
     // Build the output.
-    $output = "";
-    if ($imagefile) {
-        $anchorcontents = "<img class=\"texrender\" $title alt=\"$alt\" src=\"";
-        if ($CFG->slasharguments) {        // Use this method if possible for better caching
-            $anchorcontents .= "$CFG->wwwroot/filter/tex/pix.php/$imagefile";
-        } else {
-            $anchorcontents .= "$CFG->wwwroot/filter/tex/pix.php?file=$imagefile";
-        }
-        $anchorcontents .= "\" $style/>";
-
-        $link = $action = null;
-        if (!file_exists("$CFG->dataroot/filter/tex/$imagefile") && has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))) {
-            $link = '/filter/tex/texdebug.php';
-        } else {
-            $link = '/filter/tex/displaytex.php?'.urlencode($tex);
-            $action = new popup_action('click', $link, 'popup', array('height'=>300,'width'=>240));
-        }
-        $output .= $OUTPUT->action_link($link, $anchorcontents, $action, array('title'=>'TeX'));
+    $anchorcontents = "<img class=\"texrender\" $title alt=\"$alt\" src=\"";
+    if ($CFG->slasharguments) {        // Use this method if possible for better caching
+        $anchorcontents .= "$CFG->wwwroot/filter/tex/pix.php/$imagefile";
     } else {
-        $output .= "Error: must pass URL or course";
+        $anchorcontents .= "$CFG->wwwroot/filter/tex/pix.php?file=$imagefile";
     }
+    $anchorcontents .= "\" $style/>";
+
+    if (!file_exists("$CFG->dataroot/filter/tex/$imagefile") && has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))) {
+        $link = '/filter/tex/texdebug.php';
+        $action = null;
+    } else {
+        $link = new moodle_url('/filter/tex/displaytex.php', array('texexp'=>$tex));
+        $action = new popup_action('click', $link, 'popup', array('width'=>320,'height'=>240));
+    }
+    $output = $OUTPUT->action_link($link, $anchorcontents, $action, array('title'=>'TeX')); //TODO: the popups do not work when text caching is enabled!!
+
     return $output;
 }
 
+
+/**
+ * TeX filtering class.
+ */
 class filter_tex extends moodle_text_filter {
-    function filter ($text, array $options = array()) {
+    function filter($text, array $options = array()) {
 
         global $CFG, $DB;
 
@@ -132,9 +136,9 @@ class filter_tex extends moodle_text_filter {
 #    }
         $text .= ' ';
         preg_match_all('/\$(\$\$+?)([^\$])/s',$text,$matches);
-        for ($i=0;$i<count($matches[0]);$i++) {
-            $replacement = str_replace('$','&#x00024;',$matches[1][$i]).$matches[2][$i];
-            $text = str_replace($matches[0][$i],$replacement,$text);
+        for ($i=0; $i<count($matches[0]); $i++) {
+            $replacement = str_replace('$','&#x00024;', $matches[1][$i]).$matches[2][$i];
+            $text = str_replace($matches[0][$i], $replacement, $text);
         }
 
         // <tex> TeX expression </tex>
@@ -159,8 +163,17 @@ class filter_tex extends moodle_text_filter {
               $align = "text-top";
               $texexp = preg_replace('/^align=top /','',$texexp);
             }
+
+            // decode entities encoded by editor, luckily there is very little chance of double decoding
+            $texexp = html_entity_decode($texexp, ENT_QUOTES, 'UTF-8');
+
+            if ($texexp === '') {
+                contninue;
+            }
+
             $md5 = md5($texexp);
-            if (! $texcache = $DB->get_record("cache_filters", array("filter"=>"tex", "md5key"=>$md5))) {
+            if (!$DB->record_exists("cache_filters", array("filter"=>"tex", "md5key"=>$md5))) {
+                $texcache = new stdClass();
                 $texcache->filter = 'tex';
                 $texcache->version = 1;
                 $texcache->md5key = $md5;
@@ -169,7 +182,7 @@ class filter_tex extends moodle_text_filter {
                 $DB->insert_record("cache_filters", $texcache, false);
             }
             $filename = $md5 . ".{$CFG->filter_tex_convertformat}";
-            $text = str_replace( $matches[0][$i], filter_text_image($filename, $texexp, '', '', $align, $alt), $text);
+            $text = str_replace( $matches[0][$i], filter_text_image($filename, $texexp, 0, 0, $align, $alt), $text);
         }
         return $text;
     }
index 29ca17d..c0244e8 100644 (file)
@@ -1,4 +1,27 @@
 <?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/>.
+
+/**
+ * TeX filter settings
+ *
+ * @package    filter
+ * @subpackage tex
+ * @copyright  2007 Petr Skoda {@link http://skodak.org}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 
 defined('MOODLE_INTERNAL') || die;
 
index f7166ed..8290d7b 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 // This file is part of Moodle - http://moodle.org/
 //
 // Moodle is free software: you can redistribute it and/or modify
 /**
  * Strings for component 'filter_tex', language 'en', branch 'MOODLE_20_STABLE'
  *
- * @package   filter_tex
- * @copyright 1999 onwards Martin Dougiamas  {@link http://moodle.com}
- * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package    filter
+ * @subpackage tex
+ * @copyright  1999 onwards Martin Dougiamas  {@link http://moodle.com}
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
 $string['filtername'] = 'TeX notation';
+$string['source'] = 'TeX source';
index a0b7d1c..5f56922 100644 (file)
@@ -1,4 +1,28 @@
 <?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/>.
+
+/**
+ * TeX filter library functions.
+ *
+ * @package    filter
+ * @subpackage tex
+ * @copyright  2004 Zbigniew Fiedorowicz fiedorow@math.ohio-state.edu
+ *             Originally based on code provided by Bruno Vernier bruno@vsbeducation.ca
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 
 defined('MOODLE_INTERNAL') || die();
 
index 45b1b79..deb43d5 100644 (file)
@@ -42,7 +42,7 @@ define('NO_MOODLE_COOKIES', true); // Because it interferes with caching
             $latex = new latex();
             $density = $CFG->filter_tex_density;
             $background = $CFG->filter_tex_latexbackground;
-            $texexp = html_entity_decode($texcache->rawtext);
+            $texexp = $texcache->rawtext; // the entities are now decoded before inserting to DB
             $latex_path = $latex->render($texexp, $md5, 12, $density, $background);
             if ($latex_path) {
                 copy($latex_path, $pathname);
index a53f2ee..35f1afb 100644 (file)
@@ -1,7 +1,30 @@
 <?php
-      // This function fetches math. images from the data directory
-      // If not, it obtains the corresponding TeX expression from the cache_tex db table
-      // and uses mimeTeX to create the image file
+// 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 function fetches math. images from the data directory
+ * If not, it obtains the corresponding TeX expression from the cache_tex db table
+ * and uses mimeTeX to create the image file
+ *
+ * @package    filter
+ * @subpackage tex
+ * @copyright  2004 Zbigniew Fiedorowicz fiedorow@math.ohio-state.edu
+ *             Originally based on code provided by Bruno Vernier bruno@vsbeducation.ca
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
 
     require_once("../../config.php");
 
@@ -19,7 +42,6 @@
     require_login();
     require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM), $USER->id); /// Required cap to run this. MDL-18552
 
-    $query = urldecode($_SERVER['QUERY_STRING']);
     $output = '';
 
     // look up in cache if required
         header("Content-type: text/html; charset=utf-8");
         echo "<html><body><pre>\n";
         if ($texexp) {
-            $texexp = str_replace('<', '&lt;', $texexp);
-            $texexp = str_replace('>', '&gt;', $texexp);
-            $texexp = str_replace('"', '&quot;', $texexp);
-            echo "$texexp\n\n";
+            echo s($texexp)."\n\n";
         } else {
             echo "No text output available\n\n";
         }
         $output .= execute($cmd);
 
         if (!$graphic) {
-            echo($output);
-        } else {
+            echo $output;
+        } else if (file_exists($img)){
             send_file($img, "$md5.{$CFG->filter_tex_convertformat}");
-         }
+        } else {
+            echo "Error creating image, see command execution output for more details.";
+        }
     }
 
     function execute($cmd) {
index d7ceba5..9c5df14 100644 (file)
@@ -26,4 +26,4 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$plugin->version = 2010073000;
+$plugin->version = 2011031301;
diff --git a/install/lang/de_kids/langconfig.php b/install/lang/de_kids/langconfig.php
new file mode 100644 (file)
index 0000000..1ebd9f7
--- /dev/null
@@ -0,0 +1,33 @@
+<?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/>.
+
+/**
+ * Automatically generated strings for Moodle installer
+ *
+ * Do not edit this file manually! It contains just a subset of strings
+ * needed during the very first steps of installation. This file was
+ * generated automatically by export-installer.php (which is part of AMOS
+ * {@link http://docs.moodle.org/en/Development:Languages/AMOS}) using the
+ * list of strings defined in /install/stringnames.txt.
+ *
+ * @package   installer
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+$string['parentlanguage'] = 'de_du';
+$string['thisdirection'] = '';
+$string['thislanguage'] = 'Deutsch - Kids';
index 1f5ef1c..f3d7407 100644 (file)
  * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
+$string['clianswerno'] = 'n';
+$string['cliansweryes'] = 't';
 $string['cliincorrectvalueerror'] = 'Błąd, niepoprawna wartość "{$a->value}" dla "{$a->option}"';
 $string['cliincorrectvalueretry'] = 'Nieprawidłowa wartość, spróbuj ponownie';
 $string['clitypevalue'] = 'typ wartości';
 $string['clitypevaluedefault'] = 'typ wartości, naciśnij Enter, aby użyć wartości domyślnej ({$a})';
+$string['cliunknowoption'] = 'Nieznana opcja:
+  {$a}
+Proszę użyć pomocy.';
 $string['cliyesnoprompt'] = 'wpisz y (czyli tak) lub n (czyli nie)';
 $string['environmentrequireinstall'] = 'jest niezbędnę, żeby było zainstalowane/włączone';
 $string['environmentrequireversion'] = 'wersja {$a->needed} jest niezbędna a ty używasz wersji {$a->current}';
index 5e2ea90..c41f37d 100644 (file)
@@ -32,12 +32,14 @@ $string['admindirname'] = 'Katalog admin';
 $string['availablelangs'] = 'Dostępne paczki językowe';
 $string['chooselanguagehead'] = 'Wybierz język';
 $string['chooselanguagesub'] = 'Proszę wybrać język TYLKO do instalacji. Stronę i języki dla użytkowników będzie można wybrać na następnym ekranie.';
+$string['clialreadyinstalled'] = 'Plik config.php już istnieje, użyj admin/cli/upgrade.php jeśli chcesz uaktualnić witrynę.';
 $string['databasehost'] = 'Host bazy danych';
 $string['databasename'] = 'Nazwa bazy danych';
 $string['dataroot'] = 'Katalog z danymi';
 $string['dbprefix'] = 'Prefiks tabel';
 $string['dirroot'] = 'Katalog Moodle';
 $string['environmenthead'] = 'Sprawdzam środowisko (ustawienia) ...';
+$string['errorsinenvironment'] = 'Kontrola środowiska zakończona niepowodzeniem!';
 $string['installation'] = 'Instalacja';
 $string['langdownloaderror'] = 'Niestety język "{$a}" nie może zostać pobrany. Proces instalacji będzie kontynuowany w języku angielskim.';
 $string['memorylimithelp'] = '<p>Limit pamięci PHP dla Twojego serwera jest ustawiony obecnie na {$a}.</p>
@@ -54,7 +56,13 @@ Pozwoli to Moodle ustawić samoczynnie limit pamięci.</li>
 <blockquote><div>php_value memory_limit 40M</div></blockquote>
 <p>Jednakże na niektórych serwerach będzie uniemożliwiało to poprawne działanie <b>wszystkich</b> stron PHP (ujrzysz błędy na wyświetlanych stronach), wtedy będziesz musiał usunąć plik .htaccess.</p></li>
 </ol>';
+$string['paths'] = 'Ścieżki';
+$string['pathserrcreatedataroot'] = 'Katalog danych ({$a->dataroot}) nie może zostać utworzony przez instalator.';
+$string['pathshead'] = 'Potwierdź ścieżki';
+$string['pathsrodataroot'] = 'Główny katalog danych nie ma uprawnień do zapisu. ';
 $string['pathsroparentdataroot'] = 'Nadrzędny katalog ({$a->parent}) jest tylko do odczytu. Katalog danych ({$a->dataroot}) nie może zostać utworzony przez instalator. ';
+$string['pathssubdirroot'] = 'Pełna ścieżka do katalogu z instalacją Moodle.';
+$string['pathsunsecuredataroot'] = 'Lokalizacja głównego katalogu danych nie jest bezpieczna';
 $string['pathswrongadmindir'] = 'Katalog admin nie istnieje';
 $string['phpextension'] = '{$a} rozszerzenie PHP';
 $string['phpversion'] = 'Wersja PHP';
index 8e38044..f249aa3 100644 (file)
@@ -5967,10 +5967,14 @@ function any_new_admin_settings($node) {
  * @return bool success or fail
  */
 function db_replace($search, $replace) {
+    global $DB, $CFG, $OUTPUT;
 
-    global $DB, $CFG;
+    // TODO: this is horrible hack, we should do whitelisting and each plugin should be responsible for proper replacing...
+    $skiptables = array('config', 'config_plugins', 'config_log', 'upgrade_log',
+                        'filter_config', 'sessions', 'events_queue', 'repository_instance_config',
+                        'block_instances', 'block_pinned_old', 'block_instance_old', '');
 
-    /// Turn off time limits, sometimes upgrades can be slow.
+    // Turn off time limits, sometimes upgrades can be slow.
     @set_time_limit(0);
 
     if (!$tables = $DB->get_tables() ) {    // No tables yet at all.
@@ -5978,7 +5982,7 @@ function db_replace($search, $replace) {
     }
     foreach ($tables as $table) {
 
-        if (in_array($table, array('config'))) {      // Don't process these
+        if (in_array($table, $skiptables)) {      // Don't process these
             continue;
         }
 
@@ -5986,6 +5990,7 @@ function db_replace($search, $replace) {
             $DB->set_debug(true);
             foreach ($columns as $column => $data) {
                 if (in_array($data->meta_type, array('C', 'X'))) {  // Text stuff only
+                    //TODO: this should be definitively moved to DML driver to do the actual replace, this is not going to work for MSSQL and Oracle...
                     $DB->execute("UPDATE {".$table."} SET $column = REPLACE($column, ?, ?)", array($search, $replace));
                 }
             }
@@ -5993,6 +5998,31 @@ function db_replace($search, $replace) {
         }
     }
 
+    // delete modinfo caches
+    rebuild_course_cache(0, true);
+
+    // TODO: we should ask all plugins to do the search&replace, for now let's do only blocks...
+    $blocks = get_plugin_list('block');
+    foreach ($blocks as $blockname=>$fullblock) {
+        if ($blockname === 'NEWBLOCK') {   // Someone has unzipped the template, ignore it
+            continue;
+        }
+
+        if (!is_readable($fullblock.'/lib.php')) {
+            continue;
+        }
+
+        $function = 'block_'.$blockname.'_global_db_replace';
+        include_once($fullblock.'/lib.php');
+        if (!function_exists($function)) {
+            continue;
+        }
+
+        echo $OUTPUT->notification("Replacing in $blockname blocks...", 'notifysuccess');
+        $function($search, $replace);
+        echo $OUTPUT->notification("...finished", 'notifysuccess');
+    }
+
     return true;
 }
 
index 2dcf40f..a747101 100644 (file)
@@ -989,10 +989,10 @@ class completion_info {
 
         $sql  = "SELECT u.id ";
         $sql .= $tracked->sql;
-        $sql .= ' AND u.id = :user';
+        $sql .= ' AND u.id = :userid';
 
         $params = $tracked->data;
-        $params['user'] = (int)$userid;
+        $params['userid'] = (int)$userid;
         return $DB->record_exists_sql($sql, $params);
     }
 
index 5c338b5..96a70f0 100644 (file)
@@ -220,6 +220,47 @@ function enrol_check_plugins($user) {
     unset($inprogress[$user->id]);  // Unset the flag
 }
 
+/**
+ * Do these two students share any course?
+ *
+ * The courses has to be visible and enrolments has to be active,
+ * timestart and timeend restrictions are ignored.
+ *
+ * @param stdClass|int $user1
+ * @param stdClass|int $user2
+ * @return bool
+ */
+function enrol_sharing_course($user1, $user2) {
+    global $DB, $CFG;
+
+    $user1 = !empty($user1->id) ? $user1->id : $user1;
+    $user2 = !empty($user2->id) ? $user2->id : $user2;
+
+    if (empty($user1) or empty($user2)) {
+        return false;
+    }
+
+    if (!$plugins = explode(',', $CFG->enrol_plugins_enabled)) {
+        return false;
+    }
+
+    list($plugins, $params) = $DB->get_in_or_equal($plugins, SQL_PARAMS_NAMED, 'ee00');
+    $params['enabled'] = ENROL_INSTANCE_ENABLED;
+    $params['active1'] = ENROL_USER_ACTIVE;
+    $params['active2'] = ENROL_USER_ACTIVE;
+    $params['user1']   = $user1;
+    $params['user2']   = $user2;
+
+    $sql = "SELECT DISTINCT 'x'
+              FROM {enrol} e
+              JOIN {user_enrolments} ue1 ON (ue1.enrolid = e.id AND ue1.status = :active1 AND ue1.userid = :user1)
+              JOIN {user_enrolments} ue2 ON (ue1.enrolid = e.id AND ue1.status = :active2 AND ue2.userid = :user2)
+              JOIN {course} c ON (c.id = e.courseid AND c.visible = 1)
+             WHERE e.status = :enabled AND e.enrol $plugins";
+
+    return $DB->record_exists_sql($sql, $params);
+}
+
 /**
  * This function adds necessary enrol plugins UI into the course edit form.
  *
index 1addd11..def025c 100644 (file)
@@ -138,6 +138,15 @@ class MoodleExcelWorksheet {
      */
     function MoodleExcelWorksheet($name, &$workbook, $latin_output=false) {
 
+        if (strlen($name) > 31) {
+            // Excel does not seem able to cope with sheet names > 31 chars.
+            // With $latin_output = false, it does not cope at all.
+            // With $latin_output = true it is supposed to work, but in our experience,
+            // it doesn't. Therefore, truncate in all circumstances.
+            $textlib = textlib_get_instance();
+            $name = $textlib->substr($name, 0, 31);
+        }
+
     /// Internally, add one sheet to the workbook
         $this->pear_excel_worksheet =& $workbook->addWorksheet($name);
         $this->latin_output = $latin_output;
index ed5bdf8..3dc03a4 100644 (file)
@@ -66,6 +66,21 @@ class MoodleQuickForm_radio extends HTML_QuickForm_radio{
             return 'default';
         }
     }
+    /**
+     * Returns the disabled field. Accessibility: the return "( )" from parent
+     * class is not acceptable for screenreader users, and we DO want a label.
+     * @return string
+     */
+    function getFrozenHtml()
+    {
+        $output = '<input type="radio" disabled="disabled" id="'.$this->getAttribute('id').'" ';
+        if ($this->getChecked()) {
+            $output .= 'checked="checked" />'.$this->_getPersistantData();
+        } else {
+            $output .= '/>';
+        }
+        return $output;
+    }
     function toHtml()
     {
         return '<span>' . parent::toHtml() . '</span>';
index 3231669..c237cc4 100644 (file)
@@ -1648,8 +1648,8 @@ class core_renderer extends renderer_base {
             $output .= $helpicon->linktext;
         }
 
-        // now create the link around it
-        $url = new moodle_url('/help.php', array('component' => $helpicon->component, 'identifier' => $helpicon->helpidentifier, 'lang'=>current_language()));
+        // now create the link around it - we need https on loginhttps pages
+        $url = new moodle_url($CFG->httpswwwroot.'/help.php', array('component' => $helpicon->component, 'identifier' => $helpicon->helpidentifier, 'lang'=>current_language()));
 
         // note: this title is displayed only if JS is disabled, otherwise the link will have the new ajax tooltip
         $title = get_string('helpprefix2', '', trim($helpicon->title, ". \t"));
@@ -1712,8 +1712,8 @@ class core_renderer extends renderer_base {
             $output .= $helpicon->linktext;
         }
 
-        // now create the link around it
-        $url = new moodle_url('/help.php', array('component' => $helpicon->component, 'identifier' => $helpicon->identifier, 'lang'=>current_language()));
+        // now create the link around it - we need https on loginhttps pages
+        $url = new moodle_url($CFG->httpswwwroot.'/help.php', array('component' => $helpicon->component, 'identifier' => $helpicon->identifier, 'lang'=>current_language()));
 
         // note: this title is displayed only if JS is disabled, otherwise the link will have the new ajax tooltip
         $title = get_string('helpprefix2', '', trim($title, ". \t"));
index a9d5127..93f21fd 100644 (file)
@@ -411,7 +411,7 @@ class page_requirements_manager {
                                                         array('saving', 'repository'), array('search', 'repository'), array('searching', 'repository'), array('size', 'repository'),
                                                         array('submit', 'repository'), array('sync', 'repository'), array('title', 'repository'), array('upload', 'repository'),
                                                         array('uploading', 'repository'), array('xhtmlerror', 'repository'),
-                                                        array('xhtml', 'quiz'), array('cancel'), array('chooselicense', 'repository'), array('author', 'repository'),
+                                                        array('cancel'), array('chooselicense', 'repository'), array('author', 'repository'),
                                                         array('ok', 'moodle'), array('error', 'moodle'), array('info', 'moodle'), array('norepositoriesavailable', 'repository'), array('norepositoriesexternalavailable', 'repository'),
                                                         array('nofilesattached', 'repository'), array('filepicker', 'repository'),
                                                         array('nofilesavailable', 'repository')
index 4abc493..7ec9386 100644 (file)
@@ -976,7 +976,7 @@ function format_text($text, $format = FORMAT_MOODLE, $options = NULL, $courseid_
     global $CFG, $COURSE, $DB, $PAGE;
     static $croncache = array();
 
-    if ($text === '') {
+    if ($text === '' || is_null($text)) {
         return ''; // no need to do any filters and cleaning
     }
 
@@ -2468,6 +2468,11 @@ function redirect($url, $message='', $delay=-1) {
     $encodedurl = preg_replace('/^.*href="([^"]*)".*$/', "\\1", clean_text('<a href="'.$encodedurl.'" />'));
 
     if ($delay == 0 && !$debugdisableredirect && !headers_sent()) {
+        // workaround for IIS bug http://support.microsoft.com/kb/q176113/
+        if (session_id()) {
+            session_get_instance()->write_close();
+        }
+
         //302 might not work for POST requests, 303 is ignored by obsolete clients.
         @header($_SERVER['SERVER_PROTOCOL'] . ' 303 See Other');
         @header('Location: '.$url);
index 6985b4e..ad6051a 100644 (file)
@@ -146,7 +146,7 @@ $string['forum'] = 'Forum';
 $string['forum:addnews'] = 'Add news';
 $string['forumauthorhidden'] = 'Author (hidden)';
 $string['forumblockingalmosttoomanyposts'] = 'You are approaching the posting threshold. You have posted {$a->numposts} times in the last {$a->blockperiod} and the limit is {$a->blockafter} posts.';
-$string['forumbodyhidden'] = 'This post cannot be viewed by you, probably because you have not posted in the discussion yet.';
+$string['forumbodyhidden'] = 'This post cannot be viewed by you, probably because you have not posted in the discussion or the maximum editing time hasn\'t passed yet.';
 $string['forum:createattachment'] = 'Create attachments';
 $string['forum:deleteanypost'] = 'Delete any posts (anytime)';
 $string['forum:deleteownpost'] = 'Delete own posts (within deadline)';
index 92220f7..3900fff 100644 (file)
@@ -526,6 +526,11 @@ function forum_cron() {
                     // oops - this user should not receive anything from this course
                     continue;
                 }
+                // Don't send email if the forum is Q&A and the user has not posted
+                if ($forum->type == 'qanda' && !forum_get_user_posted_time($discussion->id, $userto->id)) {
+                    mtrace('Did not email '.$userto->id.' because user has not posted in discussion');
+                    continue;
+                }
 
                 // Get info about the sending user
                 if (array_key_exists($post->userid, $users)) { // we might know him/her already
@@ -4640,8 +4645,25 @@ function forum_user_has_posted($forumid, $did, $userid) {
                  WHERE p.userid = :userid AND d.forum = :forumid";
         return $DB->record_exists_sql($sql, array('forumid'=>$forumid,'userid'=>$userid));
     } else {
-    return $DB->record_exists('forum_posts', array('discussion'=>$did,'userid'=>$userid));
+        return $DB->record_exists('forum_posts', array('discussion'=>$did,'userid'=>$userid));
+    }
 }
+
+/**
+ * Returns creation time of the first user's post in given discussion
+ * @global object $DB
+ * @param int $did Discussion id
+ * @param int $userid User id
+ * @return int|bool post creation time stamp or return false
+ */
+function forum_get_user_posted_time($did, $userid) {
+    global $DB;
+
+    $posttime = $DB->get_field('forum_posts', 'MIN(created)', array('userid'=>$userid, 'discussion'=>$did));
+    if (empty($posttime)) {
+        return false;
+    }
+    return $posttime;
 }
 
 /**
@@ -4893,7 +4915,7 @@ function forum_user_can_see_discussion($forum, $discussion, $context, $user=NULL
  * @return bool
  */
 function forum_user_can_see_post($forum, $discussion, $post, $user=NULL, $cm=NULL) {
-    global $USER, $DB;
+    global $CFG, $USER, $DB;
 
     // retrieve objects (yuk)
     if (is_numeric($forum)) {
@@ -4954,9 +4976,10 @@ function forum_user_can_see_post($forum, $discussion, $post, $user=NULL, $cm=NUL
     if ($forum->type == 'qanda') {
         $firstpost = forum_get_firstpost_from_discussion($discussion->id);
         $modcontext = get_context_instance(CONTEXT_MODULE, $cm->id);
+        $userfirstpost = forum_get_user_posted_time($discussion->id, $user->id);
 
-        return (forum_user_has_posted($forum->id,$discussion->id,$user->id) ||
-                $firstpost->id == $post->id ||
+        return (($userfirstpost !== false && (time() - $userfirstpost >= $CFG->maxeditingtime)) ||
+                $firstpost->id == $post->id || $post->userid == $user->id || $firstpost->userid == $user->id ||
                 has_capability('mod/forum:viewqandawithoutposting', $modcontext, $user->id, false));
     }
     return true;
index 7817e98..1efe7a8 100644 (file)
@@ -462,32 +462,43 @@ class quiz_attempt extends quiz {
     }
 
     /**
-     * Static function to create a new quiz_attempt object given an attemptid.
-     *
-     * @param integer $attemptid the attempt id.
-     * @return quiz_attempt the new quiz_attempt object
+     * Used by {create()} and {create_from_usage_id()}.
+     * @param array $conditions passed to $DB->get_record('quiz_attempts', $conditions).
      */
-    static public function create($attemptid) {
+    static protected function create_helper($conditions) {
         global $DB;
 
-        if (!$attempt = quiz_load_attempt($attemptid)) {
-            throw new moodle_exception('invalidattemptid', 'quiz');
-        }
-        if (!$quiz = $DB->get_record('quiz', array('id' => $attempt->quiz))) {
-            throw new moodle_exception('invalidquizid', 'quiz');
-        }
-        if (!$course = $DB->get_record('course', array('id' => $quiz->course))) {
-            throw new moodle_exception('invalidcoursemodule');
-        }
-        if (!$cm = get_coursemodule_from_instance('quiz', $quiz->id, $course->id)) {
-            throw new moodle_exception('invalidcoursemodule');
-        }
+        $attempt = $DB->get_record('quiz_attempts', $conditions, '*', MUST_EXIST);
+        $quiz = $DB->get_record('quiz', array('id' => $attempt->quiz), '*', MUST_EXIST);
+        $course = $DB->get_record('course', array('id' => $quiz->course), '*', MUST_EXIST);
+        $cm = get_coursemodule_from_instance('quiz', $quiz->id, $course->id, false, MUST_EXIST);
+
         // Update quiz with override information
         $quiz = quiz_update_effective_access($quiz, $attempt->userid);
 
         return new quiz_attempt($attempt, $quiz, $cm, $course);
     }
 
+    /**
+     * Static function to create a new quiz_attempt object given an attemptid.
+     *
+     * @param int $attemptid the attempt id.
+     * @return quiz_attempt the new quiz_attempt object
+     */
+    static public function create($attemptid) {
+        return self::create_helper(array('id' => $attemptid));
+    }
+
+    /**
+     * Static function to create a new quiz_attempt object given a usage id.
+     *
+     * @param int $usageid the attempt usage id.
+     * @return quiz_attempt the new quiz_attempt object
+     */
+    static public function create_from_unique_id($usageid) {
+        return self::create_helper(array('uniqueid' => $usageid));
+    }
+
     // Functions for loading more data =====================================================
     /**
      * Load the state of a number of questions that have already been loaded.
index 0030c2a..ac8e09b 100644 (file)
@@ -1770,11 +1770,11 @@ function quiz_pluginfile($course, $cm, $context, $filearea, $args, $forcedownloa
  * @return bool false if file not found, does not return if found - justsend the file
  */
 function quiz_question_pluginfile($course, $context, $component,
-        $filearea, $attemptid, $questionid, $args, $forcedownload) {
+        $filearea, $uniqueid, $questionid, $args, $forcedownload) {
     global $USER, $CFG;
     require_once($CFG->dirroot . '/mod/quiz/locallib.php');
 
-    $attemptobj = quiz_attempt::create($attemptid);
+    $attemptobj = quiz_attempt::create_from_unique_id($uniqueid);
     require_login($attemptobj->get_courseid(), false, $attemptobj->get_cm());
     $questionids = array($questionid);
     $attemptobj->load_questions($questionids);
index 240de7b..105d758 100644 (file)
@@ -40,7 +40,7 @@
             redirect($attemptobj->attempt_url(0, $page));
         } else if (!$options->responses) {
             $accessmanager->back_to_view_page($attemptobj->is_preview_user(),
-                    $accessmanager->cannot_review_message($attemptobj->get_attempt_state()));
+                    $accessmanager->cannot_review_message($options));
         }
 
     } else if (!$attemptobj->is_review_allowed()) {
index 0bfc86a..8b77589 100644 (file)
@@ -87,7 +87,8 @@ class question_essay_qtype extends default_questiontype {
         $feedback = '';
         if ($options->feedback && !empty($answers)) {
             foreach ($answers as $answer) {
-                $feedback = quiz_rewrite_question_urls($answer->feedback, 'pluginfile.php', $context->id, 'qtype_essay', 'feedback', array($state->attempt, $state->question), $answer->id);
+                $feedback = quiz_rewrite_question_urls($answer->feedback, 'pluginfile.php',
+                        $context->id, 'question', 'answerfeedback', array($state->attempt, $state->question), $answer->id);
                 $feedback = format_text($feedback, $answer->feedbackformat, $formatoptions, $cmoptions->course);
             }
         }
index 012cc43..ff1b340 100644 (file)
@@ -166,10 +166,6 @@ class embedded_cloze_qtype extends default_questiontype {
         }
 
         $question->category = $authorizedquestion->category;
-        $form->course = $course; // To pass the course object to
-                                 // save_question_options, where it is
-                                 // needed to call type specific
-                                 // save_question methods.
         $form->defaultgrade = $question->defaultgrade;
         $form->questiontext = $question->questiontext;
         $form->questiontextformat = 0;
@@ -599,6 +595,37 @@ class embedded_cloze_qtype extends default_questiontype {
         echo '</div>';
     }
 
+    public function compare_responses($question, $state, $teststate) {
+        global $QTYPES;
+
+        foreach ($question->options->questions as $key => $wrapped) {
+            if (empty($wrapped)) {
+                continue;
+            }
+
+            $stateforquestion = clone($state);
+            if (isset($state->responses[$key])) {
+                $stateforquestion->responses[''] = $state->responses[$key];
+            } else {
+                $stateforquestion->responses[''] = '';
+            }
+
+            $teststateforquestion = clone($teststate);
+            if (isset($teststate->responses[$key])) {
+                $teststateforquestion->responses[''] = $teststate->responses[$key];
+            } else {
+                $teststateforquestion->responses[''] = '';
+            }
+
+            if (!$QTYPES[$wrapped->qtype]->compare_responses($wrapped,
+                    $stateforquestion, $teststateforquestion)) {
+                return false;
+            }
+        }
+
+        return true;
+    }
+
     function grade_responses(&$question, &$state, $cmoptions) {
         global $QTYPES;
         $teststate = clone($state);
index 12d678d..b8b9704 100644 (file)
@@ -63,9 +63,9 @@
     ?> size="<?php echo $textlength;?>"/>
     <?php if ($state->responses['unit'] != '') echo $feedbackimgunit; 
     if ($options->feedback &&  $question->options->unitgradingtype == 1 && ! $valid_numerical_unit && ! $answerasterisk ){
-        if ( $empty_unit) {
+        if (!empty($empty_unit)) {
             print_string('unitmandatory', 'qtype_numerical'); 
-        }else {
+        } else {
             if(isset($question->options->units) && count($question->options->units) > 0){
                 $found = 0 ;
                 $valid_unit_found = 0 ;
index 68c7ad7..6f30b23 100644 (file)
@@ -812,7 +812,7 @@ M.core_filepicker.init = function(Y, options) {
             try {
                 panel.set('innerHTML', str);
             } catch(e) {
-                alert(e.toString()+M.str.quiz.xhtml);
+                alert(M.str.repository.xhtmlerror);
             }
             // register buttons
             // process login action
index 16ef62a..86cdce0 100644 (file)
@@ -150,6 +150,10 @@ tt {
        display: none;
 }
 
+.icon.hide {
+       display: inline;
+}
+
 .highlight {
        background: #ffc;
 }
old mode 100644 (file)
new mode 100755 (executable)
index 02d00c2..269c9eb
@@ -1,5 +1,7 @@
 <?php
 
+defined('MOODLE_INTERNAL') || die();
+
 // This file is part of Moodle - http://moodle.org/
 //
 // Moodle is free software: you can redistribute it and/or modify
  * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
+
 $THEME->name = 'formal_white';
 ////////////////////////////////////////////////////
 // Name of the theme. Most likely the name of
 // the directory in which this file resides.
 ////////////////////////////////////////////////////
 
-$THEME->parents = array('canvas','base');
+
+$THEME->parents = array('base','canvas');
 /////////////////////////////////////////////////////
 // Which existing theme(s) in the /theme/ directory
 // do you want this theme to extend. A theme can
@@ -46,101 +50,114 @@ $THEME->parents = array('canvas','base');
 // changes you want to your theme.
 ////////////////////////////////////////////////////
 
-$THEME->sheets = array('dock','base','general','fw_corners','formalwhite','settings');
-////////////////////////////////////////////////////
-// Name of the stylesheet(s) you've including in
-// this theme's /styles/ directory.
-////////////////////////////////////////////////////
 
 $THEME->parents_exclude_sheets = array(
     'canvas'=>array(
+        'core',
+        'pagelayout',
         'tabs',
+        'tables',
     ),
 );
+////////////////////////////////////////////////////
+// An array of stylesheets not to inherit from the
+// themes parents
+////////////////////////////////////////////////////
+
+
+$THEME->sheets = array('frame'     ,'menu', 'course',
+                       'pagelayout','core', 'calendar',
+                       'tabs'      ,'quiz', 'formal_white');
+////////////////////////////////////////////////////
+// Name of the stylesheet(s) you've including in
+// this theme's /styles/ directory.
+////////////////////////////////////////////////////
+
+
+$THEME->enable_dock = true;
+////////////////////////////////////////////////////
+// Do you want to use the new navigation dock?
+////////////////////////////////////////////////////
 
-$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->editor_sheets = array('editor');
+////////////////////////////////////////////////////
+// An array of stylesheets to include within the
+// body of the editor.
+////////////////////////////////////////////////////
 
-$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->layouts = array(
-    // Most pages - if we encounter an unknown or a missing page type, this one is used.
     'base' => array(
         'file' => 'general.php',
-        'regions' => array()
+        'regions' => array('side-pre', 'side-post'),
+        'defaultregion' => 'side-post',
     ),
-    'standard' => array(
+    'general' => array(
         'file' => 'general.php',
-        'regions' => array('side-post'),
-        'defaultregion' => 'side-post'
+        'regions' => array('side-pre', 'side-post'),
+        'defaultregion' => 'side-post',
     ),
-    // Course page
     'course' => array(
         'file' => 'general.php',
         'regions' => array('side-pre', 'side-post'),
-        'defaultregion' => 'side-post'
+        'defaultregion' => 'side-post',
+        'options' => array('langmenu'=>true),
     ),
-    // Course page
     'coursecategory' => array(
         'file' => 'general.php',
         'regions' => array('side-pre', 'side-post'),
-        'defaultregion' => 'side-post'
+        'defaultregion' => 'side-post',
     ),
     'incourse' => array(
         'file' => 'general.php',
         'regions' => array('side-pre', 'side-post'),
-        'defaultregion' => 'side-post'
+        'defaultregion' => 'side-post',
     ),
     'frontpage' => array(
-        'file' => 'general.php',
+        'file' => 'frontpage.php',
         'regions' => array('side-pre', 'side-post'),
-        'defaultregion' => 'side-pre'
+        'defaultregion' => 'side-post',
+        'options' => array('langmenu'=>true),
     ),
     'admin' => array(
         'file' => 'general.php',
         'regions' => array('side-pre'),
-        'defaultregion' => 'side-pre'
+        'defaultregion' => 'side-pre',
     ),
     'mydashboard' => array(
         'file' => 'general.php',
         'regions' => array('side-pre', 'side-post'),
-        'defaultregion' => 'side-post'
+        'defaultregion' => 'side-post',
+        'options' => array('langmenu'=>true),
     ),
     'mypublic' => array(
         'file' => 'general.php',
         'regions' => array('side-pre', 'side-post'),
-        'defaultregion' => 'side-post'
+        'defaultregion' => 'side-post',
     ),
     'login' => array(
         'file' => 'general.php',
-        'regions' => array()
+        'regions' => array(),
+        'options' => array('langmenu'=>true),
     ),
     // Pages that appear in pop-up windows - no navigation, no blocks, no header.
     'popup' => array(
-        'file' => 'general.php',
+        'file' => 'embedded.php',
         'regions' => array(),
-        'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>true),
+        'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>true),
     ),
     // No blocks and minimal footer - used for legacy frame layouts only!
     'frametop' => array(
         'file' => 'general.php',
         'regions' => array(),
-        'options' => array('nofooter', 'noblocks'=>true),
+        'options' => array('nofooter'=>true),
     ),
-    // Embeded pages, like iframe embeded in moodleform
+    // Embeded pages, like iframe embeded in moodleform (chat)
     'embedded' => array(
-        'file' => 'general.php',
+        'file' => 'embedded.php',
         'regions' => array(),
-        'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>true),
+        'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>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
@@ -148,7 +165,7 @@ $THEME->layouts = array(
     'maintenance' => array(
         'file' => 'general.php',
         'regions' => array(),
-        'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>true),
+        'options' => array('nofooter'=>true, 'nonavbar'=>true),
     ),
     // Should display the content and basic headers only.
     'print' => array(
@@ -157,19 +174,98 @@ $THEME->layouts = array(
         'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
     ),
     'report' => array(
-        'file' => 'report.php',
+        'file' => 'general.php',
         'regions' => array('side-pre'),
-        'defaultregion' => 'side-pre'
+        'defaultregion' => 'side-pre',
     ),
 );
+///////////////////////////////////////////////////////////////
+// These are all of the possible layouts in Moodle. The
+// simplest way to do this is to keep the theme and file
+// variables the same for every layout. Including them
+// all in this way allows some flexibility down the road
+// if you want to add a different layout template to a
+// specific page.
+///////////////////////////////////////////////////////////////
 
-$THEME->rendererfactory = 'theme_overridden_renderer_factory';
-$THEME->enable_dock = true;
-$THEME->javascripts_footer = array('navigation');
 
-/**
- * Sets the function that will replace our settings within the CSS
- */
-$THEME->csspostprocess = 'formalwhite_process_css';
+$THEME->csspostprocess = 'formal_white_user_settings';
+////////////////////////////////////////////////////
+// Allows the user to provide the name of a function
+// that all CSS should be passed to before being
+// delivered.
+////////////////////////////////////////////////////
+
+
+// $THEME->filter_mediaplugin_colors
+////////////////////////////////////////////////////
+// Used to control the colours used in the small
+// media player for the filters
+////////////////////////////////////////////////////
 
-$THEME->editor_sheets = array('editor');
\ No newline at end of file
+
+// $THEME->javascripts
+////////////////////////////////////////////////////
+// An array containing the names of JavaScript files
+// located in /javascript/ to include in the theme.
+// (gets included in the head)
+////////////////////////////////////////////////////
+
+
+// $THEME->javascripts_footer
+////////////////////////////////////////////////////
+// As above but will be included in the page footer.
+////////////////////////////////////////////////////
+
+
+//$THEME->larrow = "&#60";
+////////////////////////////////////////////////////
+// Overrides the left arrow image used throughout
+// Moodle
+////////////////////////////////////////////////////
+
+
+//$THEME->rarrow = "&#62";
+////////////////////////////////////////////////////
+// Overrides the right arrow image used throughout Moodle
+////////////////////////////////////////////////////
+
+
+// $THEME->layouts
+////////////////////////////////////////////////////
+// An array setting the layouts for the theme
+////////////////////////////////////////////////////
+
+
+// $THEME->parents_exclude_javascripts
+////////////////////////////////////////////////////
+// An array of JavaScript files NOT to inherit from
+// the themes parents
+////////////////////////////////////////////////////
+
+
+// $THEME->parents_exclude_sheets
+////////////////////////////////////////////////////
+// An array of stylesheets not to inherit from the
+// themes parents
+////////////////////////////////////////////////////
+
+
+// $THEME->plugins_exclude_sheets
+////////////////////////////////////////////////////
+// An array of plugin sheets to ignore and not
+// include.
+////////////////////////////////////////////////////
+
+
+// $THEME->rendererfactory
+////////////////////////////////////////////////////
+// Sets a custom render factory to use with the
+// theme, used when working with custom renderers.
+////////////////////////////////////////////////////
+
+
+// $THEME->resource_mp3player_colors
+////////////////////////////////////////////////////
+// Controls the colours for the MP3 player
+////////////////////////////////////////////////////
\ No newline at end of file
diff --git a/theme/formal_white/javascript/navigation.js b/theme/formal_white/javascript/navigation.js
deleted file mode 100644 (file)
index 1f6b1e1..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- * Customises the dock for the fw theme and does some other cool stuff
- */
-function customise_dock_for_theme() {
-    // If we don't have M.core_dock or Y then bail
-    if (!M.core_dock) {
-        return false;
-    }
-    // Change the defautl remove all icon to work with our black dock
-    M.core_dock.cfg.display.removeallicon = M.util.image_url('dock_removeall', 'theme');
-
-    // On draw completed add the ability to move the dock to from the left to the right
-    M.core_dock.on('dock:drawcompleted', fw.dock.enable_side_switching, fw.dock);
-    // When the dock is first drawn check to see if it should be moved
-    M.core_dock.on('dock:drawstarted', fw.dock.check_initial_position, fw.dock);
-    // Corrects the panel x position for the theme
-    M.core_dock.on('dock:itemadded', function(item) {
-        item.on('dockeditem:showstart', fw.dock.correct_panel_x_position, fw.dock, item);
-        item.on('dockeditem:resizecomplete', fw.dock.correct_panel_x_position, fw.dock, item);
-    });
-
-    // Override the default fix_title_orientation method with our fw method
-    // this will use SVG and rotate the text if possible.
-    M.core_dock.genericblock.prototype.fix_title_orientation = fw.dock.fix_title_orientation;
-    M.core_dock.genericblock.prototype.resize_block_space = fw.dock.resize_block_space;
-    return true;
-}
-
-var fw = (function(){
-    return {
-        namespaces : {
-            svg : 'http://www.w3.org/2000/svg'
-        },
-        dock : {
-            enable_side_switching : function() {
-                var movedock = M.core_dock.Y.Node.create('<img src="'+M.util.image_url('movedock', 'theme')+'" />');
-                var c = M.core_dock.node.one('.controls');
-                c.insertBefore(M.core_dock.Y.Node.create('<br />'), c.one('img'));
-                c.insertBefore(movedock, c.one('br'));
-                movedock.on('click', this.switch_dock_side);
-            },
-            correct_panel_x_position : function(item) {
-                var dockoffset = M.core_dock.Y.one('#dock_item_'+item.id+'_title').get('offsetWidth');
-                var panelwidth = M.core_dock.Y.one(item.panel.body).get('offsetWidth');
-                var screenwidth = parseInt(M.core_dock.Y.get(document.body).get('winWidth'));
-                switch (M.core_dock.cfg.position) {
-                    case 'left':
-                        item.panel.cfg.setProperty('x', dockoffset);
-                        break;
-                    case 'right':
-                        item.panel.cfg.setProperty('x', (screenwidth-panelwidth-dockoffset-5));
-                        break;
-                }
-            },
-            switch_dock_side : function () {
-                var oldorientation = M.core_dock.cfg.orientation;
-                var oldclass = M.core_dock.cfg.css.dock+'_'+M.core_dock.cfg.position+'_'+oldorientation;
-                switch (M.core_dock.cfg.position) {
-                    case 'right':
-                        M.core_dock.cfg.position = 'left';
-                        M.core_dock.cfg.orientation = 'vertical';
-                        break;
-                    case 'left':
-                        M.core_dock.cfg.position = 'right';
-                        M.core_dock.cfg.orientation = 'vertical';
-                        break;
-                }
-                var newclass = M.core_dock.cfg.css.dock+'_'+M.core_dock.cfg.position+'_'+M.core_dock.cfg.orientation;
-                M.core_dock.node.replaceClass(oldclass, newclass);
-                M.core_dock.Y.Cookie.set('dock_position', M.core_dock.cfg.position);
-            },
-            check_initial_position : function () {
-                var cookieposition = M.core_dock.Y.Cookie.get('dock_position');
-                if (cookieposition && cookieposition != 'null' && cookieposition !== M.core_dock.cfg.position) {
-                    var oldclass = M.core_dock.cfg.css.dock+'_'+M.core_dock.cfg.position+'_'+M.core_dock.cfg.orientation;
-                    M.core_dock.cfg.position = cookieposition;
-                    if (M.core_dock.node) {
-                        var newclass = M.core_dock.cfg.css.dock+'_'+M.core_dock.cfg.position+'_'+M.core_dock.cfg.orientation;
-                        M.core_dock.node.replaceClass(oldclass, newclass);
-                    }
-                }
-            },
-            fix_title_orientation : function (node) {
-                if (M.core_dock.cfg.orientation == 'vertical') {
-                    return fw.transform.make_vertical_text(node);
-                }
-                return node;
-            },
-            resize_block_space : function (node) {
-                var blockregions = {
-                    pre: {hasblocks:true,c:'side-pre-only'},
-                    post: {hasblocks:true,c:'side-post-only'},
-                    noblocksc:'noblocks'
-                };
-                M.core_dock.Y.all('div.block-region').each(function(blockregion){
-                    if (blockregion.hasClass('side-pre') && blockregion.all('.block').size() == 0) {
-                        blockregions.pre.hasblocks = false;
-                    } else if (blockregion.hasClass('side-post') && blockregion.all('.block').size() == 0) {
-                        blockregions.post.hasblocks = false;
-                    }
-                });
-                if (blockregions.pre.hasblocks && blockregions.post.hasblocks) {
-                    // No classes required both regions have blocks
-                    M.core_dock.Y.one(document.body).removeClass(blockregions.pre.c).removeClass(blockregions.post.c).removeClass(blockregions.noblocksc);
-                } else if (blockregions.pre.hasblocks) {
-                    // side-pre-only required: remove any other classes
-                    M.core_dock.Y.one(document.body).addClass(blockregions.pre.c).removeClass(blockregions.post.c).removeClass(blockregions.noblocksc);
-                } else if (blockregions.post.hasblocks) {
-                    // side-post-only required: remove any other classes
-                    M.core_dock.Y.one(document.body).removeClass(blockregions.pre.c).addClass(blockregions.post.c).removeClass(blockregions.noblocksc);
-                } else {
-                    // All blocks have been docked: add noblocks remove side-xxx-only's if set
-                    M.core_dock.Y.one(document.body).removeClass(blockregions.pre.c).removeClass(blockregions.post.c).addClass(blockregions.noblocksc);
-                }
-                return '200px';
-            }
-        },
-        transform : {
-            make_vertical_text : function(node) {
-
-                if (YAHOO.env.ua.ie > 0) {
-                    if (YAHOO.env.ua.ie > 7) {
-                        node.setAttribute('style', 'writing-mode: tb-rl; filter: flipV flipH;');
-                    } else {
-                        node.innerHTML = node.innerHTML.replace(/(.)/g, "$1<br />");
-                    }
-                    return node;
-                }
-
-                var test = M.core_dock.Y.Node.create('<div><span>'+node.firstChild.nodeValue+'</span></div>');
-                M.core_dock.Y.one(document.body).append(test);
-                var height = test.one('span').get('offsetWidth');
-                test.remove();
-
-                var txt = document.createElementNS(fw.namespaces.svg, 'text');
-                txt.setAttribute('x', '0');
-                txt.setAttribute('y', '0');
-                txt.setAttribute('transform','rotate(90, 5, 5)');
-                txt.appendChild(document.createTextNode(node.firstChild.nodeValue));
-
-                var svg = document.createElementNS(fw.namespaces.svg, 'svg');
-                svg.setAttribute('version', '1.1');
-                svg.setAttribute('height', height);
-                svg.setAttribute('width', 30);
-                svg.appendChild(txt);
-
-                var div = document.createElement(node.nodeName);
-                div.appendChild(svg);
-
-                return div;
-            }
-        }
-    }
-})();
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 1905fe5..ed545af
  * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
+$string['blockcolumnbgc'] = 'Blocks columns background colour';
+$string['blockcolumnbgcdesc'] = 'This sets the blocks columns background colour for the theme.';
+$string['blockcolumnwidth'] = 'Blocks colum width';
+$string['blockcolumnwidthdesc'] = 'This sets the blocks column width for the theme. <strong>Using widths lower than 200px, the calendar block is not supposed to fit.</strong>';
+$string['blockcontentbgc'] = 'Blocks content background colour';
+$string['blockcontentbgcdesc'] = 'This sets the blocks content background colour for the theme.';
 $string['choosereadme'] = '
 <div class="clearfix">
-       <div class="theme_screenshot">
-       
-               <h2>Formal White</h2>
-               <img src="formal_white/pix/screenshot.gif" />
-               
-               <h3>Theme Discussion Forum:</h3>
-               <p><a href="http://moodle.org/mod/forum/view.php?id=46">http://moodle.org/mod/forum/view.php?id=46</a></p>
-               
-               <h3>Theme Credits</h3>
-               <p><a href="http://docs.moodle.org/en/Theme_credits">http://docs.moodle.org/en/Theme_credits</a></p>
-               
-               <h3>Theme Documentation:</h3>
-               <p><a href="http://docs.moodle.org/en/Themes">http://docs.moodle.org/en/Themes</a></p>
-               
-               <h3>Report a bug:</h3>
-               <p><a href="http://tracker.moodle.org">http://tracker.moodle.org</a></p>
-       </div>
-       
-       <div class="theme_description">
-               
-               <h2>About</h2>
-               <p>Formal White is a fluid-width, three-column theme ported over to 2.0 from Moodle 1.X.</p>
-               
-               <h2>Tweaks</h2>
-               <p>This theme is built upon both Base and Canvas, two parent themes included in the Moodle core. If you want to modify this theme, we recommend that you first duplicate it, then rename it before making your changes. This will prevent your customized theme from being overwritten by future Moodle upgrades, and you\'ll still have the original files if you make a mess. More information on modifying themes can be found in the <a href="http://docs.moodle.org/en/Theme">MoodleDocs</a>.</p>
+    <div class="theme_screenshot">
+        <h2>Formal White</h2>
+        <img src="formal_white/pix/screenshot.gif" />
 
-       <h2>Credits</h2>
-       <p>This theme was coded and is maintained by MediaTouch 2000. </p>              
+        <h3>Theme Discussion Forum:</h3>
+        <p><a href="http://moodle.org/mod/forum/view.php?id=46">http://moodle.org/mod/forum/view.php?id=46</a></p>
 
-               <h2>License</h2>
-               <p>This, and all other themes included in the Moodle core, are licensed under the <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>.
-       </div>
-</div>';
+        <h3>Theme Credits</h3>
+        <p><a href="http://docs.moodle.org/en/Theme_credits">http://docs.moodle.org/en/Theme_credits</a></p>
 
-$string['pluginname'] = 'Formal white';
+        <h3>Theme Documentation:</h3>
+        <p><a href="http://docs.moodle.org/en/Themes">http://docs.moodle.org/en/Themes</a></p>
 
-$string['backgroundcolor'] = 'Blocks background colour';
-$string['backgroundcolordesc'] = 'This sets the blocks background colour for the theme.';
-$string['configtitle'] = 'Formal_white settings';
+        <h3>Report a bug:</h3>
+        <p><a href="http://tracker.moodle.org">http://tracker.moodle.org</a></p>
+    </div>
+    <div class="theme_description">
+        <h2>About</h2>
+        <p>Formal White is a fluid-width, three-column theme ported over to 2.0 from Moodle 1.X.</p>
+        <h2>Tweaks</h2>
+        <p>This theme is built upon both Base and Canvas, two parent themes included in the Moodle core. If you want to modify this theme, we recommend that you first duplicate it, then rename it before making your changes. This will prevent your customized theme from being overwritten by future Moodle upgrades, and you\'ll still have the original files if you make a mess. More information on modifying themes can be found in the <a href="http://docs.moodle.org/en/Theme">MoodleDocs</a>.</p>
+    <h2>Credits</h2>
+    <p>This theme was coded and is maintained by MediaTouch 2000. </p>
+        <h2>License</h2>
+        <p>This, and all other themes included in the Moodle core, are licensed under the <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>.
+    </div>
+</div>';
+$string['configtitle'] = 'Formal white theme';
 $string['customcss'] = 'Custom CSS';
 $string['customcssdesc'] = 'Any CSS you enter here will be added to every page allowing your to easily customise this theme.';
+$string['displaylogo'] = 'Pages header content';
+$string['displaylogodesc'] = 'Choose whether display moodle logo or page heading text in the header.';
 $string['footnote'] = 'Footnote';
 $string['footnotedesc'] = 'The content from this textarea will be displayed in the footer of every page.';
-$string['logo'] = 'Logo';
-$string['logodesc'] = 'Enter the URL to an image to use as the logo for this site. Should be http://www.yoursite.com/path/to/logo.png<br />Preferred picture height is 100 pixels';
+$string['headerbgc'] = 'Header background colour';
+$string['headerbgcdesc'] = 'This sets the blocks header background colour for the theme.';
+$string['heading'] = 'Display page heading';
+$string['logo'] = 'logo';
+$string['logodesc'] = 'Change the logo of this theme by entering the URL to a new one (i.e., http://www.somesite/animage.png). As a reference, the default logo is 300px wide by 80px high. A transparent .png will work best.<br />The chosen logo will be shown in each page of the site without any distinction between front page and other pages.';
+$string['moodlelogo'] = 'Display moodle logo';
+$string['noframe'] = 'Formal white 1.9 look';
+$string['noframedesc'] = 'Select this option to require your moodle page to look like moodle 1.*, alias, without the surrounding frame.';
+$string['pluginname'] = 'Formal white';
+$string['region-side-post'] = 'Right';
+$string['region-side-pre'] = 'Left';
 $string['regionwidth'] = 'Column width';
-$string['regionwidthdesc'] = 'This sets the width of the two block regions that form the left and right columns.';
-$string['alwayslangmenu'] = 'Display languages menu';
-$string['alwayslangmenudesc'] = 'Select this option to ALWAYS display lang menu. Take care that lang menu will be shown only if your site managess more than a single language.';
+$string['regionwidthdesc'] = 'This sets the width of the two block regions that form the left and right columns.';
\ No newline at end of file
diff --git a/theme/formal_white/layout/embedded.php b/theme/formal_white/layout/embedded.php
new file mode 100755 (executable)
index 0000000..7aca05a
--- /dev/null
@@ -0,0 +1,34 @@
+<?php
+defined('MOODLE_INTERNAL') || die();
+
+echo $OUTPUT->doctype() ?>
+<html <?php echo $OUTPUT->htmlattributes() ?>>
+<head>
+    <title><?php echo $PAGE->title ?></title>
+    <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
+    <?php echo $OUTPUT->standard_head_html() ?>
+</head>
+<body id="<?php echo $PAGE->bodyid ?>" class="<?php echo $PAGE->bodyclasses ?>">
+<?php echo $OUTPUT->standard_top_of_body_html(); ?>
+
+    <div id="page-content">
+        <div id="region-main-box">
+            <div id="region-post-box">
+
+                <!-- main mandatory content of the moodle page  -->
+                <div id="region-main-wrap">
+                    <div id="region-main">
+                        <div class="region-content">
+                            <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
+                        </div>
+                    </div>
+                </div>
+                <!-- end of main mandatory content of the moodle page -->
+
+            </div>
+        </div>
+    </div>
+
+<?php echo $OUTPUT->standard_end_of_body_html(); ?>
+</body>
+</html>
\ No newline at end of file
diff --git a/theme/formal_white/layout/frontpage.php b/theme/formal_white/layout/frontpage.php
new file mode 100755 (executable)
index 0000000..08d632d
--- /dev/null
@@ -0,0 +1,216 @@
+<?php
+
+defined('MOODLE_INTERNAL') || die();
+
+$hasheading = $PAGE->heading;
+$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
+$hasfooter = (empty($PAGE->layout_options['nofooter']));
+
+$hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
+$hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
+
+$showsidepre = $hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT);
+$showsidepost = $hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT);
+
+$custommenu = $OUTPUT->custom_menu();
+$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
+
+$bodyclasses = array();
+if ($showsidepre && !$showsidepost) {
+    $bodyclasses[] = 'side-pre-only';
+} else if ($showsidepost && !$showsidepre) {
+    $bodyclasses[] = 'side-post-only';
+} else if (!$showsidepost && !$showsidepre) {
+    $bodyclasses[] = 'content-only';
+}
+
+if ($hascustommenu) {
+    $bodyclasses[] = 'has_custom_menu';
+}
+
+/************************************************************************************************/
+if (!empty($PAGE->theme->settings->logo)) {
+    $logourl = $PAGE->theme->settings->logo;
+} else {
+    $logourl = $OUTPUT->pix_url('logo', 'theme');
+}
+
+$hasframe = !isset($PAGE->theme->settings->noframe) || !$PAGE->theme->settings->noframe;
+
+$displaylogo = !isset($PAGE->theme->settings->displaylogo) || $PAGE->theme->settings->displaylogo;
+/************************************************************************************************/
+
+echo $OUTPUT->doctype() ?>
+<html <?php echo $OUTPUT->htmlattributes() ?>>
+<head>
+    <title><?php echo $PAGE->title ?></title>
+    <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
+    <?php echo $OUTPUT->standard_head_html() ?>
+</head>
+<body id="<?php echo $PAGE->bodyid ?>" class="<?php echo $PAGE->bodyclasses.' '.join(' ', $bodyclasses) ?>">
+    <?php echo $OUTPUT->standard_top_of_body_html();
+
+if ($hasframe) { ?>
+    <div id="frametop">
+        <div id="framebottom">
+            <div id="frametopright">
+                <div>&nbsp;</div>
+            </div>
+            <div id="frameleft">
+                <div id="frameright">
+                    <div id="wrapper">
+<?php } ?>
+
+<!-- begin of page-header -->
+            <?php if ($hasheading) { ?>
+                <div id="page-header">
+                    <?php if ($displaylogo) { ?>
+                        <div id="headerlogo">
+                            <img src="<?php echo $logourl ?>" alt="Custom logo here" />
+                        </div>
+                    <?php } else { ?>
+                        <h1 class="headerheading"><?php echo $PAGE->heading ?></h1>
+                    <?php } ?>
+
+                    <div class="headermenu">
+                        <?php
+                            echo $OUTPUT->login_info();
+                            if (($CFG->langmenu) && (!empty($PAGE->layout_options['langmenu']))) {
+                                echo $OUTPUT->lang_menu();
+                            }
+                            echo $PAGE->headingmenu;
+                        ?>
+                    </div>
+                </div>
+            <?php } ?>
+<!-- end of page-header -->
+
+<!-- begin of custom menu -->
+            <?php if ($hascustommenu) { ?>
+                <div id="custommenu"><?php echo $custommenu; ?></div>
+            <?php } ?>
+<!-- end of custom menu -->
+
+<!-- begin of navigation bar -->
+            <?php if ($hasnavbar) { ?>
+                <div class="navbar clearfix">
+                    <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
+                    <div class="navbutton"><?php echo $PAGE->button; ?></div>
+                </div>
+            <?php } ?>
+<!-- end of navigation bar -->
+
+<!-- start of moodle content -->
+            <div id="page-content">
+                <div id="region-main-box">
+                    <div id="region-post-box">
+
+                        <!-- main mandatory content of the moodle page  -->
+                        <div id="region-main-wrap">
+                            <div id="region-main">
+                                <div class="region-content">
+                                    <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
+                                </div>
+                            </div>
+                        </div>
+                        <!-- end of main mandatory content of the moodle page -->
+
+
+                        <!-- left column block - diplayed only if... -->
+                        <?php if ($hassidepre) { ?>
+                        <div id="region-pre" class="block-region">
+                            <div class="region-content">
+                                <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
+                            </div>
+                        </div>
+                        <?php } ?>
+                        <!-- end of left column block - diplayed only if... -->
+
+                        <!-- right column block - diplayed only if... -->
+                        <?php if ($hassidepost) { ?>
+                        <div id="region-post" class="block-region">
+                            <div class="region-content">
+                                <?php echo $OUTPUT->blocks_for_region('side-post') ?>
+                            </div>
+                        </div>
+                        <?php } ?>
+                        <!-- end of right column block - diplayed only if... -->
+
+                    </div>
+                </div>
+            </div>
+<!-- end of moodle content -->
+
+            <div class="clearfix"></div>
+
+<?php if ($hasframe) { ?>
+                    </div> <!-- end of wrapper -->
+                </div> <!-- </frameright> -->
+            </div> <!-- </frameleft> -->
+            <div id="framebottomright">
+                <div>&nbsp;</div>
+            </div>
+        </div> <!-- </framebottom> -->
+    </div> <!-- </frametop> -->
+
+<?php }
+
+if ($hasfooter) {
+    if ($hasframe) { ?>
+
+        <!-- START OF FOOTER -->
+        <div id="page-footer">
+        <?php if (!empty($PAGE->theme->settings->footnote)) { ?>
+            <div id="footerframetop">
+                <div id="footerframebottom">
+                    <div id="footerframetopright">
+                        <div>&nbsp;</div>
+                    </div>
+                    <div id="footerframeleft">
+                        <div id="footerframeright">
+                    <!-- the content to show -->
+                            <div id="footerwrapper">
+                                <?php echo $PAGE->theme->settings->footnote; ?>
+                            </div> <!-- end of footerwrapper -->
+                        </div>
+                    </div> <!-- </footerframeright></footerframeleft> -->
+                    <div id="footerframebottomright">
+                        <div>&nbsp;</div>
+                    </div>
+                </div>
+            </div> <!-- </footerframebottom></footerframetop> -->
+        <?php }
+        //manco di una div da chiudere
+
+    } else { ?>
+
+        <!-- START OF FOOTER -->
+        <div id="page-footer" class="noframefooter">
+            <?php if (!empty($PAGE->theme->settings->footnote)) { ?>
+                <div id="page-footer-content">
+
+                    <!-- the content to show -->
+                    <div id="footerwrapper">
+                        <?php echo $PAGE->theme->settings->footnote; ?>
+                    </div> <!-- end of footerwrapper -->
+
+                </div> <!-- end of page-footer_noframe-content -->
+            <?php }
+        //manco di una div da chiudere
+    } ?>
+            <div class="moodledocsleft">
+            <?php
+                //echo $OUTPUT->login_info();
+                //echo $OUTPUT->home_link();
+                echo $OUTPUT->standard_footer_html();
+            ?>
+            </div>
+            <div class="moodledocs">
+                <?php echo page_doc_link(get_string('moodledocslink')); ?>
+            </div>
+        </div> <!-- end of page-footer or page-footer_noframe -->
+<?php   //ho chiuso la div di cui mancavo prima
+}
+    echo $OUTPUT->standard_end_of_body_html(); ?>
+</body>
+</html>
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index dde5944..b220756
@@ -1,13 +1,16 @@
 <?php
 
-$hasheading = ($PAGE->heading);
+defined('MOODLE_INTERNAL') || die();
+
+$hasheading = $PAGE->heading;
 $hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
 $hasfooter = (empty($PAGE->layout_options['nofooter']));
-$hassidepre = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-pre', $OUTPUT));
-$hassidepost = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-post', $OUTPUT));
 
-$showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
-$showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT));
+$hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
+$hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
+
+$showsidepre = $hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT);
+$showsidepost = $hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT);
 
 $custommenu = $OUTPUT->custom_menu();
 $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
@@ -20,21 +23,22 @@ if ($showsidepre && !$showsidepost) {
 } else if (!$showsidepost && !$showsidepre) {
     $bodyclasses[] = 'content-only';
 }
+
 if ($hascustommenu) {
     $bodyclasses[] = 'has_custom_menu';
 }
 
+/************************************************************************************************/
 if (!empty($PAGE->theme->settings->logo)) {
     $logourl = $PAGE->theme->settings->logo;
 } else {
-    $logourl = $OUTPUT->pix_url('logo', 'theme');
+    $logourl = $OUTPUT->pix_url('logo_small', 'theme');
 }
 
-if (!empty($PAGE->theme->settings->footnote)) {
-    $footnote = $PAGE->theme->settings->footnote;
-} else {
-    $footnote = '<!-- There was no custom footnote set -->';
-}
+$hasframe = !isset($PAGE->theme->settings->noframe) || !$PAGE->theme->settings->noframe;
+
+$displaylogo = !isset($PAGE->theme->settings->displaylogo) || $PAGE->theme->settings->displaylogo;
+/************************************************************************************************/
 
 echo $OUTPUT->doctype() ?>
 <html <?php echo $OUTPUT->htmlattributes() ?>>
@@ -44,101 +48,168 @@ echo $OUTPUT->doctype() ?>
     <?php echo $OUTPUT->standard_head_html() ?>
 </head>
 <body id="<?php echo $PAGE->bodyid ?>" class="<?php echo $PAGE->bodyclasses.' '.join(' ', $bodyclasses) ?>">
-<?php echo $OUTPUT->standard_top_of_body_html() ?>
-<div id="page">
-    <div id="page2">
-        <div id="headerleft" class="headerleft"><div>&nbsp;</div></div>
-        <div id="bodyleft" class="bodyleft">
-            <div id="bodyright" class="bodyright">
-                <div id="header-i3" class="i3">
-                <?php  if ($hasheading || $hasnavbar) {  // This is what gets printed on the home page only
-                ?>
-                    <div id="header-home" class="clearfix">
-                        <div id="headerenvelop">
-
-                            <!-- //echo '<h1 class="logo headermain">'.$PAGE->heading.'</h1>'; -->
-                            <?php echo '<div id="logo"><img class="sitelogo" src="'.$logourl.'" alt="Custom logo here" /></div>';
-                            echo '<div class="headermenu">';
-                                echo $OUTPUT->login_info();
-                                if (!empty($PAGE->theme->settings->alwayslangmenu)) {
-                                    echo $OUTPUT->lang_menu();
-                                }
-                                echo $PAGE->headingmenu;
-                            echo '</div>'; // closes: <div class="headermenu">
-
-                        echo '</div>'; // closes: <div id="headerenvelop">
-                    echo '</div>'; // closes: <div id="header-home" class="clearfix">
-
-                    if ($hascustommenu) {
-                        echo '<div id="custommenu">'.$custommenu.'</div>';
-                    }
-
-                    //Accessibility: breadcrumb trail/navbar now a DIV, not a table.
-                    if ($hasnavbar) {
-                        echo '<div class="navbar clearfix">';
-                        echo '    <div class="breadcrumb">'.$OUTPUT->navbar().'</div>';
-                        echo '    <div class="navbutton">'.$PAGE->button.'</div>';
-                        echo '</div>';
-                    }
-
-                } ?>
-
-<!-- END OF HEADER -->
-
-                    <div id="page-content" class="shrinker">
-                    <!-- <div id="content" class="shrinker"> -->
-                        <div id="region-main-box">
-                            <div id="region-post-box">
-
-                                <div id="region-main-wrap">
-                                    <div id="region-main">
-                                        <div class="region-content">
-                                            <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
-                                        </div>
-                                    </div>
-                                </div>
+    <?php echo $OUTPUT->standard_top_of_body_html();
+
+if ($hasframe) { ?>
+    <div id="frametop">
+        <div id="framebottom">
+            <div id="frametopright">
+                <div>&nbsp;</div>
+            </div>
+            <div id="frameleft">
+                <div id="frameright">
+                    <div id="wrapper">
+<?php } ?>
 
-                                <?php if ($hassidepre) { ?>
-                                <div id="region-pre" class="block-region">
-                                    <div class="region-content">
-                                        <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
-                                    </div>
+<!-- begin of page-header -->
+            <?php if ($hasheading) { ?>
+                <div id="page-header">
+                    <?php if ($displaylogo) { ?>
+                        <div id="headerlogo">
+                            <img src="<?php echo $logourl ?>" alt="Custom logo here" />
+                        </div>
+                    <?php } else { ?>
+                        <h1 class="headerheading"><?php echo $PAGE->heading ?></h1>
+                    <?php } ?>
+
+                    <div class="headermenu">
+                        <?php
+                            echo $OUTPUT->login_info();
+                            if (($CFG->langmenu) && (!empty($PAGE->layout_options['langmenu']))) {
+                                echo $OUTPUT->lang_menu();
+                            }
+                            echo $PAGE->headingmenu;
+                        ?>
+                    </div>
+                </div>
+            <?php } ?>
+<!-- end of page-header -->
+
+<!-- begin of custom menu -->
+            <?php if ($hascustommenu) { ?>
+                <div id="custommenu"><?php echo $custommenu; ?></div>
+            <?php } ?>
+<!-- end of custom menu -->
+
+<!-- begin of navigation bar -->
+            <?php if ($hasnavbar) { ?>
+                <div class="navbar clearfix">
+                    <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
+                    <div class="navbutton"><?php echo $PAGE->button; ?></div>
+                </div>
+            <?php } ?>
+<!-- end of navigation bar -->
+
+<!-- start of moodle content -->
+            <div id="page-content">
+                <div id="region-main-box">
+                    <div id="region-post-box">
+
+                        <!-- main mandatory content of the moodle page  -->
+                        <div id="region-main-wrap">
+                            <div id="region-main">
+                                <div class="region-content">
+                                    <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
                                 </div>
-                                <?php } ?>
+                            </div>
+                        </div>
+                        <!-- end of main mandatory content of the moodle page -->
 
-                                <?php if ($hassidepost) { ?>
-                                <div id="region-post" class="block-region">
-                                    <div class="region-content">
-                                        <?php echo $OUTPUT->blocks_for_region('side-post') ?>
-                                    </div>
-                                </div>
-                                <?php } ?>
 
+                        <!-- left column block - diplayed only if... -->
+                        <?php if ($hassidepre) { ?>
+                        <div id="region-pre" class="block-region">
+                            <div class="region-content">
+                                <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
                             </div>
                         </div>
-                    <!-- </div> -->
-                    </div>
+                        <?php } ?>
+                        <!-- end of left column block - diplayed only if... -->
+
+                        <!-- right column block - diplayed only if... -->
+                        <?php if ($hassidepost) { ?>
+                        <div id="region-post" class="block-region">
+                            <div class="region-content">
+                                <?php echo $OUTPUT->blocks_for_region('side-post') ?>
+                            </div>
+                        </div>
+                        <?php } ?>
+                        <!-- end of right column block - diplayed only if... -->
 
-                               </div> <!-- closes: <div id="header-i3" class="i3"> -->
-                       </div> <!-- closes: <div id="bodyright" class="bodyright"> -->
-               </div> <!-- closes: <div id="bodyleft" class="bodyleft"> -->
-        <div id="contentfooter" class="contentfooter"><div>&nbsp;</div></div>
-    </div>  <!-- closes: <div id="page2"> -->
-</div> <!-- closes:<div id="page"> -->
-
-<!-- START OF FOOTER -->
-<?php if ($hasfooter) { ?>
-    <div id="page-footer" class="clearfix">
-        <?php echo $footnote; ?>
-        <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>
+                </div>
+            </div>
+<!-- end of moodle content -->
+
+            <div class="clearfix"></div>
+
+<?php if ($hasframe) { ?>
+                    </div> <!-- end of wrapper -->
+                </div> <!-- </frameright> -->
+            </div> <!-- </frameleft> -->
+            <div id="framebottomright">
+                <div>&nbsp;</div>
+            </div>
+        </div> <!-- </framebottom> -->
+    </div> <!-- </frametop> -->
+
+<?php }
+
+if ($hasfooter) {
+    if ($hasframe) { ?>
+
+        <!-- START OF FOOTER -->
+        <div id="page-footer">
+        <?php if (!empty($PAGE->theme->settings->footnote)) { ?>
+            <div id="footerframetop">
+                <div id="footerframebottom">
+                    <div id="footerframetopright">
+                        <div>&nbsp;</div>
+                    </div>
+                    <div id="footerframeleft">
+                        <div id="footerframeright">
+                            <!-- the content to show -->
+                            <div id="footerwrapper">
+                                <?php echo $PAGE->theme->settings->footnote; ?>
+                            </div> <!-- end of footerwrapper -->
+                        </div>
+                    </div> <!-- </footerframeright></footerframeleft> -->
+                    <div id="footerframebottomright">
+                        <div>&nbsp;</div>
+                    </div>
+                </div>
+            </div> <!-- </footerframebottom></footerframetop> -->
+        <?php }
+
+    } else { ?>
+
+        <!-- START OF FOOTER -->
+        <div id="page-footer" class="noframefooter">
+            <?php if (!empty($PAGE->theme->settings->footnote)) { ?>
+                <div id="page-footer-content">
+                    <!-- the content to show -->
+                    <div id="footerwrapper">
+                        <?php echo $PAGE->theme->settings->footnote; ?>
+                    </div> <!-- end of footerwrapper -->
+                </div> <!-- end of page-footer_noframe-content -->
+            <?php }
+
+    } ?>
+
+            <div class="moodledocsleft">
+            <?php
+                //echo $OUTPUT->login_info();
+                //echo $OUTPUT->home_link();
+                echo $OUTPUT->standard_footer_html();
+            ?>
+            </div>
+            <div class="moodledocs">
+                <?php echo page_doc_link(get_string('moodledocslink')); ?>
+            </div>
+        </div> <!-- end of page-footer or page-footer_noframe -->
+<?php   //ho chiuso la div di cui mancavo prima
+}
 
-<?php echo $OUTPUT->standard_end_of_body_html() ?>
+    echo $OUTPUT->standard_end_of_body_html(); ?>
 </body>
 </html>
\ No newline at end of file
diff --git a/theme/formal_white/layout/report.php b/theme/formal_white/layout/report.php
deleted file mode 100644 (file)
index ca1a082..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-<?php
-
-$hasheading = ($PAGE->heading);
-$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
-$hasfooter = (empty($PAGE->layout_options['nofooter']));
-$hassidepre = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-pre', $OUTPUT));
-$hassidepost = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-post', $OUTPUT));
-
-$showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
-$showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT));
-
-$custommenu = $OUTPUT->custom_menu();
-$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
-
-$bodyclasses = array();
-if ($showsidepre && !$showsidepost) {
-    $bodyclasses[] = 'side-pre-only';
-} else if ($showsidepost && !$showsidepre) {
-    $bodyclasses[] = 'side-post-only';
-} else if (!$showsidepost && !$showsidepre) {
-    $bodyclasses[] = 'content-only';
-}
-if ($hascustommenu) {
-    $bodyclasses[] = 'has_custom_menu';
-}
-
-if (!empty($PAGE->theme->settings->logo)) {
-    $logourl = $PAGE->theme->settings->logo;
-} else {
-    $logourl = $OUTPUT->pix_url('logo', 'theme');
-}
-
-if (!empty($PAGE->theme->settings->footnote)) {
-    $footnote = $PAGE->theme->settings->footnote;
-} else {
-    $footnote = '<!-- There was no custom footnote set -->';
-}
-
-echo $OUTPUT->doctype() ?>
-<html <?php echo $OUTPUT->htmlattributes() ?>>
-<head>
-    <title><?php echo $PAGE->title ?></title>
-    <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
-    <?php echo $OUTPUT->standard_head_html() ?>
-</head>
-<body id="<?php echo $PAGE->bodyid ?>" class="<?php echo $PAGE->bodyclasses.' '.join(' ', $bodyclasses) ?>">
-<?php echo $OUTPUT->standard_top_of_body_html() ?>
-<div id="page">
-    <div id="page2">
-        <div id="headerleft" class="headerleft"><div>&nbsp;</div></div>
-        <div id="bodyleft" class="bodyleft">
-            <div id="bodyright" class="bodyright">
-                <div id="header-i3" class="i3">
-                <?php  if ($hasheading || $hasnavbar) {  // This is what gets printed on the home page only
-                ?>
-                    <div id="header-home" class="clearfix">
-                        <div id="headerenvelop">
-
-                            <!-- //echo '<h1 class="logo headermain">'.$PAGE->heading.'</h1>'; -->
-                            <?php echo '<div id="logo"><img class="sitelogo" src="'.$logourl.'" alt="Custom logo here" /></div>';
-                            echo '<div class="headermenu">';
-                                echo $OUTPUT->login_info();
-                                if (!empty($PAGE->theme->settings->alwayslangmenu)) {
-                                    echo $OUTPUT->lang_menu();
-                                }
-                                echo $PAGE->headingmenu;
-                            echo '</div>'; // closes: <div class="headermenu">
-
-                        echo '</div>'; // closes: <div id="headerenvelop">
-                    echo '</div>'; // closes: <div id="header-home" class="clearfix">
-
-                    if ($hascustommenu) {
-                        echo '<div id="custommenu">'.$custommenu.'</div>';
-                    }
-
-                    //Accessibility: breadcrumb trail/navbar now a DIV, not a table.
-                    if ($hasnavbar) {
-                        echo '<div class="navbar clearfix">';
-                        echo '    <div class="breadcrumb">'.$OUTPUT->navbar().'</div>';
-                        echo '    <div class="navbutton">'.$PAGE->button.'</div>';
-                        echo '</div>';
-                    }
-
-                } ?>
-
-<!-- END OF HEADER -->
-
-                    <div id="page-content" class="clearfix shrinker">
-                        <div id="report-main-content">
-                            <div class="region-content">
-                                <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
-                            </div>
-                        </div>
-                        <?php if ($hassidepre) { ?>
-                        <div id="report-region-wrap">
-                            <div id="report-region-pre" class="block-region">
-                                <div class="region-content">
-                                    <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
-                                </div>
-                            </div>
-                        </div>
-                        <?php } ?>
-                    </div>
-
-                               </div> <!-- closes: <div id="header-i3" class="i3"> -->
-                       </div> <!-- closes: <div id="bodyright" class="bodyright"> -->
-               </div> <!-- closes: <div id="bodyleft" class="bodyleft"> -->
-        <div id="contentfooter" class="contentfooter"><div>&nbsp;</div></div>
-    </div>  <!-- closes: <div id="page2"> -->
-</div> <!-- closes:<div id="page"> -->
-
-<!-- START OF FOOTER -->
-<?php if ($hasfooter) { ?>
-    <div id="page-footer" class="clearfix">
-        <?php echo $footnote; ?>
-        <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 } ?>
-
-<?php echo $OUTPUT->standard_end_of_body_html() ?>
-</body>
-</html>
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 907dd6f..cbd5448
@@ -1,5 +1,7 @@
 <?php
 
+defined('MOODLE_INTERNAL') || die();
+
 /**
  * Makes our changes to the CSS
  *
@@ -7,86 +9,96 @@
  * @param theme_config $theme
  * @return string
  */
-function formalwhite_process_css($css, $theme) {
+function formal_white_user_settings($css, $theme) {
 
-    // Set the background color
-    if (!empty($theme->settings->backgroundcolor)) {
-        $backgroundcolor = $theme->settings->backgroundcolor;
+    // Set the page header background color
+    if (empty($theme->settings->headerbgc)) {
+        $headerbgc = '#E3DFD4'; // default (o forse è meglio #FEF9F6?)
     } else {
-        $backgroundcolor = null;
+        $headerbgc = $theme->settings->headerbgc;
     }
-    $css = formalwhite_set_backgroundcolor($css, $backgroundcolor);
+    $css = formal_white_set_headerbgc($css, $headerbgc);
 
-    // Set the region width
-    if (!empty($theme->settings->regionwidth)) {
-        $regionwidth = $theme->settings->regionwidth;
+    // Set the block content background color
+    if (empty($theme->settings->blockcontentbgc)) {
+        $blockcontentbgc = '#F6F6F6'; // default (o forse è meglio #FEF9F6?)
     } else {
-        $regionwidth = null;
+        $blockcontentbgc = $theme->settings->blockcontentbgc;
     }
-    $css = formalwhite_set_regionwidth($css, $regionwidth);
+    $css = formal_white_set_blockcontentbgc($css, $blockcontentbgc);
 
-    // Set the custom CSS
-    if (!empty($theme->settings->customcss)) {
-        $customcss = $theme->settings->customcss;
+    // Set the block column background color
+    if (empty($theme->settings->blockcolumnbgc)) {
+        $blockcolumnbgc = '#E3DFD4'; // default
     } else {
-        $customcss = null;
+        $blockcolumnbgc = $theme->settings->blockcolumnbgc;
     }
-    $css = formalwhite_set_customcss($css, $customcss);
+    $css = formal_white_set_blockcolumnbgc($css, $blockcolumnbgc);
+
+    // Set the logo image
+    if (!empty($theme->settings->logo)) {
+        $logo = $theme->settings->logo;
+    } else {
+        $logo = null;
+    }
+    $css = formal_white_set_logo($css, $logo);
+
+    // set the width of the two blocks colums
+    if (!empty($theme->settings->blockcolumnwidth)) {
+        $blockcolumnwidth = $theme->settings->blockcolumnwidth;
+    } else {
+        $blockcolumnwidth = '200'; // default
+    }
+    $css = formal_white_set_blockcolumnwidth($css, $blockcolumnwidth);
 
     // Return the CSS
     return $css;
 }
 
+
+
 /**
- * Sets the background colour variable in CSS
+ * Sets the link color variable in CSS
  *
- * @param string $css
- * @param mixed $backgroundcolor
- * @return string
  */
-function formalwhite_set_backgroundcolor($css, $backgroundcolor) {
-    $tag = '[[setting:backgroundcolor]]';
-    $replacement = $backgroundcolor;
-    if (is_null($replacement)) {
-        $replacement = '#F7F6F1';
-    }
-    $css = str_replace($tag, $replacement, $css);
+function formal_white_set_headerbgc($css, $headerbgc) {
+    $tag = '[[setting:headerbgc]]';
+    $css = str_replace($tag, $headerbgc, $css);
     return $css;
 }
 
-/**
- * Sets the region width variable in CSS
- *
- * @param string $css
- * @param mixed $regionwidth
- * @return string
- */
-function formalwhite_set_regionwidth($css, $regionwidth) {
-    $tag = '[[setting:regionwidth]]';
-    $doubletag = '[[setting:regionwidthdouble]]';
-    $replacement = $regionwidth;
-    if (is_null($replacement)) {
-        $replacement = 200;
-    }
-    $css = str_replace($tag, $replacement.'px', $css);
-    $css = str_replace($doubletag, ($replacement*2).'px', $css);
-    $css = str_replace($tag, ($replacement+10).'px', $css);
+function formal_white_set_blockcontentbgc($css, $blockcontentbgc) {
+    $tag = '[[setting:blockcontentbgc]]';
+    $css = str_replace($tag, $blockcontentbgc, $css);
     return $css;
 }
 
-/**
- * Sets the custom css variable in CSS
- *
- * @param string $css
- * @param mixed $customcss
- * @return string
- */
-function formalwhite_set_customcss($css, $customcss) {
-    $tag = '[[setting:customcss]]';
-    $replacement = $customcss;
-    if (is_null($replacement)) {
-        $replacement = '';
-    }
-    $css = str_replace($tag, $replacement, $css);
+function formal_white_set_blockcolumnbgc($css, $blockcolumnbgc) {
+    $tag = '[[setting:blockcolumnbgc]]';
+    $css = str_replace($tag, $blockcolumnbgc, $css);
+    return $css;
+}
+
+function formal_white_set_logo($css, $logo) {
+    global $OUTPUT;
+
+    $tag = '[[setting:logo]]';
+    if (is_null($logo)) {
+         $logo = $OUTPUT->pix_url('logo', 'theme');
+     }
+    $css = str_replace($tag, $logo, $css);
+    return $css;
+}
+
+function formal_white_set_blockcolumnwidth($css, $blockcolumnwidth) {
+    $tag = '[[setting:blockcolumnwidth]]';
+    $css = str_replace($tag, $blockcolumnwidth.'px', $css);
+
+    $tag = '[[setting:minusdoubleblockcolumnwidth]]';
+    $css = str_replace($tag, (-2*$blockcolumnwidth).'px', $css);
+
+    $tag = '[[setting:doubleblockcolumnwidth]]';
+    $css = str_replace($tag, (2*$blockcolumnwidth).'px', $css);
+
     return $css;
 }
\ No newline at end of file
diff --git a/theme/formal_white/pix/custommenubg.jpg b/theme/formal_white/pix/custommenubg.jpg
new file mode 100755 (executable)
index 0000000..96825dd
Binary files /dev/null and b/theme/formal_white/pix/custommenubg.jpg differ
diff --git a/theme/formal_white/pix/dock_removeall.png b/theme/formal_white/pix/dock_removeall.png
deleted file mode 100644 (file)
index 6b1c076..0000000
Binary files a/theme/formal_white/pix/dock_removeall.png and /dev/null differ
diff --git a/theme/formal_white/pix/gradient-sb.jpg b/theme/formal_white/pix/gradient-sb.jpg
new file mode 100644 (file)
index 0000000..6332f0b
Binary files /dev/null and b/theme/formal_white/pix/gradient-sb.jpg differ
diff --git a/theme/formal_white/pix/hgradient.jpg b/theme/formal_white/pix/hgradient.jpg
new file mode 100644 (file)
index 0000000..64c352d
Binary files /dev/null and b/theme/formal_white/pix/hgradient.jpg differ
diff --git a/theme/formal_white/pix/logo.jpg b/theme/formal_white/pix/logo.jpg
deleted file mode 100644 (file)
index 88879ef..0000000
Binary files a/theme/formal_white/pix/logo.jpg and /dev/null differ
diff --git a/theme/formal_white/pix/logo.png b/theme/formal_white/pix/logo.png
new file mode 100644 (file)
index 0000000..ba83ab8
Binary files /dev/null and b/theme/formal_white/pix/logo.png differ
diff --git a/theme/formal_white/pix/logo_small.jpg b/theme/formal_white/pix/logo_small.jpg
deleted file mode 100644 (file)
index 861338a..0000000
Binary files a/theme/formal_white/pix/logo_small.jpg and /dev/null differ
diff --git a/theme/formal_white/pix/logo_small.png b/theme/formal_white/pix/logo_small.png
new file mode 100644 (file)
index 0000000..62bfc74
Binary files /dev/null and b/theme/formal_white/pix/logo_small.png differ
diff --git a/theme/formal_white/pix/movedock.png b/theme/formal_white/pix/movedock.png
deleted file mode 100644 (file)
index bae6a20..0000000
Binary files a/theme/formal_white/pix/movedock.png and /dev/null differ
index a7b68fc..8791eb0 100644 (file)
Binary files a/theme/formal_white/pix/roundcorner/body_l.jpg and b/theme/formal_white/pix/roundcorner/body_l.jpg differ
index 51af8f8..fb37366 100644 (file)
Binary files a/theme/formal_white/pix/roundcorner/body_r.jpg and b/theme/formal_white/pix/roundcorner/body_r.jpg differ
index 2a66a97..b31b101 100644 (file)
Binary files a/theme/formal_white/pix/roundcorner/footer.jpg and b/theme/formal_white/pix/roundcorner/footer.jpg differ
index 203abac..63664d4 100644 (file)
Binary files a/theme/formal_white/pix/roundcorner/footer_l.jpg and b/theme/formal_white/pix/roundcorner/footer_l.jpg differ
index 9171979..6931e44 100644 (file)
Binary files a/theme/formal_white/pix/roundcorner/footer_r.jpg and b/theme/formal_white/pix/roundcorner/footer_r.jpg differ
index cd6e977..495b0d8 100644 (file)
Binary files a/theme/formal_white/pix/roundcorner/header.jpg and b/theme/formal_white/pix/roundcorner/header.jpg differ
index 92acf0b..bdf88a8 100644 (file)
Binary files a/theme/formal_white/pix/roundcorner/header_l.jpg and b/theme/formal_white/pix/roundcorner/header_l.jpg differ
index 866802b..e9f2f3f 100644 (file)
Binary files a/theme/formal_white/pix/roundcorner/header_r.jpg and b/theme/formal_white/pix/roundcorner/header_r.jpg differ
diff --git a/theme/formal_white/pix/sprite.png b/theme/formal_white/pix/sprite.png
new file mode 100755 (executable)
index 0000000..afd65e0
Binary files /dev/null and b/theme/formal_white/pix/sprite.png differ
old mode 100644 (file)
new mode 100755 (executable)
index f210c6e..b68002a
@@ -8,49 +8,80 @@ defined('MOODLE_INTERNAL') || die;
 
 if ($ADMIN->fulltree) {
 
-    // Background colour setting
-    $name = 'theme_formal_white/backgroundcolor';
-    $title = get_string('backgroundcolor','theme_formal_white');
-    $description = get_string('backgroundcolordesc', 'theme_formal_white');
-    $default = '#F7F6F1';
+    // moodle 1.* like setting
+    $name = 'theme_formal_white/noframe';
+    $title = get_string('noframe','theme_formal_white');
+    $description = get_string('noframedesc', 'theme_formal_white');
+    $default = '0';
+    $setting = new admin_setting_configcheckbox($name, $title, $description, $default);
+    $settings->add($setting);
+
+    // page header background colour setting
+    $name = 'theme_formal_white/headerbgc';
+    $title = get_string('headerbgc','theme_formal_white');
+    $description = get_string('headerbgcdesc', 'theme_formal_white');
+    $default = '#E3DFD4';
+    $previewconfig = array('selector'=>'#page-header', 'style'=>'backgroundColor');
+    $setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
+    $settings->add($setting);
+
+    // Block background colour setting
+    $name = 'theme_formal_white/blockcontentbgc';
+    $title = get_string('blockcontentbgc','theme_formal_white');
+    $description = get_string('blockcontentbgcdesc', 'theme_formal_white');
+    $default = '#F6F6F6';
     $previewconfig = array('selector'=>'.block .content', 'style'=>'backgroundColor');
     $setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
     $settings->add($setting);
 
+    // Block cloumns colour setting
+    $name = 'theme_formal_white/blockcolumnbgc';
+    $title = get_string('blockcolumnbgc','theme_formal_white');
+    $description = get_string('blockcolumnbgcdesc', 'theme_formal_white');
+    $default = '#E3DFD4';
+    $previewconfig = array('selector'=>'#page-content, #page-content #region-pre, #page-content #region-post-box', 'style'=>'backgroundColor');
+    $setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
+    $settings->add($setting);
+
+    // display logo or heading
+    $name = 'theme_formal_white/displaylogo';
+    $title = get_string('displaylogo','theme_formal_white');
+    $description = get_string('displaylogodesc', 'theme_formal_white');
+    $default = '1';
+    $choices = array(1=>get_string('moodlelogo', 'theme_formal_white'),0=>get_string('heading', 'theme_formal_white'));
+    $setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
+    $settings->add($setting);
+
     // Logo file setting
     $name = 'theme_formal_white/logo';
     $title = get_string('logo','theme_formal_white');
     $description = get_string('logodesc', 'theme_formal_white');
-    $setting = new admin_setting_configtext($name, $title, $description, '', PARAM_URL);
+    $default = '';
+    $setting = new admin_setting_configtext($name, $title, $description, $default, PARAM_URL);
     $settings->add($setting);
 
     // Block region width
-    $name = 'theme_formal_white/regionwidth';
-    $title = get_string('regionwidth','theme_formal_white');
-    $description = get_string('regionwidthdesc', 'theme_formal_white');
-    $default = 200;
+    $name = 'theme_formal_white/blockcolumnwidth';
+    $title = get_string('blockcolumnwidth','theme_formal_white');
+    $description = get_string('blockcolumnwidthdesc', 'theme_formal_white');
+    $default = '200';
     $choices = array(150=>'150px', 170=>'170px', 200=>'200px', 240=>'240px', 290=>'290px', 350=>'350px', 420=>'420px');
     $setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
     $settings->add($setting);
 
-    // alwayslangmenu setting
-    $name = 'theme_formal_white/alwayslangmenu';
-    $title = get_string('alwayslangmenu','theme_formal_white');
-    $description = get_string('alwayslangmenudesc', 'theme_formal_white');
-    $setting = new admin_setting_configcheckbox($name, $title, $description, 0);
-    $settings->add($setting);
-
     // Foot note setting
     $name = 'theme_formal_white/footnote';
     $title = get_string('footnote','theme_formal_white');
     $description = get_string('footnotedesc', 'theme_formal_white');
-    $setting = new admin_setting_confightmleditor($name, $title, $description, '');
+    $default = '';
+    $setting = new admin_setting_confightmleditor($name, $title, $description, $default);
     $settings->add($setting);
 
     // Custom CSS file
     $name = 'theme_formal_white/customcss';
     $title = get_string('customcss','theme_formal_white');
     $description = get_string('customcssdesc', 'theme_formal_white');
-    $setting = new admin_setting_configtextarea($name, $title, $description, '');
+    $default = '';
+    $setting = new admin_setting_configtextarea($name, $title, $description, $default);
     $settings->add($setting);
 }
\ No newline at end of file
diff --git a/theme/formal_white/style/base.css b/theme/formal_white/style/base.css
deleted file mode 100644 (file)
index 468dbea..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-body, div, p, li, input, option, textarea {font-size:8pt;line-height:1.5em;}
-body, div, p, li, input, option, textarea, h1, h2, h3, h4, h5 {font-family:Arial, Helvetica, sans-serif;}
-
-h1.main, h2.main, h3.main, h4.main, h5.main, h6.main {text-align:center;}
-
-.generalbox {padding:10px;margin-bottom:15px;}
-.generaltable, .userinfobox {margin-left:auto;margin-right:auto;}
-#notice.generalbox {margin-left: auto;margin-right: auto;width: 60%;}
-.notifyproblem {padding:10px;color:#660000;text-align:center;}
-.notifysuccess {padding:10px;color:#006600;text-align:center;}
-
-.paging {text-align:center;}
-
-/**
- * Tabs
- */
-.tabtree {position:relative;margin-bottom:3.5em;}
-.tabtree .tabrow0 {text-align:center;width:100%;margin:1em 0px;}
-.tabtree .tabrow0 li {display:inline;margin-right:-4px;}
-.tabtree .tabrow0 li.here a {position:relative;z-index:102;}
-.tabtree .tabrow0 li a {background-image:url([[pix:theme|tab/left]]);padding-left:14px;padding-top:10px;background-repeat:no-repeat;padding-bottom:3px;margin-bottom:-1px;}
-.tabtree .tabrow0 li a:hover {background-image:url([[pix:theme|tab/left_hover]]);}
-.tabtree .tabrow0 li a span { background-image:url([[pix:theme|tab/right]]);background-repeat:no-repeat;background-position:100% 0%;padding-right:14px;padding-top:10px;padding-bottom:3px;}
-.tabtree .tabrow0 li a:hover span {background-image:url([[pix:theme|tab/right_hover]]);}
-.tabtree .tabrow0 ul,
-.tabtree .tabrow0 div {background-image:url([[pix:theme|tab/tabrow1]]);background-position:0% 50%;position:absolute;width:100%;border-top:1px solid #aaa;padding:0.25em 0px;top:100%;margin:0px;}
-.tabtree .tabrow0 .empty {height:1px;overflow:hidden;padding:0px;position:absolute;}
-.tabtree .tabrow1 li a,
-.tabtree .tabrow1 li a:hover,
-.tabtree .tabrow1 li a span,
-.tabtree .tabrow1 li a:hover span {background-image:none !important;}
-
-.groupmanagementtable {width:90%;}
-.groupmanagementtable td {vertical-align:top;border-width:0px;}
-.groupmanagementtable td p {margin:0px;}
-
-.pagelayout-redirect #page {background-image:none;}
\ No newline at end of file
diff --git a/theme/formal_white/style/calendar.css b/theme/formal_white/style/calendar.css
new file mode 100644 (file)
index 0000000..58459f8
--- /dev/null
@@ -0,0 +1,53 @@
+/* i nomi dei mesi */
+.path-calendar .minicalendarblock h3 {font-size:1.0em;margin:0;text-align:center;}
+
+/* spaziatura fra nome del mese e minicalendar corrispondente */
+.path-calendar .block .minicalendar {margin:5px 0 10px 0;}
+
+/* la quadrettatura del calendario */
+.path-calendar .calendartable th,
+.path-calendar .calendartable td {border:1px [[setting:blockcolumnbgc]] solid;}
+
+/* il rilievo del giorno corrente nel minicalendar */
+/*.path-calendar .calendartable td.today {border:2px #444444 solid;}*/
+.path-calendar .minicalendar td.today {border:2px #444444 solid;}
+
+/* il bordo del generico evento nella lista a centro pagina */
+.path-calendar .maincalendar .eventlist .event {border: 1px [[setting:blockcolumnbgc]] solid;}
+
+/* se c'è una duration... nel minicalendar */
+.path-calendar .minicalendar .calendar_event_user,
+.path-calendar .minicalendar .duration_user {border-bottom:2px #A1BECB dotted;}
+.path-calendar .minicalendar .calendar_event_course,
+.path-calendar .minicalendar .duration_course {border-bottom:2px #FF9966 dotted;}
+.path-calendar .minicalendar .calendar_event_global,
+.path-calendar .minicalendar .duration_global {border-bottom:2px #66D14D dotted;}
+.path-calendar .minicalendar .calendar_event_group,
+.path-calendar .minicalendar .duration_group {border-bottom:2px #FBBB23 dotted;}
+
+/* se c'è una duration... nel calendartable */
+/* attento: non servono perché potrei avere più di una duration */
+/* per questo la casella non va segnata con un border-bottom    */
+/* ma vanno riporati gli eventi al suo interno                  */
+
+.path-calendar .maincalendar .calendarmonth th,
+.path-calendar .minicalendar th {background:url([[pix:theme|gradient-sb]]) repeat-x 0 0;}
+
+/* i settaggi del calendario del blocco */
+
+/* la quadrettatura del calendario */
+.calendartable th,
+.calendartable td {border:1px [[setting:blockcolumnbgc]] solid;}
+
+/* il rilievo del giorno corrente nel calendario del blocco */
+.calendartable .today {border:2px #444444 solid;}
+
+/* se c'è una duration... nel minicalendar */
+.calendartable .calendar_event_user,
+.calendartable .duration_user {border-bottom:2px #A1BECB dotted;}
+.calendartable .calendar_event_course,
+.calendartable .duration_course {border-bottom:2px #FF9966 dotted;}
+.calendartable .calendar_event_global,
+.calendartable .duration_global {border-bottom:2px #66D14D dotted;}
+.calendartable .calendar_event_group,
+.calendartable .duration_group {border-bottom:2px #FBBB23 dotted;}
\ No newline at end of file
diff --git a/theme/formal_white/style/core.css b/theme/formal_white/style/core.css
new file mode 100644 (file)
index 0000000..f360292
--- /dev/null
@@ -0,0 +1,543 @@
+/************************************************************************
+    Non sono riuscito a trovare un modo per sovrascrivere la regola
+        border: 2px solid #ddd;
+    presente nel file
+        /theme/canvas/style/core.css
+    Per questo questo file è stato creato a partire dalla copia del
+    foglio di stile core.css del tema canvas, ed è stato adeguato alle
+    esigenze del tema corrente.
+************************************************************************/
+
+.sitetopic {
+    border: none;
+}
+
+.headingblock {
+    border-bottom: 1px solid #ddd;
+    font-size: 1.3em;
+    color: #333;
+}
+
+#notice {
+    text-align: center;
+}
+
+.noticebox,
+.expired,
+.notopenyet,
+.notifysuccess,
+.notifyproblem,
+.errorbox,
+.continuebutton,
+.singlebutton,
+.buttons,
+.singleselect {
+    text-align: center;
+    margin: 1em 0;
+}
+
+.navbutton .singlebutton {
+    margin: 0;
+}
+
+.generalbox {
+    border-color: #ddd;
+}
+
+.noticebox .generalbox {
+    border: none;
+    margin:2em 0;
+}
+
+.expired,
+.notopenyet {
+    border: none;
+    color: #f00;
+}
+
+.buttons .singlebutton input {
+    margin: 0 1em;
+}
+
+.initialbar {
+    text-align: center;
+}
+
+.side-pre-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main {
+    padding-right: 0;
+}
+
+.side-post-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main {
+    padding-left: 0;
+}
+
+input[type="text"],
+input[type="password"],
+textarea {
+    width: auto;
+    padding: 2px 0 2px 0;
+    margin: 5px 0 5px 0;
+}
+
+input[type="checkbox"],
+input[type="radio"] {
+    margin-right: 7px;
+}
+
+/* Login
+------------------------*/
+
+.loginbox {
+    margin: 15px 25%;
+}
+
+.loginbox .loginerrors {
+    color: #f00;
+}
+
+.loginbox .loginform {
+    margin: 15px auto 0;
+    width: 50%;
+}
+
+.loginbox .loginform .form-label {
+    float: none;
+    width: 100%;
+    margin: 0 auto;
+    text-align: left;
+}
+.dir-rtl .loginbox .loginform .form-label {
+    text-align: right;
+}
+.loginbox .loginform .form-input {
+    float: none;
+    width: 100%;
+    margin: 0 auto;
+}
+
+.loginbox .loginform .form-input #username,
+.loginbox .loginform .form-input #password {
+    width: 50%;
+    color: #000;
+}
+
+.loginbox .loginform .form-input #loginbtn {
+    margin: 0.5em auto;
+}
+
+.loginbox .forgetpass {
+    margin: 1em 0 0;
+    font-size: 0.95em;
+}
+
+.loginbox.twocolumns {
+    width: 90%;
+    margin-left: 5%;
+}
+
+.loginbox .guestsub {
+    border-top: 1px solid #DDDDDD;
+    margin: 5px 20%
+}
+
+.loginbox.twocolumns .loginpanel {
+    border-color: #ddd;
+    padding-right: 0.5%;
+}
+
+.loginbox.twocolumns .signuppanel {
+    padding-left: 1%;
+    width: 48%;
+}
+
+#page-course-loginas #notice {
+    border: none;
+}
+
+#page-login-forgot_password .generalbox {
+    margin: 0 auto 1.5em;
+    width: 75%;
+    padding: 10px;
+}
+
+#page-login-signup .mform {
+    width: 85%;
+    margin: 0 auto;
+}
+
+#page-login-signup .mform .fitem .fitemtitle {
+    width: 20%;
+}
+
+#page-login-signup .mform .fitem .felement {
+    margin-left: 21%;
+}
+
+/* Admin management
+-----------------------*/
+.plugincompattable {
+    font-size: 100%;
+    text-align: left;
+}
+
+/* User
+-----------------------*/
+
+.userinfobox {
+border-color: #ddd;
+padding: 0
+}
+
+.userinfobox .content {
+    text-align: left;
+    padding-left:10px
+}
+
+.userinfobox .links {
+    vertical-align: top;
+    background: #f4f4f4;
+    padding-left: 10px;
+}
+
+.userinfobox .links a {
+    display: block;
+    text-align: left;
+
+}
+
+.profilepicture {
+    float: left;
+    margin-right: 10px;
+}
+
+.descriptionbox {
+    margin-left: 110px;
+    border: 1px solid #ddd;
+    padding: 10px;
+}
+
+.path-user .description {
+    padding-bottom: 15px;
+    border-bottom: 1px solid #eee;
+}
+
+.userprofile .list {
+    margin-top: 10px;
+}
+
+.userprofile .list td {
+    padding-top: 3px;
+    padding-bottom: 3px;
+}
+
+.userprofile .list .c0 {
+    padding-left: 0;
+    font-weight: bold;
+}
+
+#page-user-view .buttons {
+    text-align: center;
+    width: 70%;
+    margin: 0 auto;
+}
+
+#page-user-view .buttons div {
+    padding: 0 0 10px;
+}
+
+#page-user-index .controls {
+    width: 100%
+}
+
+#page-user-index .controls .singleselect {
+    margin: 0;
+}
+
+.rolesform {
+    text-align: center;
+    margin: 1em 0;
+}
+
+#participantsform {
+    text-align: center;
+}
+
+#participants {
+    width: 100%;
+    margin: 1em auto 0;
+}
+
+#participants th,
+#participants td {
+    vertical-align: middle;
+}
+
+.groupinfobox {border-color: #DDDDDD;width: 60%;margin-left: 20%;margin-right: 20%;}
+
+/* Notes
+------------------------*/
+
+.path-notes .generalbox {
+    border: none;
+}
+
+/* Roles
+------------------------*/
+
+.path-admin-roles .generaltable {
+    /* width: 65%; hiding because it's causing problems on role/assign */
+}
+
+.path-admin-roles .generaltable th {
+    vertical-align: middle;
+}
+
+.path-admin-roles .generaltable .lastcol {
+    width: 15%;
+}
+
+.path-admin-roles .backlink {
+    text-align: center;
+}
+
+/* Blogs
+------------------------*/
+
+.blog_entry .audience {
+    color: #444;
+    margin: 0 0 0.5em;
+    font-size: 0.9em;
+}
+
+.blog_entry .tags {
+    margin-bottom: 0.5em;
+}
+
+/* Tags
+------------------------*/
+
+#big-tag-cloud-box {
+    padding: 10px;
+}
+
+#tag-management-box {
+    text-align: center;
+}
+
+.tag-management-form {
+    border: none;
+    padding: 0 0 1em;
+}
+
+#tag-management-list {
+    margin: 1em 0
+}
+
+#page-tag-index #tag-blogs {
+    border-width: 0 0 1px;
+    width: 65%;
+    margin: 1em auto;
+}
+
+#tagblogentries {
+    margin: 0 0 1em;
+}
+
+#tagblogentries li {
+    list-style: none;
+    padding: 0.25em 0;
+    margin: 0
+}
+
+#big-tag-cloud-box {
+    border: none;
+}
+
+#tag-user-table {
+    width: 95%;
+    margin: 0 auto;
+    border-width: 0 0 1px;
+}
+
+.managelink {
+    text-align: right;
+}
+
+#page-tag-index .headingblock {
+    text-align: center;
+    margin-bottom: 0;
+}
+
+#page-tag-index #tag-management-box {
+    border-bottom: 1px solid #ddd;
+    padding: 4px 0;
+}
+
+#page-tag-index .relatedpages {
+    text-align: center;
+}
+
+#page-tag-manage .lastinitial {
+    margin-bottom: 0.5em;
+}
+
+#page-tag-manage .green {
+    text-align: center;
+    padding: 0 0 1em;
+}
+
+/* YUI overlays
+------------------------*/
+#helppopupbox {
+    z-index: 99999 !important;
+}
+
+
+/* Embedded Pages
+------------------------*/
+
+.pagelayout-embedded {
+    text-align: center;
+    background-color: #fff;
+    background-image: none;
+}
+
+.pagelayout-embedded #content {
+    padding-top: 30px;
+}
+
+/* Forms
+-----------------------*/
+
+.mform .fsubmit {
+    text-align: center;
+    padding: 2px;
+}
+
+.form-label .form-shortname {
+    font-size: 0.8em;
+    color: #777;
+}
+
+.form-description {
+    font-size: 0.95em;
+    color: #444;
+}
+
+.mform .hidden .fitem .fgroup {
+    width: 100%;
+    text-align: center;
+    margin: 1em 0;
+}
+
+.path-backup .mform .hidden .fitem .fgroup {
+    text-align: left;
+}
+
+.path-backup .mform .grouped_settings {
+    margin:1em;
+}
+.path-backup .mform .grouped_settings .grouped_settings {
+    margin:0;
+}
+
+/* Comments
+-----------------------*/
+
+.comment-list li {
+    background: #eee !important;
+    list-style: none;
+}
+
+/* Gradebook
+----------------------*/
+
+.path-grade h1.headerheading {
+    text-align: left; /* Strangely necessary TODO: find bug */
+}
+
+.gradestable .lastrow th.header {
+    background: #ddd;
+}
+
+.gradestable .lastrow td.cell {
+    background: #eee !important;
+}
+
+.user-grade td.b1t,
+.user-grade td.baggt {
+    background: #ddd !important;
+}
+
+#page-grade-edit-scale-index .generaltable {
+    margin: 1em auto;
+}
+
+#page-grade-report-grader-preferences .generalbox {
+    border: none;
+}
+
+.path-grade-report-grader form {
+    text-align: left;
+}
+
+/* Footer
+-----------------------*/
+
+#page-footer .logininfo {
+    padding: 1em 0;
+}
+
+#page-footer .homelink,
+#page-footer .sitelink {
+    padding: 1em 0;
+}
+
+.homelink a {
+    text-decoration: none;
+    border-top: 1px solid #cecece;
+    border-bottom: 2px solid #8a8a8a;
+    border-left: 1px solid #cecece;
+    border-right: 2px solid #8a8a8a;
+}
+
+.homelink a:hover {
+    text-decoration: none;
+    border-bottom: 1px solid #cecece;
+    border-top: 2px solid #8a8a8a;
+    border-right: 1px solid #cecece;
+    border-left: 2px solid #8a8a8a;
+}
+
+/**
+ * Enrol   - TODO: tidy up styles here
+ */
+.userenrolment {font-size:90%;border:1px solid #E3DFD4;}
+.userenrolment tr.r0 {background-color:#F9F9F9;}
+.userenrolment tr.r1 {background-color:#F3F3F3;}
+.userenrolment td {border:1px solid #E9E9E9;border-top-color:#F6F6F6;border-right-color:#EEE;border-left-color:#F3F3F3;}
+.userenrolment td.c0 {border-left-color:#E3DFD4;}
+.userenrolment td.c4 {border-right-color:#E3DFD4;}
+.userenrolment .col_userdetails {padding:3px;min-width:35%;}
+.userenrolment .col_role .roles {position:relative;}
+.userenrolment .col_role .role {line-height:10px;font-size:10px;}
+.userenrolment .col_role .role a img {height:8px;}
+.userenrolment .col_role .addrole {background-color:#DDD;border:1px outset #EEE;-moz-border-radius:5px;}
+.userenrolment .col_group {max-width:300px;}
+.userenrolment .col_group .group {line-height:10px;font-size:10px;}
+.userenrolment .col_group .group a img {height:8px;}
+.userenrolment .col_group .addgroup {background-color:#DDD;border:1px outset #EEE;-moz-border-radius:5px;}
+.userenrolment .col_enrol {max-width:300px;}
+.userenrolment .col_enrol .enrolment {border:1px outset #E6E6E6;background-color:#EEE;line-height:10px;font-size:10px;-moz-border-radius:5px;}
+.path-enrol .enrolusersbutton,
+.path-enrol .enrolcohortbutton {float:left;}
+.path-enrol .enrolusersbutton.instance1,
+.path-enrol .enrolcohortbutton.instance1 {float:right;}
+
+/* Registration */
+#page-admin-registration-hubselector .registration_textfield {width: 400px;}
+
+/**
+ * Redirect
+ */
+.pagelayout-redirect #content {text-align:center;margin-top:10%;margin-bottom:10%;}
\ No newline at end of file
diff --git a/theme/formal_white/style/course.css b/theme/formal_white/style/course.css
new file mode 100755 (executable)
index 0000000..59137b4
--- /dev/null
@@ -0,0 +1,122 @@
+/** Course formats **/
+.course-content .section li.activity {margin:7px 0;}
+.course-content .header {background-image:url([[pix:theme|gradient_h]]);background-repeat:repeat-x;border-top:1px #C6BDA8 solid;}
+.course-content h2.header {padding-left:1em;}
+.course-content ul.weeks li.section {border:1px solid #DDD;}
+.course-content ul.weeks li.section .content {background-color:#FAFAFA;padding:5px 10px;}
+.course-content ul.weeks li.section .content h3 {margin:0;color:#777;font-weight:normal;}
+.course-content ul.weeks li.section .left {padding:5px 0;}
+.course-content ul.weeks li.section .right {padding:5px 0;}
+
+/** Course **/
+.coursebox {border:1px solid #DDD;border-color:#DDDDDD;}
+.coursebox .info {margin:5px;font-size:1em;}
+.coursebox .info .name {margin:3px 0;}
+.coursebox .info .teachers {margin:0 1em;font-size:0.9em;}
+.coursebox .cost {font-size:0.9em;padding-top:20px;}
+.coursebox .summary {margin:5px;font-size:0.9em;}
+
+#page-course-recent h2.main {font-size:1.1em;}
+#page-course-recent .user {font-size:0.75em;}
+#page-course-recent .grade {font-style:italic;font-size:0.9em;}
+#page-course-recent .forum-recent .reply .title {font-style:italic;font-size:0.9em;}
+#page-course-recent .forum-recent .discussion .title {font-weight:bold;font-style:italic;font-size:0.9em;}
+
+.path-course-view .availabilityinfo {font-size:0.85em;color:#aaa;}
+.path-course-view .availabilityinfo strong {font-weight:normal;color:black;}
+.path-course-view .dimmed_text img {opacity:0.3;filter:alpha(opacity='30');}
+.path-course-view .section {font-size:0.95em;line-height:1.2em;}
+.path-course-view .section .activity {padding:0.2em 0;}
+.path-course-view .section .activity a {line-height:1em;}
+.path-course-view .section .weekdates {margin:0;font-weight:normal;font-size:1em;}
+.path-course-view .section .groupinglabel {color:#666666;}
+.path-course-view .section .left {font-weight:bold;}
+
+.path-course-view .weeks .section,
+.path-course-view .topics .section,
+.path-course-view .section td {border-color:#DDDDDD;}
+.path-course-view .weeks .content ,
+.path-course-view .topics .content,
+.path-course-view .weeks .section,
+.path-course-view .topics .section {background:transparent;}
+.path-course-view .section td.side {background:#FFFFFF;}
+.path-course-view .weeks .current,
+.path-course-view .topics .current,
+.path-course-view .current td.side {background:#FFD991;}
+.path-course-view .weeks .hidden,
+.path-course-view .topics .hidden,
+.path-course-view .hidden td.side {background:#DDDDDD;}
+.path-course-view .section .weekdates {color:#777777;}
+.path-course-view .weeks .weekdates ,
+.path-course-view .topics .weekdates {color:#333333;}
+
+.weeks li.section ,
+.topics li.section {border-style:solid;border-width:1px;}
+
+.weeks .content,
+.topics .content {padding:5px;}
+
+.categoryboxcontent {border-color:#DDDDDD;}
+
+#page-course-user .graph {text-align:center;}
+#page-course-user .section {border-color:#AAAAAA;}
+#page-course-user .info {text-align:center;}
+
+#page-admin-report .plugin,
+#page-course-report .plugin,
+#page-course-import .plugin {margin-bottom:20px;margin-left:10%;margin-right:10%;border:1px solid #cecece;background-color:#fdfdfd;}
+
+.path-course-view .unread {background:#9EBEFF;}
+.path-course-view .completionprogress {font-size:0.80em; padding:8px 26px 5px 5px;}
+
+#page-course-category .courseboxes,
+#page-course-index .courseboxes {padding:20px;}
+
+#page-course-report #content {padding-top:15px;padding-bottom:15px;}
+
+#page-course-report #region-main p,
+#page-course-report-log-index #region-main .info,
+#page-course-report-log-indexlive #region-main .info,
+#page-course-report-stats-index #region-main .graph {text-align:center;}
+
+#page-course-report .logselectform,
+#page-course-report .participationselectform,
+#page-course-report-log-index .logselectform,
+#page-course-report-participation-index .participationselectform {text-align:center;}
+
+.addcoursebutton {text-align:center;}
+.categorypicker {text-align:center;margin-bottom:10px;}
+.path-course-report-outline .loginfo {text-align:center;margin:1em;}
+.categorylist {width:90%;margin:0 auto;text-align:left;}
+
+/* Course and category combo list on front page */
+.course_category_tree .controls {margin-bottom:5px;text-align:right;float:right;}
+.course_category_tree .controls div {padding-right:2em;font-size:75%;}
+.course_category_tree .category {background-color:#FFF;background-image:url([[pix:theme|hgradient]]);background-repeat:repeat-x;border:1px solid #ddd;margin-bottom:10px;}
+.course_category_tree .category .subcategories {background-color:inherit;padding-left:11px;border-width:1px 0 1px 1px;border-color:#FFF;border-style:solid;margin-top:8px;}
+.course_category_tree .category.with_children .category_label {background-position:3px 3px;margin-left:6px;}
+.course_category_tree .category_link .category_link {font-size:95%;}
+.course_category_tree .category_label {padding-left:13px;}
+.course_category_tree .category_link {display:block;margin:5px;font-size:120%;font-weight:bold;}
+.course_category_tree .category .courses {background-color:inherit;}
+.course_category_tree .category .courses .course_link {margin:5px;margin-right:100px;}
+.course_category_tree .category .course {border:1px solid #f9f9f9;border-bottom-color:#eee;border-right-width:0;}
+.course_category_tree .category .course:last-child {border-bottom-color:#f6f6f6;}
+.course_category_tree .category .course.even {background-color:#f6f6f6;border-color:#eee;border-top-color:#f9f9f9;}
+.course_category_tree .category .course_info {right:3px;top:3px;}
+.course_category_tree .category .course:hover {background-color:#eee;}
+.course_category_tree .category .category {margin:5px 0 5px 5px;border-right:0 transparent none;border-left:0 transparent none;border-bottom:1px transparent solid;}
+
+/* Publication */
+#page-course-publish-metadata .metadatatext {width:400px;}
+#page-course-publish-metadata .hubscreenshot {
+    display:inline;
+    float:left;
+    margin-right:10px;
+}
+#page-course-publish-metadata .hubscreenshot img {vertical-align:bottom;}
+#page-course-publish-metadata .hubdescription {}
+#page-course-publish-metadata .hubinfo {display:block; margin-bottom:20px;}
+#page-course-publish-metadata .hublink {}
+#page-course-publish-backup .courseuploadtextinfo {text-align:center;}
+#page-course-publish-backup .sharecoursecontinue  {text-align:center;}
\ No newline at end of file
diff --git a/theme/formal_white/style/dock.css b/theme/formal_white/style/dock.css
deleted file mode 100644 (file)
index 20e23dd..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/** Core overrides **/
-body.has_dock {margin-left:30px;margin-right:30px;}
-
-/* This CSS is for the dock */
-.dock {width:30px;position:fixed;top:0px;left:0px;height:100%;background-image:url([[pix:theme|vgradient]]);background-repeat: repeat-y;background-position:100% 0;background-color:#DDD;border-right:1px solid #AAA;z-index:2002;}
-.dock .dockeditem {background-color:#DDD;}
-.dock .dockeditem .firstdockitem {margin-top:1em;}
-.dock .dockeditem .dockedtitle {border-bottom:1px solid #AAA;border-top:1px solid #CCC;cursor:pointer;background-image:url([[pix:theme|vgradient]]);background-position:90% 0;background-repeat: repeat-y;}
-.dock .dockeditem .dockedtitle.activeitem {background-position:80% 0;}
-.dock .dockeditem .dockedtitle h2 {font-size:0.8em;line-height:100%;text-transform:uppercase;text-align:center;margin:12px 0px;}
-.dock .block_tree .current_branch {}
-.dock .controls {position:absolute;bottom:1em;text-align:center;width:100%;}
-.dock .controls img {cursor:pointer;}
-.dock .bd.oversized_content {overflow-y:auto;overflow-x:visible;height:inherit;}
-.dock .bd.oversized_content .content {margin:6px 6px 6px 0px;padding-bottom:6px;}
-.dock .yui-panel .hd {text-align:right;border-width:0 0 1px 0;padding:3px 5px;}
-.dock .yui-panel .hd .commands img {margin-right:2px;}
-
-/**.dock .bd .content .blockcommands {text-align:right;border:1px solid #AAA;border-width:0 0 1px 1px;background-image:url([[pix:theme|hgradient]]);background-repeat: repeat-x;}**/
-/** YUI overrides **/
-.yui-skin-sam .dock .yui-panel {border-width:1px 2px 1px 1px;border-color:#AAA;min-width:150px;}
-.yui-skin-sam .dock .yui-panel .bd {border-width:0;background-color:#FAFAFA;}
-/** Override the above if the dock is on the right **/
-.dock.dock_right_vertical {left:auto;right:0px;border-width:0px 0px 1px 5px;}
-.dock.dock_right_vertical .commands {text-align:right;}
-.yui-skin-sam .dock.dock_right_vertical .yui-panel {border-width:1px 0 1px 5px;}
-
-/* block expansion code */
-.block_js_expansion .block_tree {overflow-x:scroll;}
-.block_js_expansion.mouseover .content {width:200%;z-index:1000;position:relative;}
-.block_js_expansion.mouseover .content .block_tree {width:100%; background-color:#FAFAFA; padding-bottom:0px;}
-
-/* CSS for shadows */
-.divshadow div {position:absolute;width:3px;height:3px;background-color:#333;}
-.divshadow .shadow_top {top:-3px;right:0px;width:100%;}
-.divshadow .shadow_bottom {bottom:-3px;right:0px;width:100%;}
-.divshadow .shadow_left {top:0px;left:-3px;height:100%;}
-.divshadow .shadow_right {bottom:0px;right:-3px;height:100%;}
-.divshadow .shadow_top_right {top:-3px;right:-3px;}
-.divshadow .shadow_bottom_right {bottom:-3px;right:-3px;}
-.divshadow .shadow_top_left {top:-3px;left:-3px;}
-.divshadow .shadow_bottom_left {bottom:-3px;left:-3px;}
-
-/** IE stylings */
-.ie6 .block .block_tree {width:160px;overflow-x:scroll;}
-.ie7 .block .block_tree {overflow-x:scroll;}
-.ie6 .block_tree .tree_item {width:100%;}
-.ie6 .dock {position:absolute;}
-.ie6 .dock hr {display:none;margin:0px;height:0px;padding:0px;}
-.ie6 .dock li p {background-color:inherit;}
-.ie6 .dock .bd.oversized_content .content, .ie7 .dock .bd.oversized_content .content {padding-bottom:0px;}
-.ie6 .block_js_expansion.mouseover .content, .ie7 .block_js_expansion.mouseover .content{ padding-bottom:2px;}
-.ie6 .dock .bd.oversized_content {width:100%;}
-.ie7 .dock .bd.oversized_content {width:400px;}
\ No newline at end of file
diff --git a/theme/formal_white/style/editor.css b/theme/formal_white/style/editor.css
deleted file mode 100644 (file)
index 207301f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-body, div, p, li, input, option, textarea {font-size:8pt;line-height:1.5em;}
-body, div, p, li, input, option, textarea, h1, h2, h3, h4, h5 {font-family:Arial, Helvetica, sans-serif;}
\ No newline at end of file
diff --git a/theme/formal_white/style/formal_white.css b/theme/formal_white/style/formal_white.css
new file mode 100755 (executable)
index 0000000..bd6eb9b
--- /dev/null
@@ -0,0 +1,116 @@
+/***
+ *** Core
+ ***/
+
+html, body {
+    font-family:Arial, Verdana, Helvetica, sans-serif;
+    margin:0;
+    padding:0;
+    background-color:#EFEFEF;
+    font-size:13px;
+}
+
+a:link {text-decoration:none;}
+a:visited {text-decoration:none;}
+a:hover {text-decoration:underline;}
+
+h1 {font-size:1.4em;font-weight:bold;}
+h2 {font-size:1.3em;}
+h3 {font-size:1.2em;}
+h4 {font-weight:bold;}
+
+h2.main, h3.main, h4.main {
+    margin:0;
+    padding:0;
+    text-align: center;
+}
+
+#headerlogo {margin:0.3em;float:left;top:1em;z-index:1;}
+h1.headerheading {margin:14px 11px 8px 11px;float:left;font-size:2em;z-index:1;}
+
+/* headermenu */
+.headermenu {float:right;top:1em;z-index:2;}
+
+#dock {background-color:#E3DFD4;border-right:1px #000 dashed;}
+
+/* navbar */
+.navbar {width:auto;padding-top:0.35em;padding-bottom:0.15em;background-image:url([[pix:theme|bg_bread]]);}
+.navbar li span {color:#E3DFD4;}
+.navbar li a:link, .navbar li a:visited {color:white;}
+
+/* navbutton */
+.navbutton {padding-right:0.5em;}
+.navbutton table td {padding:0;}
+
+/* breadcrumb */
+.breadcrumb {margin-left:0.8em;}
+
+/* generalbox */
+.generalbox {border-color:#E3DFD4;}
+
+/* tables */
+.editcourse th,
+.editcourse td,
+.generaltable th,
+.generaltable td,
+#page-admin-course-category .generalbox th,
+#page-admin-course-category .generalbox td,
+#attempts th,
+#attempts td,
+.plugincompattable th,
+.plugincompattable td,
+.environmenttable th,
+.environmenttable td,
+.forumheaderlist td,
+.forumheaderlist th {
+       border: 1px solid #E3DFD4;
+       border-collapse: collapse;
+}
+th.header,
+.formtable tbody th,
+.generalbox th,
+.generaltable th.header {background-image:url([[pix:theme|gradient_h]]);background-repeat:repeat-x;border-top:1px #C6BDA8 solid;background-color:#E3DFD4;}
+/*#modules, .compatibleblockstable {margin-left:auto; margin-right:auto;} waiting for MDL-26760*/
+
+/* admin pages */
+div#chooseuser {border:0 transparent none;}
+table.groupmanagementtable,
+table.groupmanagementtable tr,
+table.groupmanagementtable td {border-width:0px;}
+table.groupmanagementtable td#buttonscell {vertical-align:middle;text-align:center;}
+table#defineroletable tr.rolecapheading {background-image:url([[pix:theme|gradient_h]]);background-repeat:repeat-x;}
+/*table#defineroletable tr.rolecap {border-top:1px #F30 dashed;}*/
+tr.rolecap {border-top:1px #F30 dashed;}
+tr.rolecapheading + tr.rolecap {border-top:none;}
+
+ /* course categories */
+#page-admin-course-index .editcourse td div.singleselect {text-align:left;}
+
+ /* course */
+ul.topics .section span.commands {margin-left:2em;} /* distanza dei comandi dagli elementi del corso */
+
+.mform fieldset {border:1px #DDD solid;}
+
+/* block */
+.block {border:1px #C6BDA8 solid;margin-bottom:0.5em;}
+.block .header h2 {margin:0;padding-left:0.3em;}
+.block .header .title {background-image:url([[pix:theme|gradient_h]]);background-repeat:repeat-x;clear:both;line-height:2em;}
+.block .header .title .commands {padding-left:0.3em;text-align:right;}
+.block .content {background-color:[[setting:blockcontentbgc]];}
+
+/* block login */
+.block_login .btn {margin-top:0.5em;text-align:center;}
+
+/* pagelayout-report */
+.pagelayout-report #page-header {float:left;}
+.pagelayout-report #page-content {overflow:hidden;}
+
+/* page-footer */
+#page-footer {text-align:center;width:100%;padding:0;}
+.noframefooter {background-color:#FFF;clear: both;float: left;width:100%;}
+#page-footer-content {text-align:center;border:7px #E3DFD4 double;margin:0;padding:0.5em;}
+#page-footer .logininfo {padding:0.3em 0 0.7em 0;}
+#page-footer .moodledocs {text-align:center;background-color:#EFEFEF;padding:0.7em 0 0.8em 0;}
+
+/** Custom CSS **/
+[[setting:customcss]]
\ No newline at end of file
diff --git a/theme/formal_white/style/formalwhite.css b/theme/formal_white/style/formalwhite.css
deleted file mode 100644 (file)
index d1ebc6c..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-
-/***
- *** Core
- ***/
-html, body {
-    background-color: #FBF9FA;
-}
-
-.block .header {
-}
-
-.block .header .title {
-       background-image: url([[pix:theme|gradient_h]]);
-       background-repeat: repeat-x;
-       clear: both;
-       line-height: 2em;
-}
-
-.block .header .title .block_action {
-    margin-top: 4px;
-}
-
-.block .header .title h2 {
-}
-
-.block .header .title .commands {
-    margin-left: 4px;
-}
-
-.block .header .title .commands a {
-    margin: 0 2px;
-}
-
-.block .content {
-    display:block;
-    padding:4px;
-}
-
-body {
-       font-family: Helvetica, Arial, Verdana, sans-serif;
-       font-size: 0.95em;
-       line-height: 1.4;
-       margin: 0;
-       padding: 0;
-}
-
-#page-site-index {
-    display:block;
-}
-
-#page {
-    width:97%;
-    background-image: url([[pix:theme|roundcorner/header]]);
-    margin:15px 1.5% 0;
-    background-position:0 0;
-    background-repeat:repeat-x;
-       min-width: 934px;
-}
-
-#headerenvelop { /* Inside Header Middle */
-    color:black;
-    height: 105px;
-    /*background-color: #E3DFD4;*/
-}
-
-#logo {
-    float: left;
-    /*display:inline;*/
-}
-
-.sitelogo {
-    margin:5px 0 -4px 3px;
-}
-
-/* Header */
-#header, #header-home {
-    padding:0 17px;
-    background-color: #E3DFD4;
-    margin-left:17px;
-    margin-right:17px;
-}
-
-#custommenu, .navbar {
-       margin-right: 17px;
-       margin-left: 17px;
-}
-
-.yui3-skin-sam .yui3-menu-content {border-right:none;border-left:none;}
-
-.navbar {
-    width:auto;
-    padding:3px 1em;
-    background-image: url([[pix:theme|bg_bread]]);
-}
-
-/* content */
-#page-content {
-       float: none;
-       width: auto;
-       margin-right: 17px;
-       margin-left: 17px;
-    background-color: #FFF;
-}
-
-.shrinker { /* To keep content off of the background image */
-    margin:1px 0 0 0;
-}
-
-
-/* Link Colors */
-a:link, a:visited {
-    color:#375faf;
-}
-a:hover, a:active {
-    color:#304469;
-}
-
-#headerenvelop a:link, #headerenvelop a:visited {
-   color:#375FAF;
-}
-
-.clearfix {
-    min-width: 0;
-  /* overflow: hidden; */
-    display:block;
-}
diff --git a/theme/formal_white/style/frame.css b/theme/formal_white/style/frame.css
new file mode 100755 (executable)
index 0000000..00d8675
--- /dev/null
@@ -0,0 +1,158 @@
+/****
+ *
+ * #frametop
+ *    #framebottom
+ *    !   #frametopright
+ *    |   |   <div>---/<div>
+ *    !   /#frametopright
+ *    |   #frameleft
+ *    |   |   #frameright
+ *    |   |   |   #wrapper
+ *    |   |   |   |   #page-header
+ *    |   |   |   |   |   #headerlogo
+ *    |   |   |   |   |   |   <img>
+ *    |   |   |   |   |   h1#headerheading---/h1#headerheading
+ *    |   |   |   |   |   #headermenu---/#headermenu
+ *    |   |   |   |   /#page-header
+ *    |   |   |   |   #custommenu---/#custommenu
+ *    |   |   |   |   .navbar clearfix---/.navbar clearfix
+ *    |   |   |   |       .breadcrumb---/.breadcrumb
+ *    |   |   |   |       .navbutton---/.navbutton
+ *    |   |   |   |   /.navbar clearfix
+ *    |   |   |   |   #page-content
+ *    |   |   |   |   .
+ *    |   |   |   |   .
+ *    |   |   |   |   .
+ *    |   |   |   |   /#page-content
+ *    |   |   |   |   .clearfix---/.clearfix
+ *    |   |   |   /#wrapper
+ *    |   |   #frameright
+ *    |   /#frameleft
+ *    |   #framebottomright
+ *    |   |   <div>---/<div>
+ *    !   /#framebottomright
+ *    /#framebottom
+ * /#frametop
+ *
+ * The body tag may also contain one of three layout specific classes that describe
+ * the regions of the page and allow us to theme more easily.
+ *
+ *   default (no class) = Content + side pre + side post
+ *   side-pre-only      = Content + side pre
+ *   side-post-only     = Content + side post
+ *   content-only       = Content
+ *
+ ****/
+
+#wrapper,
+#footerwrapper {
+    padding:0 17px 0 17px;
+    float:none; /* serve a qualcosa? */
+    /*clear:both;*/
+    /*overflow:hidden;*/
+}
+
+#frametop,
+#footerframetop {
+    background-image:url([[pix:theme|roundcorner/header]]);
+    margin:15px 15px 0;
+    background-position:0 0;
+    background-repeat:repeat-x;
+    min-width:934px;
+}
+
+#frametopright,
+#footerframetopright { /* Frame background top right */
+    background-image:url([[pix:theme|roundcorner/header_r]]);
+    background-repeat:no-repeat;
+    background-position:100% 0;
+    text-align:left;
+    height:17px;
+    margin:0 0 0 17px;
+}
+
+#frametopright div,
+#footerframetopright div { /* Frame background top left */
+    background-image:url([[pix:theme|roundcorner/header_l]]);
+    font-size:1px;
+    line-height:1%;
+    height:17px;
+    background-repeat:no-repeat;
+    background-position:0 0;
+    background-color:transparent;
+    position:relative;
+    width:17px;
+    margin-left:-17px;
+}
+
+#frameleft,
+#footerframeleft { /* Frame background left */
+    background-image:url([[pix:theme|roundcorner/body_l]]);
+    background-repeat:repeat-y;
+    background-position:0 0;
+    background-color:#FFF;
+}
+
+#frameright,
+#footerframeright { /* Frame background right */
+    background-image:url([[pix:theme|roundcorner/body_r]]);
+    background-repeat:repeat-y;
+    background-position:100% 0;
+    background-color:transparent;
+    /*margin-left:17px;*/
+    /*padding-right:17px;*/
+}
+
+#framebottomright,
+#footerframebottomright { /* Frame background bottom right */
+    background-image:url([[pix:theme|roundcorner/footer_r]]);
+    background-repeat:no-repeat;
+    background-position:100% 0;
+    text-align:left;
+    margin:0 0 0 17px;
+}
+
+#framebottomright div,
+#footerframebottomright div {  /* Frame background bottom left */
+    background-image:url([[pix:theme|roundcorner/footer_l]]);
+    font-size:1px;
+    line-height:1%;
+    height:17px;
+    background-repeat:no-repeat;
+    background-position:0 0;
+    background-color:transparent;
+    position:relative;
+    width:17px;
+    margin-left:-17px;
+}
+
+#framebottom,
+#footerframebottom { /* Bottom Middle */
+    background-image:url([[pix:theme|roundcorner/footer]]);
+    background-repeat:repeat-x;
+    background-position:0 100%;
+    background-attachment:scroll;
+    background-color:transparent;
+}
+
+/*******************************************************************/
+/* Footer section                                                  */
+/*******************************************************************/
+
+#footerwrapper {
+    background-color:white;
+    margin:0 17px 0 17px;
+}
+
+#footerframetop {
+    margin-top:0;
+}
+
+#footerwrapper p,
+#footerwrapper div {
+    margin:0;
+}
+
+/*******************************************************************/
+/* End of footer section                                           */
+/*******************************************************************/
\ No newline at end of file
diff --git a/theme/formal_white/style/fw_corners.css b/theme/formal_white/style/fw_corners.css
deleted file mode 100644 (file)
index a031b0a..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-div.headerleft div { /* Page background top left */
-    background-image: url([[pix:theme|roundcorner/header_l]]);
-    font-size:1px;
-    line-height:1%;
-    height:17px;
-    background-repeat:no-repeat;
-    background-position:0 0;
-    background-color:transparent;
-    position:relative;
-    width:17px;
-    margin-left:-17px;
-}
-
-div.headerleft { /*Page background top right */
-    background-image: url([[pix:theme|roundcorner/header_r]]);
-    background-repeat:no-repeat;
-    background-position:100% 0;
-    text-align:left;
-    height:17px;
-    margin:0 0 0 17px;
-}
-
-div.bodyleft { /* Page background left */
-    background-image: url([[pix:theme|roundcorner/body_l]]);
-    background-repeat:repeat-y;
-    background-position:0 0;
-    background-color:transparent;
-}
-
-div.bodyright { /* Page background right */
-    background-image: url([[pix:theme|roundcorner/body_r]]);
-    background-repeat:repeat-y;
-    background-position:100% 0;
-    background-color:transparent;
-}
-
-/* Page background shading and curvy corners at bottom of screen */
-
-div.contentfooter div { /* Bottom Left */
-    font-size:1px;
-    line-height:1%;
-    height:17px;
-    background-repeat:no-repeat;
-    background-position:0 0;
-    background-color:transparent;
-    position:relative;
-    width:17px;
-    margin-left:-17px;
-    background-image: url([[pix:theme|roundcorner/footer_l]]);
-}
-
-div.contentfooter { /* Bottom Right */
-    background-image: url([[pix:theme|roundcorner/footer_r]]);
-    background-position:100% 0;
-    text-align:left;
-    margin:0 0 0 17px;
-    background-repeat:no-repeat;
-}
-
-#page2 { /* Bottom Middle */
-    background-image: url([[pix:theme|roundcorner/footer]]);
-    background-repeat: repeat-x;
-    background-position: 0 100%;
-    background-attachment: scroll;
-    background-color: transparent;
-}
\ No newline at end of file
diff --git a/theme/formal_white/style/general.css b/theme/formal_white/style/general.css
deleted file mode 100644 (file)
index bcf2602..0000000
+++ /dev/null
@@ -1,239 +0,0 @@
-a:link {text-decoration:none;color: #697F55;}
-a:visited {text-decoration:none;color: #697F55;}
-a:hover {text-decoration:underline;}
-
-img.icon,
-img.iconhelp {vertical-align:middle;}
-
-#page {overflow:visible}
-/*#page #page-content {background-color:#FFF;border:1px solid #E3DFD4;}*/
-
-/******************/
-#page-header {background-color: #E3DFD4; color:#FFF;border:1px solid #E3DFD4;border-bottom: none;}
-.hasnavbar #page-header {border-bottom-width:0px;}
-#page-header .headermain span {color:#C8C9C7;}
-
-#page-header .navbar {background-image: url([[pix:theme|bg_bread]]);width:100%;}
-#page-header .navbar {color:#000;}
-#page-header .navbar a:link {color:#fff;}
-#page-header .navbar a:visited {color:#fff;}
-#page-header .navbar .breadcrumb {margin:6px 1em;float:left;}
-#page-header .navbar .navbutton {float:right;margin:5px 1em;}
-#region-pre .region-content{background-color:#E3DFD4;border-top:6px #E3DFD4 solid;}
-#region-pre {margin-top:-6px;}
-/*#region-post .region-content {background-color: #E3DFD4;}*/
-#region-post-box {background-color: #E3DFD4;}
-
-/** General **/
-.generalbox {border: 1px solid #DDDDDD;}
-.generaltable td {border-width:0px;}
-.sitetopic {border-width:0px;}
-.headingblock {margin-bottom:10px;border-bottom:1px solid #E3DFD4;background-color:#FFF;padding:4px 5px;}
-
-.coursebox {width:100%;margin:10px 0px;border-bottom:1px solid #E3E3E3;overflow:hidden;padding-bottom:10px;}
-.coursebox .info {width:35%;float:left;}
-.coursebox .summary {width:60%;float:right;}
-
-.course-content ul {margin:0px;}
-.course-content .headingblock.outline {margin-top:2em;}
-.course-content .section.main {border:1px solid #E3E3E3;margin-bottom:10px;}
-.course-content .section.main .left.side {float:left;width:20px;padding:5px;}
-.course-content .section.main .right.side {float:right;width:20px;padding:5px;}
-.course-content .section.main .content {margin:0px 30px 10px 30px;}
-.course-content .section.main .content .section_add_menus {text-align:right;}
-
-#course-user .section {border:1px solid #DDD;margin:0px 5% 1.5em 5%;}
-
-#course-user .section h2,
-#course-user .section .content {margin:5px 1em;}
-#course-user .section table td {border:0px;}
-
-.generaltable {border:1px solid #DDD;}
-.generaltable .cell {background-color:#FFF;border:1px solid #EEE;border-collapse: collapse;}
-.generaltable .header {background-color:#EEE;border:1px solid #EEE;font-weight:bold;}
-
-/** Login **/
-.loginbox {margin-top:15px;margin-bottom:15px;}
-.loginbox .loginform {margin-top:15px;}
-.loginbox .loginform .form-label {width:39%;float:left;text-align:right;}
-.loginbox .loginform .form-input {width:60%;float:right;text-align:left;}
-.loginbox .loginform .form-input input {width:6em;}
-
-.loginbox.twocolumns {border:1px solid #DDD;}
-.loginbox.twocolumns .loginpanel {float:left;width:49%;text-align:center;}
-.loginbox.twocolumns .signuppanel {float:left;width:50%;border-left:1px solid #DDD;}
-.loginbox.twocolumns .signuppanel h2 {text-align:center;}
-.loginbox.twocolumns .signuppanel div {margin:1em;}
-.loginbox.twocolumns .signuppanel div li {font-size:90%;}
-
-.loginbox .loginsub {margin-left:10%;margin-right:10%;padding:10px;margin-bottom:5px;}
-.loginbox .guestsub {margin-left:10%;margin-right:10%;padding:10px;margin-bottom:5px;border-top:1px solid #DDD;}
-
-/** Blocks **/
-.block {border:1px solid #C8C9C7;background-color: #FEFEFE;margin-bottom:10px;overflow:hidden;}
-.block h1,
-.block h2,
-.block h3,
-.block h4 {margin:0px;}
-.block .header {height:24px;margin:0;display:inline;}
-.block .header .title {color: #000;}
-.block .header .title h2 {margin: 0 0 0 4px;}
-.block .content {background-color: white;}
-
-/** Admin **/
-.box.adminwarning {text-align:center;border:1px solid #C8C9C7;background-color:#E3E3E3;margin-bottom:1em;padding:10px 10%;}
-.box.copyright {text-align:center;font-size:90%;padding:10px 10%;}
-#adminsettings fieldset {border:1px solid #C8C9C7;background-color:#E3E3E3;}
-#adminsettings fieldset .generalbox {margin:1em 0.5em;border-color:#C8C9C7;}
-#adminsettings .form-buttons {margin-left:13em;}
-
-.form-item {width:100%;margin:1em 1em 2em 1em ;}
-.form-item .form-label {width:12.5em;text-align:right;float:left;margin-right:0.5em;}
-.form-item .form-label .form-shortname {display:block;color:#666;font-size:75%;}
-.form-item .form-setting {margin-left:13em;}
-.form-item .form-setting .defaultsnext {display:inline;}
-.form-item .form-setting .form-defaultinfo {display:inline;margin-left:0.5em;font-size:90%;color:#666;}
-.form-item .form-description {margin:0.5em 1em 0.5em 13em;}
-.form-item .form-textarea textarea {width:495px;}
-
-#authmenu .informationbox {width:80%;margin-left:auto;margin-right:auto;margin-bottom:10px;border:1px solid #C8C9C7;padding:10px;}
-#authmenu table td {border-width:0px;}
-
-#categoryquestions {margin-left:auto;margin-right:auto;width:100%;}
-
-#categoryquestions th,
-.user th,
-.user th.header,
-.group th.header,
-.admin table tr th,
-.admin table tr th.header {background-color:#E3DFD4;color:#FFF;border:2px solid #E3DFD4;border-bottom-color:#111;}
-
-.user th a:link,
-#categoryquestions th a:link,
-.group  th a:link,
-.admin table tr th a:link {color:#FFF;text-decoration:none;}
-
-.user th a:visited,
-#categoryquestions th a:visited,
-.group th a:visited,
-.admin table tr th a:visited {color:#FFF;text-decoration:underline;}
-
-.user tr td.cell,
-#categoryquestions tr td.cell,
-.group tr td.cell,
-.admin table tr td.cell {border:1px solid #C8C9C7;border-width:0px 1px;}
-
-.user .r1 .cell,
-#categoryquestions .r1 .cell,
-.group .r1 .cell,
-.admin table .r1 .cell {background-color:#EEE;}
-
-#categoryquestions th, .user th, .user th.header, .group th.header, .admin table tr th, .admin table tr th.header {color:black; border-width:1px;}
-
-#permissions th, td {border-bottom:1px solid #000000; padding:0.5em;}
-#permissions tr {background-color:#EEEEEE;}
-#permissions tr.rolecapheading {border-top: 1px black; background-color:#E3DFD4;}
-.user th a:link, #categoryquestions th a:link, .group th a:link, .admin table tr th a:link {
-    color:black;
-}
-.admin .plugincompattable .r1 .cell {background-color:#FFF;}
-
-.singlebutton,
-.buttons {text-align:center;margin:20px;}
-.buttons form {display:inline;}
-.buttons div {display:inline;}
-.buttons .singlebutton {display:inline;padding:5px;margin:0px;}
-.admin .generalbox {background-color:#EEE;border-color:#C8C9C7;}
-
-#admin-mnet-index table td,
-#files-index .column-content table td {border-width:0px;}
-
-/** Mforms **/
-.mform fieldset {border-color:#C8C9C7;}
-
-/** Tags **/
-.tag-management-form {text-align:center;}
-#tag-management-list {margin-top:1em;}
-
-/** User **/
-.userinfobox td {border-width:0px;vertical-align:top;}
-.userinfobox .side {width:120px;text-align:center;}
-.userinfobox .list .label {font-weight:bold;text-align:right;}
-
-/** Forum **/
-.forumheaderlist,
-.forumpost {margin-top:15px;border:1px solid #DDD;background-color:#EEE;}
-.forumpost .header {background-color:#C8C9C7;}
-.forumpost .topic {padding:7px;}
-.forumpost .topic .subject {font-weight:bold;}
-.forumpost .topic .author {font-size:0.8em;}
-.forumpost .left {background-color:#EEE;}
-.forumpost .content {background-color:#FFF;border-top:1px solid #333;}
-.forumpost .content .posting {padding:4px;}
-.forumpost .options {background-color:#FFF;}
-.forumpost .options .commands {font-size:0.9em;clear:both;padding:0.5em 5px 5px;text-align:right;}
-.forumpost .content .link {font-size:0.9em;}
-.forumpost .content .footer {font-size:0.9em;padding-top:0.5em;text-align:right;}
-
-/** Calendar **/
-.block.block_calendar_month td,
-.block.block_calendar_month th {border-width:0px;font-size:10px;padding:1px;width:14%;line-height:18px;}
-#calendar abbr,
-.block.block_calendar_month abbr {border-bottom-width:0px;}
-#calendar .weekend,
-.block.block_calendar_month .weekend {color:#A00;}
-#calendar .maincalendar .calendarmonth td.today,
-.block.block_calendar_month .today {border:1px solid #444;}
-#calendar .eventnone a,
-.block.block_calendar_month .eventnone a {color:#444;}
-
-#calendar {width:99%;margin:0px 1%;border-spacing:5px;border-collapse: separate;}
-#calendar td,
-#calendar th {border-width:0px;font-size:10px;padding:1px;width:14%;line-height:18px;vertical-align:top;}
-#calendar .maincalendar {width:auto;border:1px solid #DDD;}
-#calendar .maincalendar .heightcontainer {height:100%;position:relative;margin:1em;}
-#calendar .maincalendar .header {padding:5px;font-weight:bold;}
-#calendar .maincalendar .header .buttons {float:right;}
-#calendar .maincalendar table {width:100%;}
-#calendar .maincalendar .calendar-controls {width:100%;overflow:hidden;font-size:1.1em;}
-#calendar .maincalendar .calendar-controls .previous {display:block;float:left;width:20%;}
-#calendar .maincalendar .calendar-controls .current {display:block;float:left;width:60%;text-align:center;margin-top:0px;}
-#calendar .maincalendar .calendar-controls .next {display:block;float:left;width:20%;text-align:right;}
-#calendar .sidecalendar {width:200px;}
-#calendar .sidecalendar h2,
-#calendar .sidecalendar h3 {margin:5px;font-size:95%;}
-#calendar .sidecalendar .block {border:1px solid #DDD;margin-bottom:10px;text-align:center;}
-#calendar .sidecalendar .block table {margin:0px auto 5px auto;}
-#calendar .sidecalendar .block .filters table {width:95%;margin:0px auto 1em auto;}
-#calendar .sidecalendar .block .minicalendarblock {border-top:1px solid #DDD;}
-#calendar .filters table {padding:2px;background-color: #EEE;border:1px solid #DDD;border-spacing:2px;border-collapse: separate;}
-#calendar .filters table td {font-size:100%;width:auto;}
-#calendar .filters .eventskey {border:1px solid #444;overflow:hidden;}
-#calendar .calendar_event_global {background-color: #D6F8CD;}
-#calendar .calendar_event_course {background-color: #FFD3BD;}
-#calendar .calendar_event_group {background-color: #FEE7AE;}
-#calendar .calendar_event_user {background-color: #DCE7EC;}
-#calendar .maincalendar .calendarmonth {border-collapse: separate;}
-#calendar .maincalendar .calendarmonth th {font-size:0.9em;border-bottom:2px solid #444;}
-#calendar .maincalendar .calendarmonth td {border:1px solid #EEE;border-bottom-color:#CCC;border-right-color:#CCC;height:6em;}
-#calendar .maincalendar .calendarmonth td div {margin:4px;font-size:0.9em;}
-#calendar .maincalendar .calendarmonth td .day {font-weight:bold;}
-#calendar .maincalendar .calendarmonth tr td:first-child {border-left-color:#CCC;}
-#calendar .maincalendar .event {border-spacing: 0px;border:1px solid #DDD;background-color:#EEE;}
-#calendar .maincalendar .event .picture {width:32px;text-align:center;}
-#calendar .maincalendar .event .topic {width:auto;padding:5px;}
-#calendar .maincalendar .event .side {width:32px;}
-#calendar .maincalendar .event .description {width:auto;border-top:1px solid #DDD;border-left:1px solid #DDD;padding:5px;}
-#calendar .maincalendar .bottom {text-align:center;}
-#calendar .calendarmonth ul {margin:0px;padding:0px;}
-#calendar .calendarmonth ul li {list-style: none;margin:0px;padding:2px;}
-
-/** User **/
-.user .rolesform,
-.user .searchform,
-.user #showall,
-.user #participantsform {text-align:center;}
-.user #participantsform table {margin-top:1em;}
-.user #participantsform td {text-align:left;}
-.user table.controls {margin:5px auto;border:1px solid #DDD;background-color:#EEE;border-collapse: collapse;}
-.user table.controls td {border-width:0px;}
\ No newline at end of file
diff --git a/theme/formal_white/style/menu.css b/theme/formal_white/style/menu.css
new file mode 100755 (executable)
index 0000000..4a412a0
--- /dev/null
@@ -0,0 +1,39 @@
+/*#custommenu .yui3-menu ul {background-image:url([[pix:theme|custommenubg]]);background-repeat:repeat-x;background-color:#e1e1df;}*/
+#custommenu .yui3-menu {background-image:url([[pix:theme|custommenubg]]);background-repeat:repeat-x;background-color:#e1e1df;}
+
+.yui3-skin-sam .yui3-menu-content,
+.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-content,
+.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label,.yui3-skin-sam .yui3-menu-horizontal .yui3-menuitem-content{
+    border:0px none;
+}
+
+/*.yui3-menu ul{
+    background:url([[pix:theme|sprite]]) repeat-x 0 0;
+}*/
+
+.yui3-menu ul li ul{
+    background:#fff;
+}
+
+.yui3-menu ul li{
+    border-right:1px solid #ccc;
+}
+
+.yui3-menu ul li ul li{
+    border-right:none;
+    /*border-bottom:1px dashed #ccc;*/
+    padding:3px;
+}
+
+div.yui3-menu-content {
+    border:none !important;
+}
+
+ul.first-of-type li a {
+    border-top:none !important;
+    border-bottom:none !important;
+}
+
+ul.first-of-type li a:hover {
+    color:#003466;
+}
\ No newline at end of file
diff --git a/theme/formal_white/style/pagelayout.css b/theme/formal_white/style/pagelayout.css
new file mode 100755 (executable)
index 0000000..fa39c3e
--- /dev/null
@@ -0,0 +1,105 @@
+/************************************************************************
+    questo file sovrascrive parzialmente
+    il corrispondente foglio di stile nel tema "base"
+    Lo ho ottenuto
+    - duplicando l'originale
+    - modificando quanto necessario
+    - cancellando quanto conservato dell'originale
+************************************************************************/
+
+/****
+ * Three column floating div layout with 2,1,3 column order
+ * Based on: http://matthewjamestaylor.com/blog/holy-grail-no-quirks-mode.htm
+ * And:  http://matthewjamestaylor.com/blog/ultimate-3-column-holy-grail-pixels.htm
+ *
+ * #page
+ *   #page-header
+ *   #page-content
+ *   |  #region-main-box
+ *   |    #region-post-box
+ *   |      #region-main-wrap
+ *   |      |  #region-main
+ *   |      |    .region-content
+ *   |      #region-pre
+ *   |      |  .region-content
+ *   |      #region-post
+ *   |      |  .region-content
+ *   #page-footer
+ *
+ * The body tag may also contain one of three layout specific classes that describe
+ * the regions of the page and allow us to theme more easily.
+ *
+ *   default (no class) = Content + side pre + side post
+ *   side-pre-only      = Content + side pre
+ *   side-post-only     = Content + side post
+ *   content-only       = Content
+ *
+ ****/
+
+#page-header {
+    background-color:[[setting:headerbgc]];
+    /* arrotonadamento angoli in alto dell'header */
+    -moz-border-radius:6px 6px 0px 0px;    /* Firefox */
+    -webkit-border-radius:6px 6px 0px 0px; /* Safari, Chrome */
+    border-radius:6px 6px 0px 0px;         /* CSS3 */
+}
+#page-content {
+    /* arrotonadamento angolo in basso a sx */
+    /* -moz-border-radius:0px 0px 0px 6px;    /* Firefox */
+    /* -webkit-border-radius:0px 0px 0px 6px; /* Safari, Chrome */
+    /* border-radius:0px 0px 0px 6px;         /* CSS3 */
+    background-color:[[setting:blockcolumnbgc]]; /* colore della colonna di sinistra */
+    float:none;
+}
+#page-content #region-main-box {
+    left:[[setting:blockcolumnwidth]];
+    background-color:#FFF;
+}
+#page-content #region-post-box {
+    margin-left:[[setting:minusdoubleblockcolumnwidth]]; /*-2*[[setting:blockcolumnwidth]]*/
+    /* arrotonadamento angolo in basso a dx */
+    /* -moz-border-radius:0px 0px 6px 0px;    /* Firefox */
+    /* -webkit-border-radius:0px 0px 6px 0px; /* Safari, Chrome */
+    /* border-radius:0px 0px 6px 0px;         /* CSS3 */
+    background-color:[[setting:blockcolumnbgc]]; /* colore del fondo della parte occupata dai contenuti della colonna centrale e della colonna dx */
+}
+#page-content #region-main {
+    margin-left:[[setting:doubleblockcolumnwidth]];/*2*[[setting:blockcolumnwidth]]*/
+    background-color:white; /* questo serve a togliere la curvatura dagli angoli della zona centrale */
+}
+#page-content #region-pre {
+    left:[[setting:blockcolumnwidth]]; /*400-[[setting:blockcolumnwidth]]*/
+    width:[[setting:blockcolumnwidth]];
+    background-color:[[setting:blockcolumnbgc]]; /* colore della colonna di sx */
+}
+#page-content #region-post {
+    width:[[setting:blockcolumnwidth]];
+    /* arrotonadamento angolo in basso a dx */
+    /* -moz-border-radius:0px 0px 6px 0px;    /* Firefox */
+    /* -webkit-border-radius:0px 0px 6px 0px; /* Safari, Chrome */
+    /* border-radius:0px 0px 6px 0px;         /* CSS3 */
+    background-color:[[setting:blockcolumnbgc]]; /* colore del fondo della parte occupata dai contenuti della colonna centrale e della colonna dx */
+}
+#page-content .region-content {
+    padding:0.6em 8px 0.1em 8px; /* definisco lo spazio sopra e sotto ai blocchi */
+}
+
+/** Only side pre **/
+    .side-pre-only #page-content #region-post-box {margin-left:-[[setting:blockcolumnwidth]];}
+    .side-pre-only #page-content #region-main {margin-left:[[setting:blockcolumnwidth]];}
+
+/** Only side post **/
+    .side-post-only #page-content #region-post-box {margin-left:-[[setting:blockcolumnwidth]];}
+    .side-post-only #page-content #region-main {margin-left:[[setting:blockcolumnwidth]];}
+    .has_dock.side-post-only .page-middle #region-main {margin-left:[[setting:blockcolumnwidth]];}
+
+/** Report layout **/
+    .pagelayout-report #report-main-content .region-content {margin-left:[[setting:blockcolumnwidth]];}
+    .pagelayout-report #report-region-pre {width:[[setting:blockcolumnwidth]];}
+
+/** Correct for right to left languages **/
+    .dir-rtl.pagelayout-report #report-main-content .region-content {margin-left:0;margin-right:[[setting:blockcolumnwidth]];}
+
+/** Stabalise IE6 behaviour on the report layout **/
+/* aggiunti/sovrascritti da me */
+    .ie6.pagelayout-report #report-region-wrap {float:none;width:[[setting:blockcolumnwidth]];left:auto;position:absolute;top:0;}
\ No newline at end of file
diff --git a/theme/formal_white/style/quiz.css b/theme/formal_white/style/quiz.css
new file mode 100755 (executable)
index 0000000..89c5cc3
--- /dev/null
@@ -0,0 +1,31 @@
+/***
+ *** Core
+ ***/
+
+/* quiz */
+#page-mod-quiz-edit div.quizpage .pagecontent {background-color:[[setting:blockcolumnbgc]];}
+.questionbankwindow h2 {background-image:url([[pix:theme|gradient_h]]);background-repeat:repeat-x;border-top:1px #C6BDA8 solid;background-color:[[setting:blockcolumnbgc]];border-top:1px #C6BDA8 solid;}
+#page-mod-quiz-edit .questionbankwindow div.header {background-color:transparent;}
+#page-mod-quiz-edit .questionbankwindow div.header .title {color:#000;}
+#page-mod-quiz-edit .questionbankwindow div.header a:link,
+#page-mod-quiz-edit .questionbankwindow div.header a:visited {color:#0000EF}
+#page-mod-quiz-edit div.container div.generalbox {background-color:[[setting:blockcolumnbgc]];padding:1.5em;}
+#page-mod-quiz-edit div.questionbank .categoryquestionscontainer,
+#page-mod-quiz-edit div.questionbank .categorysortopotionscontainer,
+#page-mod-quiz-edit div.questionbank .categorypagingbarcontainer,
+#page-mod-quiz-edit div.questionbank .categoryselectallcontainer {padding:0 0 1.5em 0;}
+#page-mod-quiz-edit div.questionbank .categorypagingbarcontainer {padding:1em;background-color:[[setting:blockcolumnbgc]];margin:0 -1.2em;border-top:1px [[setting:blockcolumnbgc]] solid;border-bottom:1px [[setting:blockcolumnbgc]] solid;} /* spaziatura sopra e sotto alla tabella con le domande da spostare */
+#page-mod-quiz-edit div.questionbank .categoryquestionscontainer {margin:0 -1.2em -1em -1.2em;} /* tabella con le domande da spostare nel quiz*/
+
+#page-mod-quiz-edit div.editq div.question div.content {background-color:[[setting:blockcontentbgc]];} /* la signola domanda nel modello della pagina*/
+
+#page-mod-quiz-edit div.question div.content div.questioncontrols {background-color:[[setting:blockcontentbgc]];} /* la X per eliminare la domanda dal modello della pagina */
+
+#page-mod-quiz-edit div.question div.content div.points {margin-top:-0.5em;padding-bottom:0.5em;background-color:#EEE;} /* il quadratino del grade */
+#page-mod-quiz-edit div.question div.content div.points {border-color:[[setting:blockcontentbgc]];}
+
+#page-mod-quiz-edit div.quizpage .pagecontent .pagestatus {background-color:[[setting:blockcontentbgc]];}
+#page-mod-quiz-edit .quizpagedelete,
+#page-mod-quiz-edit .quizpagedelete img {background-color:transparent;}
+
+#page-mod-quiz-edit #page-footer {padding:0;}
\ No newline at end of file
diff --git a/theme/formal_white/style/settings.css b/theme/formal_white/style/settings.css
deleted file mode 100644 (file)
index 7f7e1a2..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-.block .content {background-color:[[setting:backgroundcolor]];}
-#page-content #region-main-box {left:[[setting:regionwidth]];}
-#page-content #region-post-box {margin-left:-[[setting:regionwidthdouble]];}
-#page-content #region-pre {width:[[setting:regionwidth]];left:[[setting:regionwidth]];}
-#page-content #region-post {width:[[setting:regionwidth]];}
-#page-content #region-main {margin-left:[[setting:regionwidthdouble]];}
-.side-pre-only #page-content #region-post-box {margin-left:-[[setting:regionwidth]];}
-.side-pre-only #page-content #region-main {margin-left:[[setting:regionwidth]];}
-
-/** Custom CSS **/
-[[setting:customcss]]
\ No newline at end of file
diff --git a/theme/formal_white/style/tabs.css b/theme/formal_white/style/tabs.css
new file mode 100644 (file)
index 0000000..6597cfa
--- /dev/null
@@ -0,0 +1,171 @@
+/**
+ * Tabs
+ */
+.tabtree {
+    position:relative;
+    margin-bottom:3.5em;
+}
+.tabtree .tabrow0 {
+    text-align:center;
+    width:100%;
+    margin:1em 0px;
+}
+/* serve a qualcosa? */
+.tabtree ul li.here .empty {
+    display: none;
+}
+.tabtree .tabrow0 li {
+    display:inline;
+    margin-right:-4px;
+}
+.tabtree .tabrow0 li.here {
+    font-weight: normal;
+}
+.tabtree .tabrow0 li.here .empty {
+    display: block;
+    height: 1px;
+    overflow: hidden;
+    padding: 0px;
+    position: absolute;
+    width: 100%;
+    bottom: -4px;
+}
+.tabtree .tabrow0 li.here a {
+    position:relative;
+    z-index:102;
+}
+.tabtree .tabrow0 li a {
+    background-image:url([[pix:theme|tab/left]]);
+    padding-left:14px;
+    padding-top:10px;
+    background-repeat:no-repeat;
+    padding-bottom:3px;
+    margin-bottom:-1px;
+
+    background-color:transparent;
+    border:none;
+}
+.tabtree .tabrow0 li a:hover {
+    background-image:url([[pix:theme|tab/left_hover]]);
+}
+.tabtree .tabrow0 li a span {
+    background-image:url([[pix:theme|tab/right]]);
+    background-repeat:no-repeat;
+    background-position:100% 0%;
+    padding-right:14px;
+    padding-top:10px;
+    padding-bottom:3px;
+}
+.tabtree .tabrow0 li a:hover span {
+    background-image:url([[pix:theme|tab/right_hover]]);
+}
+.tabtree .tabrow0 ul,
+.tabtree .tabrow0 div {
+    background-image:url([[pix:theme|tab/tabrow1]]);
+    background-position:0% 50%;
+    position:absolute;
+    width:100%;
+    border-top:1px solid #aaa;
+    padding:0.25em 0px;
+    top:100%;
+    margin:0px;
+}
+.tabtree .tabrow0 .empty {
+    height:1px;
+    overflow:hidden;
+    padding:0px;
+    position:absolute;
+}
+.tabtree .tabrow1 li a,
+.tabtree .tabrow1 li a:hover,
+.tabtree .tabrow1 li a span,
+.tabtree .tabrow1 li a:hover span {
+    background-image:none !important;
+}
+
+.groupmanagementtable {
+    width:90%;
+}
+.groupmanagementtable td {
+    vertical-align:top;
+    border-width:0px;
+}
+.groupmanagementtable td p {
+    margin:0px;
+}
+
+.ie7 .tabtree .tabrow0 li {
+    margin-left: 0;
+}
+
+.ie7 .tabtree .tabrow0 li.first {
+    margin-right: -4px;
+}
+
+.ie7 .tabtree .tabrow0 li.onerow {
+    margin-right: 0;
+}
+
+.ie7 .tabtree .tabrow0 a {
+    display: inline-block;
+    padding: 8px 0 0.35em 13px;
+    line-height: 1.5em;
+}
+
+.ie7 .tabtree .tabrow0 a span {
+    padding: 10px 1em 10px 0;
+}
+
+.ie7 .tabtree .tabrow0 div {
+    top: 2.6em;
+    padding: 0.2em 0;
+}
+
+.ie7 .tabtree .tabrow0 div.empty {
+    margin-right: 0;
+}
+
+.ie7.mod-quiz div.tabtree a span img.iconsmall {
+    margin: 0;
+    vertical-align: baseline;
+    position: relative;
+    top: 2px;
+}
+
+.ie6 .tabtree {
+    height: 100%;
+}
+
+.ie6 .tabtree .tabrow0 {
+    padding-top: 10px;
+}
+
+.ie6 .tabtree .tabrow0 li {
+    margin-left: 0;
+}
+
+.ie6 .tabtree .tabrow0 li.first {
+    margin-left: -4px;
+    margin-right: -4px;
+}
+
+.ie6 .tabtree .tabrow0 li.last a {
+    margin-right: 0;
+}
+
+.ie6 .tabtree .tabrow0 li.onerow {
+    margin-right: 0;
+}
+
+.ie6 .tabtree .tabrow0 a {
+    padding: 0 0 0 13px;
+}
+
+.ie6 .tabtree .tabrow0 a span {
+    padding: 12px 1em 4px 0;
+}
+
+.ie6 .tabtree .tabrow0 div {
+    top: 3.5em;
+    padding: 0.2em 0;
+}
\ No newline at end of file
index 8355637..f6f45f3 100644 (file)
@@ -297,9 +297,8 @@ h2.headingblock {
 
 .forumpost .topic {
        background: #fff url([[pix:theme|grad]]) repeat-x 0 100%;
-       border-width: 1px 1px 0;
-       border-color: #eee;
        padding: 0 10px 0;
+       border: 1px solid #eee;
 }
 
 .forumpost .subject {
index d3880ec..b492b8f 100644 (file)
@@ -9,6 +9,8 @@ $hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
 
 $showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
 $showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT));
+$custommenu = $OUTPUT->custom_menu();
+$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
 
 $bodyclasses = array();
 if ($showsidepre && !$showsidepost) {
@@ -18,7 +20,9 @@ if ($showsidepre && !$showsidepost) {
 } else if (!$showsidepost && !$showsidepre) {
     $bodyclasses[] = 'content-only';
 }
-
+if ($hascustommenu) {
+    $bodyclasses[] = 'has_custom_menu';
+}
 
 echo $OUTPUT->doctype() ?>
 <html <?php echo $OUTPUT->htmlattributes() ?>>
@@ -50,9 +54,17 @@ echo $OUTPUT->doctype() ?>
         
 <!-- END OF HEADER -->
 
+<?php if ($hascustommenu) { ?>
+<div id="custommenuwrap"><div id="custommenu"><?php echo $custommenu; ?></div></div>
+<?php } ?>
+
 <!-- START OF CONTENT -->
 
 <div id="page-content-wrapper" class="wrapper clearfix">
+
+
+
+
     <div id="page-content">
         <div id="region-main-box">
             <div id="region-post-box">
index bc6c787..74d01c1 100644 (file)
@@ -5,6 +5,8 @@ $hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
 $hasfooter = (empty($PAGE->layout_options['nofooter']));
 $hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
 $hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
+$custommenu = $OUTPUT->custom_menu();
+$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
 
 $bodyclasses = array();
 if ($hassidepre && !$hassidepost) {
@@ -14,6 +16,9 @@ if ($hassidepre && !$hassidepost) {
 } else if (!$hassidepost && !$hassidepre) {
     $bodyclasses[] = 'content-only';
 }
+if ($hascustommenu) {
+    $bodyclasses[] = 'has_custom_menu';
+}
 
 echo $OUTPUT->doctype() ?>
 <html <?php echo $OUTPUT->htmlattributes() ?>>
@@ -42,6 +47,10 @@ echo $OUTPUT->doctype() ?>
             <?php } ?>
         </div>
     </div>
+    
+<?php if ($hascustommenu) { ?>
+<div id="custommenuwrap"><div id="custommenu"><?php echo $custommenu; ?></div></div>
+<?php } ?>
 
         <?php if ($hasnavbar) { ?>
             <div class="navbar">
index a1866f3..e959c80 100644 (file)
@@ -5,6 +5,8 @@ $hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
 $hasfooter = (empty($PAGE->layout_options['nofooter']));
 $hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
 $hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
+$custommenu = $OUTPUT->custom_menu();
+$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
 
 $bodyclasses = array();
 if ($hassidepre && !$hassidepost) {
@@ -14,6 +16,9 @@ if ($hassidepre && !$hassidepost) {
 } else if (!$hassidepost && !$hassidepre) {
     $bodyclasses[] = 'content-only';
 }
+if ($hascustommenu) {
+    $bodyclasses[] = 'has_custom_menu';
+}
 
 echo $OUTPUT->doctype() ?>
 <html <?php echo $OUTPUT->htmlattributes() ?>>
@@ -43,6 +48,10 @@ echo $OUTPUT->doctype() ?>
         </div>
     </div>
 
+<?php if ($hascustommenu) { ?>
+<div id="custommenuwrap"><div id="custommenu"><?php echo $custommenu; ?></div></div>
+<?php } ?>
+
         <?php if ($hasnavbar) { ?>
             <div class="navbar">
                 <div class="wrapper clearfix">
index cff9b92..b2a2336 100644 (file)
@@ -81,6 +81,10 @@ a:active {
     padding: 5px 0;
 }
 
+.breadcrumb {
+    padding-left: 10px;
+}
+
 .navbar .navbutton {
     margin-top: 0;
 }
@@ -163,10 +167,7 @@ h2.headingblock {
 
 .course-content .current {
     background: #da5013;
-}
-
-.course-content .current .left {
-       color: #fff;
+    color: #fff;
 }
 
 .course-content .main .content {
@@ -287,4 +288,85 @@ h2.headingblock {
 
 .ie6 #dock .bd.oversized_content {
     width: 100%;
-}
\ No newline at end of file
+}
+
+/*custom menu styles */
+#custommenuwrap {
+    background-color: #F7F6F1;
+    border-bottom: 1px solid #DDDDDD;
+    padding: 3px 0px;
+}    
+
+#custommenu {
+    border: none !important;
+    border: 0px solid #fff !important;
+    margin: 0 25px;
+}
+
+#custommenu * {
+    border: none !important;
+}
+
+/*YUI Reset */
+.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-content{ 
+   background-position: -10000px -10000px; 
+}
+
+.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label{ 
+    background-position: -10000px -10000px; 
+}
+
+.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label-active,.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menuitem-active .yui3-menuitem-content,.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label-menuvisible{
+    background-position: -10000px -10000px; 
+}
+
+.yui3-skin-sam #page .yui3-menu-label,
+.yui3-skin-sam #page .yui3-menu .yui3-menu .yui3-menu-label {
+    background-position: right center; 
+}
+
+.yui3-skin-sam #page .yui3-menubuttonnav .yui3-menu-label em {
+    background-position: right center; 
+}
+
+.yui3-skin-sam #page .yui3-splitbuttonnav .yui3-menu-label .yui3-menu-toggle { 
+    background-position: 3px center;
+}
+
+.yui3-skin-sam #page .yui3-splitbuttonnav .yui3-menu-label-menuvisible .yui3-menu-toggle {
+    background-position: 0% 50%; 
+}
+
+.yui3-skin-sam #page .yui3-menu-label, .yui3-skin-sam #page .yui3-menuitem-content  {
+    color: #35251B;
+    font-weight: 400;
+}
+
+.custom_menu_submenu .yui3-menu-label, .custom_menu_submenu .yui3-menuitem-content {
+    color: #35251B !important;
+}
+
+.yui3-skin-sam #page .yui3-menu-label.yui3-menu-label-active, .yui3-skin-sam #page .yui3-menuitem-active .yui3-menuitem-content {
+    color: #DA5013;
+}
+
+.yui3-skin-sam #page .yui3-menu-content, .yui3-skin-sam #page .yui3-menu-content, .yui3-skin-sam #page .yui3-menu .yui3-menu .yui3-menu-content, .yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label, .yui3-skin-sam #page .yui3-menu-horizontal .yui3-menuitem-content  {
+    border: none;
+}
+
+.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label, .yui3-skin-sam .yui3-menu-horizontal .yui3-menuitem-content {
+    border-color:#808080;
+    border-style:solid;
+    border-width:0px 0;
+}
+
+#page .custom_menu_submenu {
+    border: 2px solid #DA5013 !important;
+    background: #fff;
+    -webkit-border-radius: 2px;
+    -moz-border-radius: 2px;
+    border-radius: 2px;
+    -webkit-box-shadow: 0px 1px 3px #ccc;
+    -moz-box-shadow: 0px 1px 3px #ccc;
+    box-shadow: 0px 1px 3px #ccc;
+}
index 6a7ecdb..1633067 100644 (file)
@@ -37,7 +37,7 @@ echo $OUTPUT->doctype() ?>
 <!-- start of header -->
        <div id="header-wrap">
                <div id="header-container">
-                       <div id="header">
+                       <div id="headerinner">
                        
                                <div id="headleft">
                                </div>
index 087f256..9b2bae8 100644 (file)
@@ -37,7 +37,7 @@ echo $OUTPUT->doctype() ?>
 <!-- start of header -->
        <div id="header-wrap">
                <div id="header-container">
-                       <div id="header">
+                       <div id="headerinner">
                        
                                <div id="headleft">
                                        <?php if ($hasheading && !empty($PAGE->theme->settings->logo)) { 
index ccc1ffc..dcb1091 100644 (file)
@@ -36,7 +36,7 @@ a:focus {
     width: 100%;
 }
 
-div#header {
+div#headerinner {
     width: 91%;
     min-width: 910px;
     height: 30px;
@@ -273,13 +273,12 @@ div.johndocsleft {
 /** breadcrumb image replacement **/
 
 div#jcontrols_button span.arrow.sep {
-    font-size: 1px;
+    font-size: .01em;
     color: #fafafa;
     background: url([[pix:theme|breadcrumb_separator_arrow_2_dots]]) no-repeat;
-    background-position: 50% 9px;
+    background-position: 50% 7px;
     display: inline-block;
     width: 16px;
-    line-height: 40px;
 }
 
 /** Block styles **/
index b9bdddf..7fdcfc9 100644 (file)
@@ -10,6 +10,9 @@ $hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
 $showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
 $showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT));
 
+$custommenu = $OUTPUT->custom_menu();
+$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
+
 $bodyclasses = array();
 if ($showsidepre && !$showsidepost) {
     $bodyclasses[] = 'side-pre-only';
@@ -18,6 +21,9 @@ if ($showsidepre && !$showsidepost) {
 } else if (!$showsidepost && !$showsidepre) {
     $bodyclasses[] = 'content-only';
 }
+if ($hascustommenu) {
+    $bodyclasses[] = 'has_custom_menu';
+}
 
 
 echo $OUTPUT->doctype() ?>
@@ -45,7 +51,11 @@ echo $OUTPUT->doctype() ?>
                            echo $PAGE->headingmenu;
                        ?>          
                </div>
+               <?php if ($hascustommenu) { ?>
+<div id="custommenuwrap"><div id="custommenu"><?php echo $custommenu; ?></div></div>
+<?php } ?>
            </div>
+           
     </div>
         
 <!-- END OF HEADER -->
index 4762fb5..ea06383 100644 (file)
@@ -5,6 +5,8 @@ $hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
 $hasfooter = (empty($PAGE->layout_options['nofooter']));
 $hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
 $hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
+$custommenu = $OUTPUT->custom_menu();
+$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
 
 $bodyclasses = array();
 if ($hassidepre && !$hassidepost) {
@@ -14,6 +16,9 @@ if ($hassidepre && !$hassidepost) {
 } else if (!$hassidepost && !$hassidepre) {
     $bodyclasses[] = 'content-only';
 }
+if ($hascustommenu) {
+    $bodyclasses[] = 'has_custom_menu';
+}
 
 echo $OUTPUT->doctype() ?>
 <html <?php echo $OUTPUT->htmlattributes() ?>>
@@ -28,7 +33,7 @@ echo $OUTPUT->doctype() ?>
 
 <div id="page">
 <?php if ($hasheading || $hasnavbar) { ?>
-    <div id="page-header" class="inside">
+    <div id="page-header" >
                <div id="page-header-wrapper" class="wrapper clearfix">
                <?php if ($hasheading) { ?>
                    <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
@@ -39,7 +44,9 @@ echo $OUTPUT->doctype() ?>
                                }
                            echo $PAGE->headingmenu ?>
                    </div>
-               <?php } ?>
+               <?php } if ($hascustommenu) { ?>
+                       <div id="custommenuwrap"><div id="custommenu"><?php echo $custommenu; ?></div></div>
+                       <?php } ?>
            </div>
     </div>
 
index e458e65..669c384 100644 (file)
@@ -48,7 +48,7 @@ a:active {
 ---------------------------*/
 
 #page-header {
-       background: url([[pix:theme|n1]]) repeat-x 0 100%;
+       background: url([[pix:theme|n1]]) repeat-x 0 0;
        color: #fff;
        height: 122px;
 }
@@ -57,6 +57,11 @@ a:active {
   font-size:2.5em;
   padding-top:70px;
   margin: 0;
+  text-shadow: 0 -1px 1px #000;
+}
+
+.has_custom_menu #page-header h1 {
+  padding-top:60px;
 }
 
 #page-header.inside {
@@ -148,12 +153,99 @@ a:active {
 
 .course-content .current {
        background: #1f5480;
-}
-
-.course-content .current .left {
        color: #fff;
 }
 
 .course-content .main .content {
        background: #fff;
 }
+
+/* Custom Menu */
+/*custom menu styles */
+#custommenuwrap {
+    clear: both;
+    padding-top: 4px;
+}    
+
+#custommenu {
+    border: none !important;
+    border: 0px solid #fff !important;
+}
+
+#custommenu * {
+    border: none !important;
+}
+
+/*YUI Reset */
+.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-content{ 
+   background-position: -10000px -10000px; 
+}
+
+.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label{ 
+    background-position: -10000px -10000px; 
+}
+
+.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label-active,.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menuitem-active .yui3-menuitem-content,.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label-menuvisible{
+    background-position: -10000px -10000px; 
+}
+
+.yui3-skin-sam #page .yui3-menu-label,
+.yui3-skin-sam #page .yui3-menu .yui3-menu .yui3-menu-label {
+    background-position: right center; 
+}
+
+.yui3-skin-sam #page .yui3-menubuttonnav .yui3-menu-label em {
+    background-position: right center; 
+}
+
+.yui3-skin-sam #page .yui3-splitbuttonnav .yui3-menu-label .yui3-menu-toggle { 
+    background-position: 3px center;
+}
+
+.yui3-skin-sam #page .yui3-splitbuttonnav .yui3-menu-label-menuvisible .yui3-menu-toggle {
+    background-position: 0% 50%; 
+}
+
+.yui3-skin-sam #page .yui3-menu-label, .yui3-skin-sam #page .yui3-menuitem-content  {
+    color: #fff;
+    font-weight: 600;
+    text-decoration: none;
+    padding-left: 0px;
+    padding-right: 20px !important;
+    text-shadow: 0 -1px 1px #000;
+}
+
+.custom_menu_submenu .yui3-menu-label, .custom_menu_submenu .yui3-menuitem-content {
+    color: #333 !important;
+    padding-left: 5px !important;
+    text-shadow:none !important;
+}
+
+.yui3-skin-sam #page .yui3-menu-label.yui3-menu-label-active, .yui3-skin-sam #page .yui3-menuitem-active .yui3-menuitem-content {
+    color: #ccc;
+}
+
+.yui3-skin-sam #page .yui3-menu-content, .yui3-skin-sam #page .yui3-menu-content, .yui3-skin-sam #page .yui3-menu .yui3-menu .yui3-menu-content, .yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label, .yui3-skin-sam #page .yui3-menu-horizontal .yui3-menuitem-content  {
+    border: none;
+}
+
+.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label, .yui3-skin-sam .yui3-menu-horizontal .yui3-menuitem-content {
+    border-color:#808080;
+    border-style:solid;
+    border-width:0px 0;
+}
+
+#page .custom_menu_submenu {
+    border: 1px solid #27608d !important;
+    border-top: none !important;
+    background: #fff;
+    -webkit-border-radius: 2px;
+    -moz-border-radius: 2px;
+    border-radius: 2px;
+    -webkit-box-shadow: 0px 1px 3px #ccc;
+    -moz-box-shadow: 0px 1px 3px #ccc;
+    box-shadow: 0px 1px 3px #ccc;
+}
+
+/** Custom CSS **/
+[[setting:customcss]]
index 381c291..877a798 100644 (file)
@@ -110,3 +110,21 @@ body.splash-orange {                /* Define margins and background colour/imag
     color: #fff;
 }
 
+/* Blog
+------------------------*/
+
+.splash-orange .blog_entry .subject a:link {        /* Defining all link styles*/
+    color: #000;
+}
+
+.splash-orange .blog_entry .subject a:visited {        /* Setting all visited link styles */
+    color: #000;
+}
+
+.splash-orange .blog_entry .subject a:hover {        /* Setting all rollover link styles */
+    color: #000;
+}
+
+.splash-orange .blog_entry .subject a:active {        /* Setting all active link styles */
+    color: #000;
+}
index a373051..8559d19 100644 (file)
@@ -63,8 +63,10 @@ if (!$currentuser &&
     !empty($CFG->forceloginforprofiles) &&
     !has_capability('moodle/user:viewdetails', $context) &&
     !has_coursecontact_role($userid)) {
+
     // Course managers can be browsed at site level. If not forceloginforprofiles, allow access (bug #4366)
     $struser = get_string('user');
+    $PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
     $PAGE->set_title("$SITE->shortname: $struser");  // Do not leak the name
     $PAGE->set_heading("$SITE->shortname: $struser");
     $PAGE->set_url('/user/profile.php', array('id'=>$userid));
@@ -247,9 +249,10 @@ if (has_capability('moodle/user:viewhiddendetails', $context)) {
     }
 }
 
-if ($user->maildisplay == 1
-   or ($user->maildisplay == 2 && !isguestuser())
-   or has_capability('moodle/course:useremail', $context)) {
+if ($currentuser
+  or $user->maildisplay == 1
+  or has_capability('moodle/course:useremail', $context)
+  or ($user->maildisplay == 2 and enrol_sharing_course($user, $USER))) {
 
     print_row(get_string("email").":", obfuscate_mailto($user->email, ''));
 }