# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
Index: moodle/admin/report/spamcleaner/index.php
--- moodle/admin/report/spamcleaner/index.php Base (1.23)
+++ moodle/admin/report/spamcleaner/index.php Locally Modified (Based On 1.23)
@@ -267,7 +267,7 @@
             $user->descriptionformat = FORMAT_MOODLE;
         }
 
-        $html .= '<td align="left">'.format_text($user->description, $user->descriptionformat).'</td>';
+        $html .= '<td align="left">'.format_text($user->description, $user->descriptionformat, array('overflowdiv'=>true)).'</td>';
         $html .= '<td width="100px" align="center">';
         $html .= '<button onclick="M.report_spamcleaner.del_user(this,'.$user->id.')">'.get_string('deleteuser', 'admin').'</button><br />';
         $html .= '<button onclick="M.report_spamcleaner.ignore_user(this,'.$user->id.')">'.get_string('ignore', 'admin').'</button>';
Index: moodle/backup/util/ui/renderer.php
--- moodle/backup/util/ui/renderer.php Base (1.17)
+++ moodle/backup/util/ui/renderer.php Locally Modified (Based On 1.17)
@@ -587,7 +587,7 @@
             $row->cells = array(
                 html_writer::empty_tag('input', array('type'=>'radio', 'name'=>'targetid', 'value'=>$category->id)),
                 $category->name,
-                format_text($category->description, $category->descriptionformat)
+                format_text($category->description, $category->descriptionformat, array('overflowdiv'=>true))
             );
             $table->data[] = $row;
         }
Index: moodle/blocks/course_summary/block_course_summary.php
--- moodle/blocks/course_summary/block_course_summary.php Base (1.40)
+++ moodle/blocks/course_summary/block_course_summary.php Locally Modified (Based On 1.40)
@@ -25,6 +25,7 @@
         $this->content = new stdClass();
         $options = new stdClass();
         $options->noclean = true;    // Don't clean Javascripts etc
+        $options->overflowdiv = true;
         $context = get_context_instance(CONTEXT_COURSE, $this->page->course->id);
         $this->page->course->summary = file_rewrite_pluginfile_urls($this->page->course->summary, 'pluginfile.php', $context->id, 'course', 'summary', NULL);
         $this->content->text = format_text($this->page->course->summary, $this->page->course->summaryformat, $options);
Index: moodle/blocks/glossary_random/block_glossary_random.php
--- moodle/blocks/glossary_random/block_glossary_random.php Base (1.40)
+++ moodle/blocks/glossary_random/block_glossary_random.php Locally Modified (Based On 1.40)
@@ -84,6 +84,7 @@
 
                 $options = new stdClass();
                 $options->trusted = $entry->definitiontrust;
+                $options->overflowdiv = true;
                 $text .= format_text($entry->definition, $entry->definitionformat, $options);
 
                 $this->config->nexttime = usergetmidnight(time()) + DAYSECS * $this->config->refresh;
Index: moodle/blocks/html/block_html.php
--- moodle/blocks/html/block_html.php Base (1.29)
+++ moodle/blocks/html/block_html.php Locally Modified (Based On 1.29)
@@ -46,12 +46,11 @@
             return $this->content;
         }
 
+        $filteropt = new stdClass;
+        $filteropt->overflowdiv = true;
         if ($this->content_is_trusted()) {
             // fancy html allowed only on course, category and system blocks.
-            $filteropt = new stdClass;
             $filteropt->noclean = true;
-        } else {
-            $filteropt = null;
         }
 
         $this->content = new stdClass;
Index: moodle/blocks/html/styles.css
--- moodle/blocks/html/styles.css No Base Revision
+++ moodle/blocks/html/styles.css Locally New
@@ -0,0 +1,2 @@
+.block.block_html .content {padding:0;}
+.block.block_html .content .no-overflow {padding:4px;}
\ No newline at end of file
Index: moodle/blocks/rss_client/block_rss_client.php
--- moodle/blocks/rss_client/block_rss_client.php Base (1.107)
+++ moodle/blocks/rss_client/block_rss_client.php Locally Modified (Based On 1.107)
@@ -185,7 +185,7 @@
         }
 
 
-        $r.='<ul class="list">'."\n";
+        $r.='<ul class="list no-overflow">'."\n";
 
         $feeditems = $feed->get_items(0, $maxentries);
         foreach($feeditems as $item){
Index: moodle/blocks/site_main_menu/block_site_main_menu.php
--- moodle/blocks/site_main_menu/block_site_main_menu.php Base (1.45)
+++ moodle/blocks/site_main_menu/block_site_main_menu.php Locally Modified (Based On 1.45)
@@ -34,13 +34,14 @@
 /// extra fast view mode
         if (!$isediting) {
             if (!empty($modinfo->sections[0])) {
+                $options = array('overflowdiv'=>true);
                 foreach($modinfo->sections[0] as $cmid) {
                     $cm = $modinfo->cms[$cmid];
                     if (!$cm->uservisible) {
                         continue;
                     }
                     if ($cm->modname == 'label') {
-                        $this->content->items[] = format_text($cm->extra, FORMAT_HTML);
+                        $this->content->items[] = format_text($cm->extra, FORMAT_HTML, $options);
                         $this->content->icons[] = '';
                     } else {
                         $linkcss = $cm->visible ? '' : ' class="dimmed" ';
@@ -85,6 +86,7 @@
 
         if (!empty($section->sequence)) {
             $sectionmods = explode(',', $section->sequence);
+            $options = array('overflowdiv'=>true);
             foreach ($sectionmods as $modnumber) {
                 if (empty($mods[$modnumber])) {
                     continue;
@@ -127,7 +129,7 @@
                     }
 
                     if ($mod->modname == 'label') {
-                        $this->content->items[] = format_text($extra, FORMAT_HTML).$editbuttons;
+                        $this->content->items[] = format_text($extra, FORMAT_HTML,$options).$editbuttons;
                         $this->content->icons[] = '';
                     } else {
                         //Accessibility: incidental image - should be empty Alt text
Index: moodle/blocks/social_activities/block_social_activities.php
--- moodle/blocks/social_activities/block_social_activities.php Base (1.37)
+++ moodle/blocks/social_activities/block_social_activities.php Locally Modified (Based On 1.37)
@@ -36,13 +36,14 @@
 /// extra fast view mode
         if (!$isediting) {
             if (!empty($modinfo->sections[0])) {
+                $options = array('overflowdiv'=>true);
                 foreach($modinfo->sections[0] as $cmid) {
                     $cm = $modinfo->cms[$cmid];
                     if (!$cm->uservisible) {
                         continue;
                     }
                     if ($cm->modname == 'label') {
-                        $this->content->items[] = format_text($cm->extra, FORMAT_HTML);
+                        $this->content->items[] = format_text($cm->extra, FORMAT_HTML, $options);
                         $this->content->icons[] = '';
                     } else {
                         $linkcss = $cm->visible ? '' : ' class="dimmed" ';
@@ -94,6 +95,7 @@
 
         if (!empty($section) && !empty($section->sequence)) {
             $sectionmods = explode(',', $section->sequence);
+            $options = array('overflowdiv'=>true);
             foreach ($sectionmods as $modnumber) {
                 if (empty($mods[$modnumber])) {
                     continue;
@@ -136,7 +138,7 @@
                     }
 
                     if ($mod->modname == 'label') {
-                        $this->content->items[] = format_text($extra, FORMAT_HTML).$editbuttons;
+                        $this->content->items[] = format_text($extra, FORMAT_HTML, $options).$editbuttons;
                         $this->content->icons[] = '';
                     } else {
                         //Accessibility: incidental image - should be empty Alt text
Index: moodle/blog/locallib.php
--- moodle/blog/locallib.php Base (1.39)
+++ moodle/blog/locallib.php Locally Modified (Based On 1.39)
@@ -114,7 +114,8 @@
         }
         $this->summary = file_rewrite_pluginfile_urls($this->summary, 'pluginfile.php', SYSCONTEXTID, 'blog', 'post', $this->id);
 
-        $template['body'] = format_text($this->summary, $this->summaryformat).$cmttext;
+        $options = array('overflowdiv'=>true);
+        $template['body'] = format_text($this->summary, $this->summaryformat, $options).$cmttext;
         $template['title'] = format_string($this->subject);
         $template['userid'] = $user->id;
         $template['author'] = fullname($user);
Index: moodle/cohort/index.php
--- moodle/cohort/index.php Base (1.7)
+++ moodle/cohort/index.php Locally Modified (Based On 1.7)
@@ -54,7 +54,7 @@
 $strcohorts = get_string('cohorts', 'cohort');
 
 if ($category) {
-    $PAGE->set_pagelayout('admin');
+    $PAGE->set_pagelayout('report');
     $PAGE->set_context($context);
     $PAGE->set_url('/cohort/index.php', array('contextid'=>$context->id));
     $PAGE->set_title($strcohorts);
@@ -62,7 +62,7 @@
     $PAGE->navbar->add($category->name, new moodle_url('/course/index.php', array('categoryedit'=>'1')));
     $PAGE->navbar->add($strcohorts);
 } else {
-    admin_externalpage_setup('cohorts');
\ No newline at end of file
+    admin_externalpage_setup('cohorts', '', null, '', array('pagelayout'=>'report'));
\ No newline at end of file
 }
 
 echo $OUTPUT->header();
Index: moodle/comment/index.php
--- moodle/comment/index.php Base (1.11)
+++ moodle/comment/index.php Locally Modified (Based On 1.11)
@@ -23,7 +23,7 @@
 require_once('locallib.php');
 
 require_login();
-admin_externalpage_setup('comments');
+admin_externalpage_setup('comments', '', null, '', array('pagelayout'=>'report'));
 
 $context = get_context_instance(CONTEXT_SYSTEM);
 require_capability('moodle/comment:delete', $context);
Index: moodle/comment/lib.php
--- moodle/comment/lib.php Base (1.45)
+++ moodle/comment/lib.php Locally Modified (Based On 1.45)
@@ -413,6 +413,7 @@
 
         $comments = array();
         $candelete = has_capability('moodle/comment:delete', $this->context);
+        $formatoptions = array('overflowdiv' => true);
         $rs = $DB->get_recordset_sql($sql, $params, $start, $CFG->commentsperpage);
         foreach ($rs as $u) {
             $c = new stdClass();
@@ -424,7 +425,7 @@
             $c->profileurl = $url->out();
             $c->fullname = fullname($u);
             $c->time = userdate($c->timecreated, get_string('strftimerecent', 'langconfig'));
-            $c->content = format_text($c->content, $c->format);
+            $c->content = format_text($c->content, $c->format, $formatoptions);
 
             $c->avatar = $OUTPUT->user_picture($u, array('size'=>18));
             if (($USER->id == $u->id) || !empty($candelete)) {
@@ -513,7 +514,7 @@
             $newcmt->fullname = fullname($USER);
             $url = new moodle_url('/user/view.php', array('id'=>$USER->id, 'course'=>$this->courseid));
             $newcmt->profileurl = $url->out();
-            $newcmt->content = format_text($newcmt->content, $format);
+            $newcmt->content = format_text($newcmt->content, $format, array('overflowdiv'=>true));
             $newcmt->avatar = $OUTPUT->user_picture($USER, array('size'=>16));
             return $newcmt;
         } else {
Index: moodle/comment/locallib.php
--- moodle/comment/locallib.php Base (1.9)
+++ moodle/comment/locallib.php Locally Modified (Based On 1.9)
@@ -47,11 +47,12 @@
             WHERE u.id=c.userid ORDER BY c.timecreated ASC";
 
         $comments = array();
+        $formatoptions = array('overflowdiv' => true);
         if ($records = $DB->get_records_sql($sql, array(), $start, $this->perpage)) {
             foreach ($records as $item) {
                 $item->fullname = fullname($item);
                 $item->time = userdate($item->timecreated);
-                $item->content = format_text($item->content);
+                $item->content = format_text($item->content, FORMAT_MOODLE, $formatoptions);
                 $comments[] = $item;
                 unset($item->firstname);
                 unset($item->lastname);
Index: moodle/course/category.php
--- moodle/course/category.php Base (1.190)
+++ moodle/course/category.php Locally Modified (Based On 1.190)
@@ -196,6 +196,7 @@
         $options = new stdClass;
         $options->noclean = true;
         $options->para = false;
+        $options->overflowdiv = true;
         if (!isset($category->descriptionformat)) {
             $category->descriptionformat = FORMAT_MOODLE;
         }
Index: moodle/course/format/topics/format.php
--- moodle/course/format/topics/format.php Base (1.131)
+++ moodle/course/format/topics/format.php Locally Modified (Based On 1.131)
@@ -107,6 +107,7 @@
     $summarytext = file_rewrite_pluginfile_urls($thissection->summary, 'pluginfile.php', $coursecontext->id, 'course', 'section', $thissection->id);
     $summaryformatoptions = new stdClass();
     $summaryformatoptions->noclean = true;
+    $summaryformatoptions->overflowdiv = true;
     echo format_text($summarytext, $thissection->summaryformat, $summaryformatoptions);
 
     if ($PAGE->user_is_editing() && has_capability('moodle/course:update', $coursecontext)) {
@@ -229,6 +230,7 @@
                 $summarytext = file_rewrite_pluginfile_urls($thissection->summary, 'pluginfile.php', $coursecontext->id, 'course', 'section', $thissection->id);
                 $summaryformatoptions = new stdClass();
                 $summaryformatoptions->noclean = true;
+                $summaryformatoptions->overflowdiv = true;
                 echo format_text($summarytext, $thissection->summaryformat, $summaryformatoptions);
             } else {
                echo '&nbsp;';
Index: moodle/course/format/weeks/format.php
--- moodle/course/format/weeks/format.php Base (1.123)
+++ moodle/course/format/weeks/format.php Locally Modified (Based On 1.123)
@@ -99,8 +99,9 @@
 
         $coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
         $summarytext = file_rewrite_pluginfile_urls($thissection->summary, 'pluginfile.php', $coursecontext->id, 'course', 'section', $thissection->id);
-        $summaryformatoptions = new stdClass();
+        $summaryformatoptions = new stdClass;
         $summaryformatoptions->noclean = true;
+        $summaryformatoptions->overflowdiv = true;
         echo format_text($summarytext, $thissection->summaryformat, $summaryformatoptions);
 
         if ($PAGE->user_is_editing() && has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) {
@@ -230,8 +231,9 @@
                 echo '<div class="summary">';
                 $coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
                 $summarytext = file_rewrite_pluginfile_urls($thissection->summary, 'pluginfile.php', $coursecontext->id, 'course', 'section', $thissection->id);
-                $summaryformatoptions = new stdClass();
+                $summaryformatoptions = new stdClass;
                 $summaryformatoptions->noclean = true;
+                $summaryformatoptions->overflowdiv = true;
                 echo format_text($summarytext, $thissection->summaryformat, $summaryformatoptions);
 
                 if ($PAGE->user_is_editing() && has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) {
Index: moodle/course/info.php
--- moodle/course/info.php Base (1.46)
+++ moodle/course/info.php Locally Modified (Based On 1.46)
@@ -54,7 +54,7 @@
     echo $OUTPUT->box_start('generalbox info');
 
     $course->summary = file_rewrite_pluginfile_urls($course->summary, 'pluginfile.php', $context->id, 'course', 'summary', NULL);
-    echo format_text($course->summary, $course->summaryformat, NULL, $course->id);
+    echo format_text($course->summary, $course->summaryformat, array('overflowdiv'=>true), $course->id);
 
     if (!empty($CFG->coursecontact)) {
         $coursecontactroles = explode(',', $CFG->coursecontact);
Index: moodle/course/lib.php
--- moodle/course/lib.php Base (1.780)
+++ moodle/course/lib.php Locally Modified (Based On 1.780)
@@ -1272,6 +1272,7 @@
 
     $labelformatoptions = new stdClass();
     $labelformatoptions->noclean = true;
+    $labelformatoptions->overflowdiv = true;
 
 /// Casting $course->modinfo to string prevents one notice when the field is null
     $modinfo = get_fast_modinfo($course);
@@ -2322,6 +2323,7 @@
     $options = NULL;
     $options->noclean = true;
     $options->para = false;
+    $options->overflowdiv = true;
     if (!isset($course->summaryformat)) {
         $course->summaryformat = FORMAT_MOODLE;
     }
@@ -2468,6 +2470,7 @@
     $options = NULL;
     $options->noclean = true;
     $options->para = false;
+    $options->overflowdiv = true;
     echo format_text($course->summary, $course->summaryformat, $options);
     echo '</div>';
     echo '</div>';
Index: moodle/course/report/outline/index.php
--- moodle/course/report/outline/index.php Base (1.38)
+++ moodle/course/report/outline/index.php Locally Modified (Based On 1.38)
@@ -12,7 +12,7 @@
     }
 
     $PAGE->set_url('/course/report/outline/index.php', array('id'=>$id));
-    $PAGE->set_pagelayout('admin');
+    $PAGE->set_pagelayout('report');
 
     require_login($course);
     $context = get_context_instance(CONTEXT_COURSE, $course->id);
@@ -47,6 +47,7 @@
 
     $outlinetable = new html_table();
     $outlinetable->attributes['class'] = 'generaltable boxaligncenter';
+    $outlinetable->attributes['style'] = 'width:2000px;';
     $outlinetable->cellpadding = 5;
     $outlinetable->id = 'outlinetable';
     $outlinetable->head = array($stractivity, $strviews);
Index: moodle/grade/edit/tree/grade.php
--- moodle/grade/edit/tree/grade.php Base (1.40)
+++ moodle/grade/edit/tree/grade.php Locally Modified (Based On 1.40)
@@ -41,6 +41,7 @@
     print_error('nocourseid');
 }
 
+$PAGE->set_pagelayout('incourse');
 require_login($course);
 $context = get_context_instance(CONTEXT_COURSE, $course->id);
 if (!has_capability('moodle/grade:manage', $context)) {
Index: moodle/grade/lib.php
--- moodle/grade/lib.php Base (1.217)
+++ moodle/grade/lib.php Locally Modified (Based On 1.217)
@@ -628,7 +628,11 @@
         $title = $PAGE->course->fullname.': ' . $stractive_plugin;
     }
 
+    if ($active_type == 'report') {
+        $PAGE->set_pagelayout('report');
+    } else {
     $PAGE->set_pagelayout('admin');
+    }
     $PAGE->set_title(get_string('grades') . ': ' . $stractive_type);
     $PAGE->set_heading($title);
     if ($buttons instanceof single_button) {
Index: moodle/grade/report/grader/index.php
--- moodle/grade/report/grader/index.php Base (1.123)
+++ moodle/grade/report/grader/index.php Locally Modified (Based On 1.123)
@@ -106,13 +106,15 @@
 
 $reportname = get_string('pluginname', 'gradereport_grader');
 
+/// Print header
+print_grade_page_head($COURSE->id, 'report', 'grader', $reportname, false, $buttons);
+
 //Initialise the grader report object that produces the table
 //the class grade_report_grader_ajax was removed as part of MDL-21562
 $report = new grade_report_grader($courseid, $gpr, $context, $page, $sortitemid);
 
 // make sure separate group does not prevent view
 if ($report->currentgroup == -2) {
-    print_grade_page_head($COURSE->id, 'report', 'grader', $reportname, false, $buttons);
     echo $OUTPUT->heading(get_string("notingroup"));
     echo $OUTPUT->footer();
     exit;
@@ -136,9 +138,6 @@
 $numusers = $report->get_numusers();
 $report->load_final_grades();
 
-/// Print header
-print_grade_page_head($COURSE->id, 'report', 'grader', $reportname, false, $buttons);
-
 echo $report->group_selector;
 echo '<div class="clearer"></div>';
 // echo $report->get_toggles_html();
Index: moodle/grade/report/user/index.php
--- moodle/grade/report/user/index.php Base (1.53)
+++ moodle/grade/report/user/index.php Locally Modified (Based On 1.53)
@@ -30,6 +30,7 @@
     print_error('nocourseid');
 }
 require_login($course);
+$PAGE->set_pagelayout('report');
 
 $context = get_context_instance(CONTEXT_COURSE, $course->id);
 require_capability('gradereport/user:view', $context);
@@ -149,5 +150,3 @@
 }
 
 echo $OUTPUT->footer();
-
-
Index: moodle/grade/report/user/lib.php
--- moodle/grade/report/user/lib.php Base (1.59)
+++ moodle/grade/report/user/lib.php Locally Modified (Based On 1.59)
@@ -324,7 +324,7 @@
 
                 } else {
                     $data['feedback']['class'] = $class.' feedbacktext';
-                    $data['feedback']['content'] = format_text($grade_grade->feedback, $grade_grade->feedbackformat);
+                    $data['feedback']['content'] = format_text($grade_grade->feedback, $grade_grade->feedbackformat, array('overflowdiv'=>true));
                 }
 
                 /// Range
Index: moodle/grade/report/user/styles.css
--- moodle/grade/report/user/styles.css Base (1.1)
+++ moodle/grade/report/user/styles.css Locally Modified (Based On 1.1)
@@ -1,36 +1,37 @@
-.path-grade-report-user table.user-grade .datesubmitted {font-size: 0.7em;}
-.path-grade-report-user table.user-grade .courseitem,
-.path-grade-report-user table.user-grade .categoryitem {font-weight: bold;}
-.path-grade-report-user table.user-grade td.cell {padding-left: 5px;padding-right: 5px;}
+.path-grade-report-user .user-grade .datesubmitted {font-size: 0.7em;}
+.path-grade-report-user .user-grade .courseitem,
+.path-grade-report-user .user-grade .categoryitem {font-weight: bold;}
+.path-grade-report-user .user-grade td.cell {padding-left: 5px;padding-right: 5px;}
 #graded_users_selector {float: right;text-align: right;}
 
 /* this must be last if we want to override other category and course item colors */
-.path-grade-report-user table.user-grade .hidden,
-.path-grade-report-user table.user-grade .hidden a {color:#aaaaaa;}
-table.user-grade {border: 1px solid black;margin: auto;padding: 0.25em;font-size: 0.8em;}
-table.user-grade td {margin: 1px;padding: 0.25em;}
-table.user-grade thead {border-bottom: 3px double black;}
-table.user-grade thead th {padding: 0.25em 0.75em;}
-table.user-grade td.oddd1 {background-color: #f3dfd0;}
-table.user-grade td.oddd2 {background-color: #d0dbf3;}
-table.user-grade td.oddd3 {background-color: #d0f3d6;}
-table.user-grade td.oddd4 {background-color: #f0f0aa;}
-table.user-grade td.evend2 {background-color: #b0bbd3;}
-table.user-grade td.evend3 {background-color: #b0dfb6;}
-table.user-grade td.evend4 {background-color: #cac8be;}
-table.user-grade td.b1t,
-table.user-grade td.b2t {border-top: 2px solid black;}
-table.user-grade td.b1r,
-table.user-grade td.b2r {border-right: 2px solid black;}
-table.user-grade td.b1b,
-table.user-grade td.b2b {border-bottom: 2px solid black;}
-table.user-grade td.b1l,
-table.user-grade td.b2l {border-left: 2px solid black;}
-table.user-grade td.baggt,
-table.user-grade td.baggb {font-style: italic;font-weight: bold;}
-table.user-grade td.baggt {border-top: 3px double black;}
-table.user-grade td.baggb {border-bottom: 3px double black;}
-table.user-grade td.item {border-left: 1px solid gray;border-right: 1px solid gray;}
-table.user-grade td.excluded {background-color: #666;}
-table.user-grade td.hidden {color: #aaa;}
-table.user-grade td {min-width: 0.5em;vertical-align: top;}
\ No newline at end of file
+.path-grade-report-user .user-grade .hidden,
+.path-grade-report-user .user-grade .hidden a {color:#aaaaaa;}
+.user-grade {border: 1px solid black;margin: auto;padding: 0.25em;font-size: 0.8em;}
+.user-grade td {margin: 1px;padding: 0.25em;min-width: 2em;vertical-align: top;}
+.user-grade thead {border-bottom: 3px double black;}
+.user-grade thead th {padding: 0.25em 0.75em;}
+.user-grade td.oddd1 {background-color: #f3dfd0;}
+.user-grade td.oddd2 {background-color: #d0dbf3;}
+.user-grade td.oddd3 {background-color: #d0f3d6;}
+.user-grade td.oddd4 {background-color: #f0f0aa;}
+.user-grade td.evend2 {background-color: #b0bbd3;}
+.user-grade td.evend3 {background-color: #b0dfb6;}
+.user-grade td.evend4 {background-color: #cac8be;}
+.user-grade td.b1t,
+.user-grade td.b2t {border-top: 2px solid black;}
+.user-grade td.b1r,
+.user-grade td.b2r {border-right: 2px solid black;}
+.user-grade td.b1b,
+.user-grade td.b2b {border-bottom: 2px solid black;}
+.user-grade td.b1l,
+.user-grade td.b2l {border-left: 2px solid black;}
+.user-grade td.baggt,
+.user-grade td.baggb {font-style: italic;font-weight: bold;}
+.user-grade td.baggt {border-top: 3px double black;}
+.user-grade td.baggb {border-bottom: 3px double black;}
+.user-grade td.item {border-left: 1px solid gray;border-right: 1px solid gray;}
+.user-grade td.excluded {background-color: #666;}
+.user-grade td.hidden {color: #aaa;}
+.user-grade td.feedbacktext {max-width:600px;padding:0;}
+.pagelayout-report .user-grade .feedbacktext .no-overflow {overflow:auto;padding:0.25em;}
\ No newline at end of file
Index: moodle/group/members.php
--- moodle/group/members.php Base (1.36)
+++ moodle/group/members.php Locally Modified (Based On 1.36)
@@ -97,7 +97,9 @@
 if (!isset($group->descriptionformat)) {
     $group->descriptionformat = FORMAT_MOODLE;
 }
-$contentcell->text = format_text($group->description, $group->descriptionformat);
+$options = new stdClass;
+$options->overflowdiv = true;
+$contentcell->text = format_text($group->description, $group->descriptionformat, $options);
 $groupinfotable->data[] = new html_table_row(array($picturecell, $contentcell));
 echo html_writer::table($groupinfotable);
 
Index: moodle/group/overview.php
--- moodle/group/overview.php Base (1.35)
+++ moodle/group/overview.php Locally Modified (Based On 1.35)
@@ -162,6 +162,7 @@
         $description = file_rewrite_pluginfile_urls($groups[$gpid]->description, 'pluginfile.php', $context->id, 'group', 'description', $gpid);
         $options = new stdClass;
         $options->noclean = true;
+        $options->overflowdiv = true;
         $jsdescription = trim(format_text($description, $groups[$gpid]->descriptionformat, $options));
         if (empty($jsdescription)) {
             $line[] = $name;
@@ -187,6 +188,7 @@
         $description = file_rewrite_pluginfile_urls($groupings[$gpgid]->description, 'pluginfile.php', $context->id, 'grouping', 'description', $gpgid);
         $options = new stdClass;
         $options->noclean = true;
+        $options->overflowdiv = true;
         echo $OUTPUT->box(format_text($description, $groupings[$gpgid]->descriptionformat, $options), 'generalbox boxwidthnarrow boxaligncenter');
     }
     echo html_writer::table($table);
Index: moodle/help.php
--- moodle/help.php Base (1.76)
+++ moodle/help.php Locally Modified (Based On 1.76)
@@ -65,6 +65,7 @@
     $options->filter = false;
     $options->para = true;
     $options->newlines = false;
+    $options->overflowdiv = !$ajax;
 
     echo $OUTPUT->heading(format_string(get_string($identifier, $component)), 1, 'helpheading');
     // Should be simple wiki only MDL-21695
Index: moodle/index.php
--- moodle/index.php Base (1.265)
+++ moodle/index.php Locally Modified (Based On 1.265)
@@ -117,6 +117,7 @@
             $summarytext = file_rewrite_pluginfile_urls($section->summary, 'pluginfile.php', $context->id, 'course', 'section', $section->id);
             $summaryformatoptions = new stdClass();
             $summaryformatoptions->noclean = true;
+            $summaryformatoptions->overflowdiv = true;
 
             echo format_text($summarytext, $section->summaryformat, $summaryformatoptions);
 
Index: moodle/lib/adminlib.php
--- moodle/lib/adminlib.php Base (1.510)
+++ moodle/lib/adminlib.php Locally Modified (Based On 1.510)
@@ -5526,8 +5526,10 @@
  *      added to the turn blocks editing on/off form, so this page reloads correctly.
  * @param string $actualurl if the actual page being viewed is not the normal one for this
  *      page (e.g. admin/roles/allowassin.php, instead of admin/roles/manage.php, you can pass the alternate URL here.
+ * @param array $options Additional options that can be specified for page setup.
+ *      pagelayout - This option can be used to set a specific pagelyaout, admin is default.
  */
-function admin_externalpage_setup($section, $extrabutton = '', array $extraurlparams = null, $actualurl = '') {
+function admin_externalpage_setup($section, $extrabutton = '', array $extraurlparams = null, $actualurl = '', array $options = array()) {
     global $CFG, $PAGE, $USER, $SITE, $OUTPUT;
 
     $PAGE->set_context(null); // hack - set context to something, by default to system context
@@ -5549,7 +5551,10 @@
         die;
     }
 
-    if ($section === 'upgradesettings') {
+    if (!empty($options['pagelayout'])) {
+        // A specific page layout has been requested.
+        $PAGE->set_pagelayout($options['pagelayout']);
+    } else if ($section === 'upgradesettings') {
         $PAGE->set_pagelayout('maintenance');
     } else {
         $PAGE->set_pagelayout('admin');
Index: moodle/lib/pagelib.php
--- moodle/lib/pagelib.php Base (1.196)
+++ moodle/lib/pagelib.php Locally Modified (Based On 1.196)
@@ -838,6 +838,9 @@
      * in the standard theme.
      */
     public function set_pagelayout($pagelayout) {
+        if (!empty($this->_wherethemewasinitialised) && $pagelayout != $this->_pagelayout) {
+            debugging('Page layout has already been set and cannot be changed.', DEBUG_DEVELOPER);
+        }
         $this->_pagelayout = $pagelayout;
     }
 
@@ -1203,11 +1206,6 @@
     public function initialise_theme_and_output() {
         global $OUTPUT, $PAGE, $SITE;
 
-        // If you have lost all blocks on a page and cannot work out why
-        // try uncommenting this this debugging line and seeing what you get.
-        // Chances are the theme and output are being initialised prematurely.
-        // debugging('Initialising theme and output with layout '.$this->_pagelayout, DEBUG_DEVELOPER);
-
         if (!empty($this->_wherethemewasinitialised)) {
             return;
         }
Index: moodle/lib/tablelib.php
--- moodle/lib/tablelib.php Base (1.68)
+++ moodle/lib/tablelib.php Locally Modified (Based On 1.68)
@@ -1187,7 +1187,7 @@
         $this->wrap_html_start();
         // Start of main data table
 
-        echo html_writer::start_tag('div', array('class'=>'flexible-wrap'));
+        echo html_writer::start_tag('div', array('class'=>'no-overflow'));
         echo '<table'.$this->make_attributes_string($this->attributes).'>';
 
     }
Index: moodle/lib/weblib.php
--- moodle/lib/weblib.php Base (1.1479)
+++ moodle/lib/weblib.php Locally Modified (Based On 1.1479)
@@ -940,6 +940,19 @@
  * This function should mainly be used for long strings like posts,
  * answers, glossary items etc. For short strings @see format_string().
  *
+ * <pre>
+ * Options:
+ *      trusted     :   If true the string won't be cleaned. Default false required noclean=true.
+ *      noclean     :   If true the string won't be cleaned. Default false required trusted=true.
+ *      nocache     :   If true the strign will not be cached and will be formatted every call. Default false.
+ *      filter      :   If true the string will be run through applicable filters as well. Default true.
+ *      para        :   If true then the returned string will be wrapped in div tags. Default true.
+ *      newlines    :   If true then lines newline breaks will be converted to HTML newline breaks. Default true.
+ *      context     :   The context that will be used for filtering.
+ *      overflowdiv :   If set to true the formatted text will be encased in a div
+ *                      with the class no-overflow before being returned. Default false.
+ * </pre>
+ *
  * @todo Finish documenting this function
  *
  * @staticvar array $croncache
@@ -983,6 +996,9 @@
     if (!isset($options['newlines'])) {
         $options['newlines'] = true;
     }
+    if (!isset($options['overflowdiv'])) {
+        $options['overflowdiv'] = false;
+    }
 
     // Calculate best context
     if (empty($CFG->version) or $CFG->version < 2010072800 or during_initial_install()) {
@@ -1092,6 +1108,10 @@
                 'relies on it. Please seek out and destroy that filter code.', DEBUG_DEVELOPER);
     }
 
+    if (!empty($options['overflowdiv'])) {
+        $text = html_writer::tag('div', $text, array('class'=>'no-overflow'));
+    }
+
     if (empty($options['nocache']) and !empty($CFG->cachetext)) {
         if (CLI_SCRIPT) {
             // special static cron cache - no need to store it in db if its not already there
@@ -1367,7 +1387,7 @@
     global $CFG;
     require_once("$CFG->libdir/filelib.php");
     $context = get_context_instance(CONTEXT_MODULE, $cmid);
-    $options = (object)array('noclean'=>true, 'para'=>false, 'filter'=>$filter, 'context'=>$context);
+    $options = array('noclean'=>true, 'para'=>false, 'filter'=>$filter, 'context'=>$context, 'overflowdiv'=>true);
     $intro = file_rewrite_pluginfile_urls($activity->intro, 'pluginfile.php', $context->id, 'mod_'.$module, 'intro', null);
     return trim(format_text($intro, $activity->introformat, $options, null));
 }
Index: moodle/mnet/service/enrol/course.php
--- moodle/mnet/service/enrol/course.php Base (1.4)
+++ moodle/mnet/service/enrol/course.php Locally Modified (Based On 1.4)
@@ -67,6 +67,7 @@
     $options->para    = false;
     $options->filter  = false;
     $options->noclean = false;
+    $options->overflowdiv = true;
     print_collapsible_region_start('remotecourse summary', 'remotecourse-summary', get_string('coursesummary'), false, true);
     echo format_text($course->summary, $course->summaryformat, $options,  $course->id);
     print_collapsible_region_end();
Index: moodle/mod/assignment/styles.css
--- moodle/mod/assignment/styles.css Base (1.5)
+++ moodle/mod/assignment/styles.css Locally Modified (Based On 1.5)
@@ -10,8 +10,6 @@
 .path-mod-assignment .feedback .from {float: left;}
 .path-mod-assignment .files img {margin-right: 4px;}
 .path-mod-assignment .files a {white-space:nowrap;}
-.path-mod-assignment .flexible-wrap {width:100%;overflow:auto;}
-.path-mod-assignment .flexible-wrap > .flexible {margin:0;}
 .path-mod-assignment .late {color: red;}
 
 /** Styles for submissions.php **/
Index: moodle/mod/assignment/type/online/all.php
--- moodle/mod/assignment/type/online/all.php Base (1.16)
+++ moodle/mod/assignment/type/online/all.php Locally Modified (Based On 1.16)
@@ -133,7 +133,7 @@
     //submission part
     echo $OUTPUT->container_start('generalbox submission');
     echo '<div class="submissiondate">'.$view->submissiondate.'</div>';
-    echo "<p>$view->submissiontext</p>\n";
\ No newline at end of file
+    echo "<p class='no-overflow'>$view->submissiontext</p>\n";
\ No newline at end of file
     echo "<p>$view->editlink</p>\n";
     echo $OUTPUT->container_end();
 
Index: moodle/mod/assignment/type/online/assignment.class.php
--- moodle/mod/assignment/type/online/assignment.class.php Base (1.112)
+++ moodle/mod/assignment/type/online/assignment.class.php Locally Modified (Based On 1.112)
@@ -100,7 +100,7 @@
                 echo $OUTPUT->box_start('generalbox boxwidthwide boxaligncenter', 'online');
                 if ($submission && has_capability('mod/assignment:exportownsubmission', $this->context)) {
                     $text = file_rewrite_pluginfile_urls($submission->data1, 'pluginfile.php', $this->context->id, 'mod_assignment', $this->filearea, $submission->id);
-                    echo format_text($text, $submission->data2);
+                    echo format_text($text, $submission->data2, array('overflowdiv'=>true));
                     if ($CFG->enableportfolios) {
                         require_once($CFG->libdir . '/portfoliolib.php');
                         $button = new portfolio_add_button();
@@ -233,7 +233,7 @@
         $wordcount .= '</p>';
 
         $text = file_rewrite_pluginfile_urls($submission->data1, 'pluginfile.php', $this->context->id, 'mod_assignment', $this->filearea, $submission->id);
-        return $wordcount . format_text($text, $submission->data2);
+        return $wordcount . format_text($text, $submission->data2, array('overflowdiv'=>true));
 
 
         }
Index: moodle/mod/assignment/type/online/file.php
--- moodle/mod/assignment/type/online/file.php Base (1.21)
+++ moodle/mod/assignment/type/online/file.php Locally Modified (Based On 1.21)
@@ -60,7 +60,7 @@
     echo $OUTPUT->box_end();
 
     $text = file_rewrite_pluginfile_urls($submission->data1, 'pluginfile.php', $context->id, 'mod_assignment', $assignmentinstance->filearea, $submission->id);
-    echo $OUTPUT->box(format_text($text, $submission->data2), 'generalbox boxaligncenter boxwidthwide');
\ No newline at end of file
+    echo $OUTPUT->box(format_text($text, $submission->data2, array('overflowdiv'=>true)), 'generalbox boxaligncenter boxwidthwide');
\ No newline at end of file
     echo $OUTPUT->close_window_button();
     echo $OUTPUT->footer();
 } else {
Index: moodle/mod/assignment/type/upload/assignment.class.php
--- moodle/mod/assignment/type/upload/assignment.class.php Base (1.136)
+++ moodle/mod/assignment/type/upload/assignment.class.php Locally Modified (Based On 1.136)
@@ -211,7 +211,7 @@
 
         if ($submission = $this->get_submission($USER->id)
           and !empty($submission->data1)) {
-            echo $OUTPUT->box(format_text($submission->data1, FORMAT_HTML), 'generalbox boxaligncenter boxwidthwide');
+            echo $OUTPUT->box(format_text($submission->data1, FORMAT_HTML, array('overflowdiv'=>true)), 'generalbox boxaligncenter boxwidthwide');
         } else {
             echo $OUTPUT->box(get_string('notesempty', 'assignment'), 'generalbox boxaligncenter');
         }
Index: moodle/mod/assignment/type/upload/notes.php
--- moodle/mod/assignment/type/upload/notes.php Base (1.11)
+++ moodle/mod/assignment/type/upload/notes.php Locally Modified (Based On 1.11)
@@ -53,7 +53,7 @@
     $PAGE->set_title(fullname($user,true).': '.$assignment->name);
     echo $OUTPUT->header();
     echo $OUTPUT->heading(get_string('notes', 'assignment').' - '.fullname($user,true));
-    echo $OUTPUT->box(format_text($submission->data1, FORMAT_HTML), 'generalbox boxaligncenter boxwidthwide');
\ No newline at end of file
+    echo $OUTPUT->box(format_text($submission->data1, FORMAT_HTML, array('overflowdiv'=>true)), 'generalbox boxaligncenter boxwidthwide');
\ No newline at end of file
     if ($mode != 'single') {
         echo $OUTPUT->close_window_button();
     } else {
Index: moodle/mod/data/index.php
--- moodle/mod/data/index.php Base (1.42)
+++ moodle/mod/data/index.php Locally Modified (Based On 1.42)
@@ -141,6 +141,6 @@
 }
 
 echo "<br />";
-echo html_writer::table($table);
+echo html_writer::tag('div', html_writer::table($table), array('class'=>'no-overflow'));
 echo $OUTPUT->footer();
 
Index: moodle/mod/feedback/complete.php
--- moodle/mod/feedback/complete.php Base (1.42)
+++ moodle/mod/feedback/complete.php Locally Modified (Based On 1.42)
@@ -315,7 +315,7 @@
         if(isset($savereturn) && $savereturn == 'saved') {
             if($feedback->page_after_submit) {
                 echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
-                echo format_text($feedback->page_after_submit);
+                echo format_text($feedback->page_after_submit, $feedback->page_after_submitformat, array('overflowdiv'=>true));
                 echo $OUTPUT->box_end();
             } else {
                 echo '<p align="center"><b><font color="green">'.get_string('entries_saved','feedback').'</font></b></p>';
Index: moodle/mod/feedback/complete_guest.php
--- moodle/mod/feedback/complete_guest.php Base (1.37)
+++ moodle/mod/feedback/complete_guest.php Locally Modified (Based On 1.37)
@@ -282,7 +282,7 @@
         if(isset($savereturn) && $savereturn == 'saved') {
             if($feedback->page_after_submit) {
                 echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
-                echo format_text($feedback->page_after_submit);
+                echo format_text($feedback->page_after_submit, $feedback->page_after_submitformat, array('overflowdiv'=>true));
                 echo $OUTPUT->box_end();
             } else {
                 echo '<p align="center"><b><font color="green">'.get_string('entries_saved','feedback').'</font></b></p>';
Index: moodle/mod/feedback/item/label/lib.php
--- moodle/mod/feedback/item/label/lib.php Base (1.22)
+++ moodle/mod/feedback/item/label/lib.php Locally Modified (Based On 1.22)
@@ -129,7 +129,7 @@
         $item->presentationtrust = 1;
 
         $output = file_rewrite_pluginfile_urls($item->presentation, 'pluginfile.php', $context->id, 'mod_feedback', $filearea, $item->id);
-        echo format_text($output, FORMAT_HTML);
+        echo format_text($output, FORMAT_HTML, array('overflowdiv'=>true));
     }
 
     /**
Index: moodle/mod/feedback/view.php
--- moodle/mod/feedback/view.php Base (1.39)
+++ moodle/mod/feedback/view.php Locally Modified (Based On 1.39)
@@ -168,7 +168,7 @@
 if(has_capability('mod/feedback:edititems', $context)) {
     echo $OUTPUT->heading(get_string("page_after_submit", "feedback"), 4);
     echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
-    echo format_text($feedback->page_after_submit);
+    echo format_text($feedback->page_after_submit, $feedback->page_after_submitformat, array('overflowdiv'=>true));
     echo $OUTPUT->box_end();
 }
 
Index: moodle/mod/forum/lib.php
--- moodle/mod/forum/lib.php Base (1.913)
+++ moodle/mod/forum/lib.php Locally Modified (Based On 1.913)
@@ -3121,13 +3121,11 @@
  * @return void
  */
 function forum_print_post($post, $discussion, $forum, &$cm, $course, $ownpost=false, $reply=false, $link=false,
-                          $footer="", $highlight="", $post_read=null, $dummyifcantsee=true, $istracked=null) {
-
+                          $footer="", $highlight="", $postisread=null, $dummyifcantsee=true, $istracked=null, $return=false) {
     global $USER, $CFG, $OUTPUT;
 
-    static $stredit, $strdelete, $strreply, $strparent, $strprune;
-    static $strpruneheading, $displaymode;
-    static $strmarkread, $strmarkunread;
+    // String cache
+    static $str;
 
     $modcontext = get_context_instance(CONTEXT_MODULE, $cm->id);
 
@@ -3137,7 +3135,7 @@
 
     // caching
     if (!isset($cm->cache)) {
-        $cm->cache = new stdClass();
+        $cm->cache = new stdClass;
     }
 
     if (!isset($cm->cache->caps)) {
@@ -3157,103 +3155,72 @@
         $cm->uservisible = coursemodule_visible_for_user($cm);
     }
 
+    if ($istracked && is_null($postisread)) {
+        $postisread = forum_tp_is_post_read($USER->id, $post);
+    }
+
     if (!forum_user_can_see_post($forum, $discussion, $post, NULL, $cm)) {
+        $output = '';
         if (!$dummyifcantsee) {
+            if ($return) {
+                return $output;
+            }
+            echo $output;
             return;
         }
-        echo '<a id="p'.$post->id.'"></a>';
-        echo '<table cellspacing="0" class="forumpost">';
-        echo '<tr class="header"><td class="picture left">';
-        //        print_user_picture($post->userid, $courseid, $post->picture);
-        echo '</td>';
+        $output .= html_writer::tag('a', '', array('id'=>'p'.$post->id));
+        $output .= html_writer::start_tag('div', array('class'=>'forumpost clearfix '.$forumpostclass));
+        $output .= html_writer::start_tag('div', array('class'=>'row header'));
+        $output .= html_writer::tag('div', '', array('class'=>'left picture')); // Picture
         if ($post->parent) {
-            echo '<td class="topic">';
+            $output .= html_writer::start_tag('div', array('class'=>'topic'));
         } else {
-            echo '<td class="topic starter">';
+            $output .= html_writer::start_tag('div', array('class'=>'topic starter'));
         }
-        echo '<div class="subject">'.get_string('forumsubjecthidden','forum').'</div>';
-        echo '<div class="author">';
-        print_string('forumauthorhidden','forum');
-        echo '</div></td></tr>';
+        $output .= html_writer::tag('div', get_string('forumsubjecthidden','forum'), array('class'=>'subject')); // Subject
+        $output .= html_writer::tag('div', get_string('forumauthorhidden','forum'), array('class'=>'author')); // author
+        $output .= html_writer::end_tag('div'); // row
+        $output .= html_writer::start_tag('div', array('class'=>'row'));
+        $output .= html_writer::tag('div', '&nbsp;', array('class'=>'left side')); // Groups
+        $output .= html_writer::tag('div', get_string('forumbodyhidden','forum'), array('class'=>'content')); // Content
+        $output .= html_writer::end_tag('div'); // row
+        $output .= html_writer::end_tag('div'); // forumpost
 
-        echo '<tr><td class="left side">';
-        echo '&nbsp;';
-
-        // Actual content
-
-        echo '</td><td class="content">'."\n";
-        echo get_string('forumbodyhidden','forum');
-        echo '</td></tr></table>';
+        if ($return) {
+            return $output;
+        }
+        echo $output;
         return;
     }
 
-    if (empty($stredit)) {
-        $stredit         = get_string('edit', 'forum');
-        $strdelete       = get_string('delete', 'forum');
-        $strreply        = get_string('reply', 'forum');
-        $strparent       = get_string('parent', 'forum');
-        $strpruneheading = get_string('pruneheading', 'forum');
-        $strprune        = get_string('prune', 'forum');
-        $displaymode     = get_user_preferences('forum_displaymode', $CFG->forum_displaymode);
-        $strmarkread     = get_string('markread', 'forum');
-        $strmarkunread   = get_string('markunread', 'forum');
-
+    if (empty($str)) {
+        $str = new stdClass;
+        $str->edit         = get_string('edit', 'forum');
+        $str->delete       = get_string('delete', 'forum');
+        $str->reply        = get_string('reply', 'forum');
+        $str->parent       = get_string('parent', 'forum');
+        $str->pruneheading = get_string('pruneheading', 'forum');
+        $str->prune        = get_string('prune', 'forum');
+        $str->displaymode     = get_user_preferences('forum_displaymode', $CFG->forum_displaymode);
+        $str->markread     = get_string('markread', 'forum');
+        $str->markunread   = get_string('markunread', 'forum');
     }
 
-    $read_style = '';
-    // ignore trackign status if not tracked or tracked param missing
-    if ($istracked) {
-        if (is_null($post_read)) {
-            debugging('fetching post_read info');
-            $post_read = forum_tp_is_post_read($USER->id, $post);
-        }
+    $discussionlink = new moodle_url('/mod/forum/discuss.php', array('d'=>$post->discussion));
 
-        if ($post_read) {
-            $read_style = ' read';
-        } else {
-            $read_style = ' unread';
-            echo '<a name="unread"></a>';
-        }
-    }
-
-    echo '<a id="p'.$post->id.'"></a>';
-    echo '<table cellspacing="0" class="forumpost'.$read_style.'">';
-
-    // Picture
-    $postuser = new stdClass();
+    // Build an object that represents the posting user
+    $postuser = new stdClass;
     $postuser->id        = $post->userid;
     $postuser->firstname = $post->firstname;
     $postuser->lastname  = $post->lastname;
     $postuser->imagealt  = $post->imagealt;
     $postuser->picture   = $post->picture;
     $postuser->email     = $post->email;
+    // Some handy things for later on
+    $postuser->fullname    = fullname($postuser, $cm->cache->caps['moodle/site:viewfullnames']);
+    $postuser->profilelink = new moodle_url('/user/view.php', array('id'=>$post->userid, 'course'=>$course->id));
 
-    echo '<tr class="header"><td class="picture left">';
-    echo $OUTPUT->user_picture($postuser, array('courseid'=>$course->id));
-    echo '</td>';
-
-    if ($post->parent) {
-        echo '<td class="topic">';
-    } else {
-        echo '<td class="topic starter">';
-    }
-
-    if (!empty($post->subjectnoformat)) {
-        echo '<div class="subject">'.$post->subject.'</div>';
-    } else {
-        echo '<div class="subject">'.format_string($post->subject).'</div>';
-    }
-
-    echo '<div class="author">';
-    $fullname = fullname($postuser, $cm->cache->caps['moodle/site:viewfullnames']);
-    $by = new stdClass();
-    $by->name = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.
-                $post->userid.'&amp;course='.$course->id.'">'.$fullname.'</a>';
-    $by->date = userdate($post->modified);
-    print_string('bynameondate', 'forum', $by);
-    echo '</div></td></tr>';
-
-    echo '<tr><td class="left side">';
+    // Prepare the groups the posting user belongs to
     if (isset($cm->cache->usersgroups)) {
         $groups = array();
         if (isset($cm->cache->usersgroups[$post->userid])) {
@@ -3265,117 +3232,67 @@
         $groups = groups_get_all_groups($course->id, $post->userid, $cm->groupingid);
     }
 
-    if ($groups) {
-        print_group_picture($groups, $course->id, false, false, true);
-    } else {
-        echo '&nbsp;';
-    }
-
-// Actual content
-
-    echo '</td><td class="content">'."\n";
-
+    // Prepare the attachements for the post, files then images
     list($attachments, $attachedimages) = forum_print_attachments($post, $cm, 'separateimages');
 
-    if ($attachments !== '') {
-        echo '<div class="attachments">';
-        echo $attachments;
-        echo '</div>';
-    }
+    // Determine if we need to shorten this post
+    $shortenpost = ($link && (strlen(strip_tags($post->message)) > $CFG->forum_longpost));
 
-    $options = new stdClass();
-    $options->para    = false;
-    $options->trusted = $post->messagetrust;
-    $options->context = $modcontext;
-    if ($link and (strlen(strip_tags($post->message)) > $CFG->forum_longpost)) {
-        // Print shortened version
-        echo format_text(forum_shorten_post($post->message), $post->messageformat, $options, $course->id);
-        $numwords = count_words(strip_tags($post->message));
-        echo '<div class="posting shortenedpost"><a href="'.$CFG->wwwroot.'/mod/forum/discuss.php?d='.$post->discussion.'">';
-        echo get_string('readtherest', 'forum');
-        echo '</a> ('.get_string('numwords', '', $numwords).')...</div>';
-    } else {
-        // Print whole message
-        echo '<div class="posting fullpost">';
-        if ($highlight) {
-            echo highlight($highlight, format_text($post->message, $post->messageformat, $options, $course->id));
-        } else {
-            echo format_text($post->message, $post->messageformat, $options, $course->id);
-        }
-        echo '</div>';
-        echo $attachedimages;
-    }
 
-
-// Commands
-
+    // Prepare an array of commands
     $commands = array();
 
-    if ($istracked) {
         // SPECIAL CASE: The front page can display a news item post to non-logged in users.
         // Don't display the mark read / unread controls in this case.
-        if ($CFG->forum_usermarksread and isloggedin()) {
-            if ($post_read) {
-                $mcmd = '&amp;mark=unread&amp;postid='.$post->id;
-                $mtxt = $strmarkunread;
-            } else {
-                $mcmd = '&amp;mark=read&amp;postid='.$post->id;
-                $mtxt = $strmarkread;
+    if ($istracked && $CFG->forum_usermarksread && isloggedin()) {
+        $url = new moodle_url($discussionlink, array('postid'=>$post->id, 'mark'=>'unread'));
+        $text = $str->markunread;
+        if (!$postisread) {
+            $url->param('mark', 'read');
+            $text = $str->markread;
             }
-            if ($displaymode == FORUM_MODE_THREADED) {
-                $commands[] = '<a href="'.$CFG->wwwroot.'/mod/forum/discuss.php?d='.
-                              $post->discussion.'&amp;parent='.$post->id.$mcmd.'">'.$mtxt.'</a>';
+        if ($str->displaymode == FORUM_MODE_THREADED) {
+            $url->param('parent', $post->parent);
             } else {
-                $commands[] = '<a href="'.$CFG->wwwroot.'/mod/forum/discuss.php?d='.
-                              $post->discussion.$mcmd.'#p'.$post->id.'">'.$mtxt.'</a>';
+            $url->set_anchor('p'.$post->id);
             }
+        $commands[] = array('url'=>$url, 'text'=>$text);
         }
-    }
 
-    if ($post->parent) {  // Zoom in to the parent specifically
-        if ($displaymode == FORUM_MODE_THREADED) {
-            $commands[] = '<a href="'.$CFG->wwwroot.'/mod/forum/discuss.php?d='.
-                      $post->discussion.'&amp;parent='.$post->parent.'">'.$strparent.'</a>';
+    // Zoom in to the parent specifically
+    if ($post->parent) {  
+        $url = new moodle_url($discussionlink);
+        if ($str->displaymode == FORUM_MODE_THREADED) {
+            $url->param('parent', $post->parent);
         } else {
-            $commands[] = '<a href="'.$CFG->wwwroot.'/mod/forum/discuss.php?d='.
-                      $post->discussion.'#p'.$post->parent.'">'.$strparent.'</a>';
+            $url->set_anchor('p'.$post->id);
         }
+        $commands[] = array('url'=>$url, 'text'=>$str->parent);
     }
 
-    $age = time() - $post->created;
     // Hack for allow to edit news posts those are not displayed yet until they are displayed
-    if (!$post->parent and $forum->type == 'news' and $discussion->timestart > time()) {
+    $age = time() - $post->created;
+    if (!$post->parent && $forum->type == 'news' && $discussion->timestart > time()) {
         $age = 0;
     }
-    $editanypost = $cm->cache->caps['mod/forum:editanypost'];
-
-    if ($ownpost or $editanypost) {
-        if (($age < $CFG->maxeditingtime) or $editanypost) {
-            $commands[] =  '<a href="'.$CFG->wwwroot.'/mod/forum/post.php?edit='.$post->id.'">'.$stredit.'</a>';
+    if (($ownpost && $age < $CFG->maxeditingtime) || $cm->cache->caps['mod/forum:editanypost']) {
+        $commands[] = array('url'=>new moodle_url('/mod/forum/post.php', array('edit'=>$post->id)), 'text'=>$str->edit);
         }
-    }
 
-    if ($cm->cache->caps['mod/forum:splitdiscussions']
-                && $post->parent && $forum->type != 'single') {
-
-        $commands[] = '<a href="'.$CFG->wwwroot.'/mod/forum/post.php?prune='.$post->id.
-                      '" title="'.$strpruneheading.'">'.$strprune.'</a>';
+    if ($cm->cache->caps['mod/forum:splitdiscussions'] && $post->parent && $forum->type != 'single') {
+        $commands[] = array('url'=>new moodle_url('/mod/forum/post.php', array('prune'=>$post->id)), 'text'=>$str->prune, 'title'=>$str->pruneheading);
     }
 
-    if (($ownpost and $age < $CFG->maxeditingtime
-                and $cm->cache->caps['mod/forum:deleteownpost'])
-                or $cm->cache->caps['mod/forum:deleteanypost']) {
-        $commands[] = '<a href="'.$CFG->wwwroot.'/mod/forum/post.php?delete='.$post->id.'">'.$strdelete.'</a>';
+    if (($ownpost && $age < $CFG->maxeditingtime && $cm->cache->caps['mod/forum:deleteownpost']) || $cm->cache->caps['mod/forum:deleteanypost']) {
+        $commands[] = array('url'=>new moodle_url('/mod/forum/post.php', array('delete'=>$post->id)), 'text'=>$str->delete);
     }
 
     if ($reply) {
-        $commands[] = '<a href="'.$CFG->wwwroot.'/mod/forum/post.php?reply='.$post->id.'">'.$strreply.'</a>';
+        $commands[] = array('url'=>new moodle_url('/mod/forum/post.php', array('reply'=>$post->id)), 'text'=>$str->reply);
     }
 
     if ($cm->cache->caps['mod/forum:exportpost'] || ($ownpost && $cm->cache->caps['mod/forum:exportownpost'])) {
-        $p = array(
-            'postid' => $post->id,
-        );
+        $p = array('postid' => $post->id);
         require_once($CFG->libdir.'/portfoliolib.php');
         $button = new portfolio_add_button();
         $button->set_callback_options('forum_portfolio_caller', array('postid' => $post->id), '/mod/forum/locallib.php');
@@ -3390,40 +3307,152 @@
             $commands[] = $porfoliohtml;
         }
     }
+    // Finished building commands
 
-    echo '<div class="commands">';
-    echo implode(' | ', $commands);
-    echo '</div>';
 
+    // Begin output
 
-// Ratings
+    if ($istracked) {
+        if ($postisread) {
+            $forumpostclass = 'read';
+        } else {
+            $forumpostclass = ' unread';
+            $output .= html_writer::tag('a', '', array('name'=>'unread'));
+        }
+    } else {
+        // ignore trackign status if not tracked or tracked param missing
+        $forumpostclass = '';
+    }
+
+    $topicclass = '';
+    if (empty($post->parent)) {
+        $topicclass = ' firstpost starter';
+    }
+
+    $output  = '';
+    $output .= html_writer::tag('a', '', array('id'=>'p'.$post->id));
+    $output .= html_writer::start_tag('div', array('class'=>'forumpost clearfix '.$forumpostclass.$topicclass));
+    $output .= html_writer::start_tag('div', array('class'=>'row header clearfix'));
+    $output .= html_writer::start_tag('div', array('class'=>'left picture'));
+    $output .= $OUTPUT->user_picture($postuser, array('courseid'=>$course->id));
+    $output .= html_writer::end_tag('div');
+
+    
+    $output .= html_writer::start_tag('div', array('class'=>'topic'.$topicclass));
+
+    $postsubject = $post->subject;
+    if (empty($post->subjectnoformat)) {
+        $postsubject = format_string($postsubject);
+    }
+    $output .= html_writer::tag('div', $postsubject, array('class'=>'subject'));
+    
+    $by = new stdClass();
+    $by->name = html_writer::link($postuser->profilelink, $postuser->fullname);
+    $by->date = userdate($post->modified);
+    $output .= html_writer::tag('div', get_string('bynameondate', 'forum', $by), array('class'=>'author'));
+
+    $output .= html_writer::end_tag('div'); //topic
+    $output .= html_writer::end_tag('div'); //row
+
+    $output .= html_writer::start_tag('div', array('class'=>'row maincontent clearfix'));
+    $output .= html_writer::start_tag('div', array('class'=>'left'));
+
+    $groupoutput = '';
+    if ($groups) {
+        $groupoutput = print_group_picture($groups, $course->id, false, true, true);
+    }
+    if (empty($groupoutput)) {
+        $groupoutput = '&nbsp;';
+    }
+    $output .= html_writer::tag('div', $groupoutput, array('class'=>'grouppictures'));
+
+    $output .= html_writer::end_tag('div'); //left side
+    $output .= html_writer::start_tag('div', array('class'=>'no-overflow'));
+    $output .= html_writer::start_tag('div', array('class'=>'content'));
+    if (!empty($attachments)) {
+        $output .= html_writer::tag('div', $attachments, array('class'=>'attachments'));
+    }
+
+    $options = new stdClass;
+    $options->para    = false;
+    $options->trusted = $post->messagetrust;
+    $options->context = $modcontext;
+    if ($shortenpost) {
+        // Prepare shortened version
+        $postclass    = 'shortenedpost';
+        $postcontent  = format_text(forum_shorten_post($post->message), $post->messageformat, $options, $course->id);
+        $postcontent .= html_writer::link($discussionlink, get_string('readtherest', 'forum'));
+        $postcontent .= html_writer::tag('span', '('.get_string('numwords', 'moodle', count_words(strip_tags($post->message))).')...', array('class'=>'post-word-count'));
+    } else {
+        // Prepare whole post
+        $postclass    = 'fullpost';
+        $postcontent  = format_text($post->message, $post->messageformat, $options, $course->id);
+        if (!empty($highlight)) {
+            $postcontent = highlight($highlight, $postcontent);
+        }
+        $postcontent .= html_writer::tag('div', $attachedimages, array('class'=>'attachedimages'));
+    }
+    // Output the post content
+    $output .= html_writer::tag('div', $postcontent, array('class'=>'posting '.$postclass));
+    $output .= html_writer::end_tag('div'); // Content
+    $output .= html_writer::end_tag('div'); // Content mask
+    $output .= html_writer::end_tag('div'); // Row
+
+    $output .= html_writer::start_tag('div', array('class'=>'row side'));
+    $output .= html_writer::tag('div','&nbsp;', array('class'=>'left'));
+    $output .= html_writer::start_tag('div', array('class'=>'options clearfix'));
+
+    // Output ratings
     if (!empty($post->rating)) {
-        echo html_writer::tag('div', $OUTPUT->render($post->rating), array('class'=>'forum-post-rating'));
+        $output .= html_writer::tag('div', $OUTPUT->render($post->rating), array('class'=>'forum-post-rating'));
     }
 
-// Link to post if required
+    // Output the commands
+    $commandhtml = array();
+    foreach ($commands as $command) {
+        if (is_array($command)) {
+            $commandhtml[] = html_writer::link($command['url'], $command['text']);
+        } else {
+            $commandhtml[] = $command;
+        }
+    }
+    $output .= html_writer::tag('div', implode(' | ', $commandhtml), array('class'=>'commands'));
 
+    // Output link to post if required
     if ($link) {
-        echo '<div class="link">';
         if ($post->replies == 1) {
             $replystring = get_string('repliesone', 'forum', $post->replies);
         } else {
             $replystring = get_string('repliesmany', 'forum', $post->replies);
         }
-        echo '<a href="'.$CFG->wwwroot.'/mod/forum/discuss.php?d='.$post->discussion.'">'.
-             get_string('discussthistopic', 'forum').'</a>&nbsp;('.$replystring.')';
-        echo '</div>';
+
+        $output .= html_writer::start_tag('div', array('class'=>'link'));
+        $output .= html_writer::link($discussionlink, get_string('discussthistopic', 'forum'));
+        $output .= '&nbsp;('.$replystring.')';
+        $output .= html_writer::end_tag('div'); // link
     }
 
+    // Output footer if required
     if ($footer) {
-        echo '<div class="footer">'.$footer.'</div>';
+        $output .= html_writer::tag('div', $footer, array('class'=>'footer'));
     }
-    echo '</td></tr></table>'."\n\n";
 
-    if ($istracked && !$CFG->forum_usermarksread && !$post_read) {
+    // Close remaining open divs
+    $output .= html_writer::end_tag('div'); // content
+    $output .= html_writer::end_tag('div'); // row
+    $output .= html_writer::end_tag('div'); // forumpost
+
+    // Mark the forum post as read if required
+    if ($istracked && !$CFG->forum_usermarksread && !$postisread) {
         forum_tp_mark_post_read($USER->id, $post, $forum->id);
     }
+
+    if ($return) {
+        return $output;
 }
+    echo $output;
+    return;
+}
 
 /**
  * Return rating related permissions
Index: moodle/mod/forum/styles.css
--- moodle/mod/forum/styles.css Base (1.3)
+++ moodle/mod/forum/styles.css Locally Modified (Based On 1.3)
@@ -1,14 +1,54 @@
-/** General Styles **/
-.forumpost {border-width:1px;border-style:solid;border-collapse:separate;margin-top: 10px;}
-.forumpost .topic {padding: 4px;border-style:solid;border-width: 0px;border-bottom-width: 1px;}
-.forumpost .commands,
-.forumpost .ratings,
-.forumpost .attachments,
-.forumpost .footer,
-.forumpost .link,
+/**
+ * Structure of a forum post
+ * div.forumpost(.read.unread)
+ *     div.header.row
+ *         div.picture.left
+ *         div.topic(.starter)
+ *             div.subject
+ *             div.author
+ *     div.row
+ *         div.side.left
+ *         div.content-mask
+ *             div.content
+ *                 div.attachments
+ *                 div.posting(.shortenedpost|.fullpost)
+ *                     // message
+ *                 div.attachedimages
+ *                     // attachedimages
+ *     div.row
+ *         div.left
+ *         div.options
+ *             div.commands
+ *             div.forum-post-rating
+ *             div.link
+ *             div.footer
+ */
+
+.forumpost {display: block;position:relative;margin:0 0 1em 0;padding:0;border:1px solid #000;max-width:100%;}
+.forumpost .row {width:100%;position:relative;}
+.forumpost .row .left {float:left;width: 43px;overflow:hidden;}
+.forumpost .row .left .grouppictures a {text-align:center;display:block;margin:6px 2px 0 2px;}
+.forumpost .row .left .grouppicture {width:20px;height:20px;}
+.forumpost .row .topic,
+.forumpost .row .content-mask,
+.forumpost .row .options {margin-left:43px;}
+.forumpost .picture img {margin:4px;}
+.forumpost .options .commands,
+.forumpost .content .attachments,
+.forumpost .options .footer,
+.forumpost .options .link {text-align:right;}
+.forumpost .options .forum-post-rating {float:left;}
+.forumpost .content .posting {overflow:auto;max-width:100%;}
+.forumpost .content .attachedimages img {max-width:100%;}
+
+.dir-rtl .forumpost .row .topic,
+.dir-rtl .forumpost .row .content-mask,
+.dir-rtl .forumpost .row .options {margin-right:43px;margin-left:0;}
+.dir-rtl .forumpost .row .left {float:right;}
+.dir-rtl.path-mod-forum .indent {margin-right:30px;margin-left:0;}
+
 .path-mod-forum .forumolddiscuss,
 #page-mod-forum-search .c0 {text-align:right;}
-.forumpost .left {width: 35px;vertical-align: top;}
 .path-mod-forum .indent {margin-left: 30px;}
 .path-mod-forum .forumheaderlist {width: 100%;border-width:1px;border-style:solid;border-collapse:separate;margin-top: 10px;}
 .path-mod-forum .forumheaderlist td {border-width:1px 0px 0px 1px;border-style:solid;}
@@ -39,7 +79,6 @@
 #page-mod-forum-view .groupmenu {float: left;text-align:left;white-space: nowrap;}
 #page-mod-forum-index .subscription,
 #page-mod-forum-view .subscription {float: right;text-align:right;white-space: nowrap;margin: 5px 0;}
-#page-mod-forum-view.forumtype-blog  table.forumpost {width:100%;}
 
 /** Styles for search.php */
 #page-mod-forum-search .introcontent {padding: 15px;font-weight:bold;}
@@ -48,6 +87,4 @@
 #page-mod-forum-view .unread img {margin-left: 5px;}
 
 /** Unknown Styles ??? */
-#user-view .forumpost,
-.course .forumpost {width: 100%;}
 #email .unsubscribelink {margin-top:20px;}
Index: moodle/mod/glossary/lib.php
--- moodle/mod/glossary/lib.php Base (1.333)
+++ moodle/mod/glossary/lib.php Locally Modified (Based On 1.333)
@@ -846,6 +846,7 @@
     $options->para = false;
     $options->trusted = $entry->definitiontrust;
     $options->context = $context; 
+    $options->overflowdiv = true;
     $definition = format_text($definition, $entry->definitionformat, $options);
     echo ($definition);
     echo '<br /><br />';
@@ -873,22 +874,19 @@
 
 /**
  *
- * @global object
- * @global array
+ * @global moodle_database DB
  * @param object $entry
  * @param object $glossary
  * @param object $cm
  */
 function glossary_print_entry_definition($entry, $glossary, $cm) {
-    global $DB;
+    global $DB, $GLOSSARY_EXCLUDECONCEPTS;
 
     $definition = $entry->definition;
 
-    global $GLOSSARY_EXCLUDECONCEPTS;
-
     //Calculate all the strings to be no-linked
     //First, the concept
-    $GLOSSARY_EXCLUDECONCEPTS=array($entry->concept);
+    $GLOSSARY_EXCLUDECONCEPTS = array($entry->concept);
     //Now the aliases
     if ( $aliases = $DB->get_records('glossary_alias', array('entryid'=>$entry->id))) {
         foreach ($aliases as $alias) {
@@ -903,6 +901,7 @@
     $options->para = false;
     $options->trusted = $entry->definitiontrust;
     $options->context = $context; 
+    $options->overflowdiv = true;
     $text = format_text($definition, $entry->definitionformat, $options);
 
     // Stop excluding concepts from autolinking
Index: moodle/mod/glossary/locallib.php
--- moodle/mod/glossary/locallib.php Base (1.10)
+++ moodle/mod/glossary/locallib.php Locally Modified (Based On 1.10)
@@ -391,6 +391,7 @@
 
         $entry->definition = portfolio_rewrite_pluginfile_urls($entry->definition, $context->id, 'mod_glossary', 'entry', $entry->id, $format);
 
+        $options->overflowdiv = true;
         $output .= format_text($entry->definition, $entry->definitionformat, $options);
         if (isset($entry->footer)) {
             $output .= $entry->footer;
Index: moodle/mod/lesson/locallib.php
--- moodle/mod/lesson/locallib.php Base (1.130)
+++ moodle/mod/lesson/locallib.php Locally Modified (Based On 1.130)
@@ -2020,6 +2020,7 @@
                     $options = new stdClass;
                     $options->noclean = true;
                     $options->para = true;
+                    $options->overflowdiv = true;
                     $result->feedback = $OUTPUT->box(format_text($this->get_contents(), $this->properties->contentsformat, $options), 'generalbox boxaligncenter');
                     $result->feedback .= '<div class="correctanswer generalbox"><em>'.get_string("youranswer", "lesson").'</em> : '.$result->studentanswer; // already in clean html
                     $result->feedback .= $OUTPUT->box($result->response, $class); // already conerted to HTML
Index: moodle/mod/lesson/pagetypes/multichoice.php
--- moodle/mod/lesson/pagetypes/multichoice.php Base (1.22)
+++ moodle/mod/lesson/pagetypes/multichoice.php Locally Modified (Based On 1.22)
@@ -361,6 +361,7 @@
         $answers = $this->get_used_answers();
         $formattextdefoptions = new stdClass;
         $formattextdefoptions->para = false;  //I'll use it widely in this page
+
         foreach ($answers as $answer) {
             if ($this->properties->qoption) {
                 if ($useranswer == NULL) {
Index: moodle/mod/lesson/report.php
--- moodle/mod/lesson/report.php Base (1.75)
+++ moodle/mod/lesson/report.php Locally Modified (Based On 1.75)
@@ -384,6 +384,7 @@
 
     $formattextdefoptions = new stdClass;
     $formattextdefoptions->para = false;  //I'll use it widely in this page
+    $formattextdefoptions->overflowdiv = true;
 
     $userid = optional_param('userid', NULL, PARAM_INT); // if empty, then will display the general detailed view
     $try    = optional_param('try', NULL, PARAM_INT);
@@ -442,6 +443,7 @@
 
         $options = new stdClass;
         $options->noclean = true;
+        $options->overflowdiv = true;
         $answerpage->contents = format_text($page->contents, $page->contentsformat, $options);
 
         $answerpage->qtype = $qtypes[$page->qtype].$page->option_description_string();
Index: moodle/mod/page/view.php
--- moodle/mod/page/view.php Base (1.12)
+++ moodle/mod/page/view.php Locally Modified (Based On 1.12)
@@ -91,7 +91,7 @@
 }
 
 $content = file_rewrite_pluginfile_urls($page->content, 'pluginfile.php', $context->id, 'mod_page', 'content', $page->revision);
-$formatoptions = (object)array('noclean'=>true);
+$formatoptions = array('noclean'=>true, 'overflowdiv'=>true);
 $content = format_text($content, $page->contentformat, $formatoptions, $course->id);
 echo $OUTPUT->box($content, "generalbox center clearfix");
 
Index: moodle/mod/quiz/report.php
--- moodle/mod/quiz/report.php Base (1.56)
+++ moodle/mod/quiz/report.php Locally Modified (Based On 1.56)
@@ -44,6 +44,7 @@
 
     require_login($course, false, $cm);
     $context = get_context_instance(CONTEXT_MODULE, $cm->id);
+    $PAGE->set_pagelayout('report');
 
     $reportlist = quiz_report_list($context);
     if (count($reportlist)==0){
Index: moodle/mod/quiz/report/overview/report.php
--- moodle/mod/quiz/report/overview/report.php Base (1.188)
+++ moodle/mod/quiz/report/overview/report.php Locally Modified (Based On 1.188)
@@ -402,14 +402,14 @@
                      $imageurl = "{$CFG->wwwroot}/mod/quiz/report/overview/overviewgraph.php?id={$quiz->id}&amp;groupid=$currentgroup";
                      $graphname = get_string('overviewreportgraphgroup', 'quiz_overview', groups_get_group_name($currentgroup));
                      echo $OUTPUT->heading($graphname);
-                     echo '<div class="graph flexible-wrap"><img src="'.$imageurl.'" alt="'.$graphname.'" /></div>';
+                     echo '<div class="graph"><img src="'.$imageurl.'" alt="'.$graphname.'" /></div>';
                 }
             }
             if ($DB->record_exists('quiz_grades', array('quiz'=> $quiz->id))) {
                  $graphname = get_string('overviewreportgraph', 'quiz_overview');
                  $imageurl = $CFG->wwwroot.'/mod/quiz/report/overview/overviewgraph.php?id='.$quiz->id;
                  echo $OUTPUT->heading($graphname);
-                 echo '<div class="graph flexible-wrap"><img src="'.$imageurl.'" alt="'.$graphname.'" /></div>';
+                 echo '<div class="graph"><img src="'.$imageurl.'" alt="'.$graphname.'" /></div>';
             }
         }
         return true;
Index: moodle/mod/quiz/report/statistics/report.php
--- moodle/mod/quiz/report/statistics/report.php Base (1.55)
+++ moodle/mod/quiz/report/statistics/report.php Locally Modified (Based On 1.55)
@@ -230,7 +230,7 @@
             echo $OUTPUT->heading(get_string('questioninformation', 'quiz_statistics'));
             echo html_writer::table($questioninfotable);
 
-            echo $OUTPUT->box(format_text($question->questiontext, $question->questiontextformat).$actions, 'boxaligncenter generalbox boxwidthnormal mdl-align');
+            echo $OUTPUT->box(format_text($question->questiontext, $question->questiontextformat, array('overflowdiv'=>true)).$actions, 'boxaligncenter generalbox boxwidthnormal mdl-align');
 
             echo $OUTPUT->heading(get_string('questionstatistics', 'quiz_statistics'));
             echo html_writer::table($questionstatstable);
@@ -356,7 +356,7 @@
         $quizinformationtable = new html_table();
         $quizinformationtable->align = array('center', 'center');
         $quizinformationtable->width = '60%';
-        $quizinformationtable->class = 'generaltable titlesleft';
+        $quizinformationtable->attributes['class'] = 'generaltable titlesleft boxaligncenter';
         $quizinformationtable->data = array();
         $quizinformationtable->data[] = array(get_string('quizname', 'quiz_statistics'), $quiz->name);
         $quizinformationtable->data[] = array(get_string('coursename', 'quiz_statistics'), $course->fullname);
Index: moodle/mod/quiz/styles.css
--- moodle/mod/quiz/styles.css Base (1.10)
+++ moodle/mod/quiz/styles.css Locally Modified (Based On 1.10)
@@ -1,4 +1,3 @@
-.path-mod-quiz #tablecontainer .flexible-wrap {overflow:auto;}
\ No newline at end of file
 .path-mod-quiz .graph.flexible-wrap {text-align:center;overflow:auto;}
 
 #page-mod-quiz-comment #manualgradingform,
Index: moodle/mod/wiki/edit.php
--- moodle/mod/wiki/edit.php Base (1.5)
+++ moodle/mod/wiki/edit.php Locally Modified (Based On 1.5)
@@ -45,6 +45,10 @@
 $attachments = optional_param('attachments', 0, PARAM_INT);
 $deleteuploads = optional_param('deleteuploads', 0, PARAM_RAW);
 
+if (is_array($newcontent)) {
+    $newcontent = $newcontent['text'];
+}
+
 if (!$page = wiki_get_page($pageid)) {
     print_error('incorrectpageid', 'wiki');
 }
Index: moodle/mod/wiki/locallib.php
--- moodle/mod/wiki/locallib.php Base (1.20)
+++ moodle/mod/wiki/locallib.php Locally Modified (Based On 1.20)
@@ -1190,7 +1190,7 @@
         }
     }
     $html = file_rewrite_pluginfile_urls($page->cachedcontent, 'pluginfile.php', $context->id, 'mod_wiki', 'attachments', $subwikiid);
-    $html = format_text($html);
+    $html = format_text($html, FORMAT_MOODLE, array('overflowdiv'=>true));
     echo $OUTPUT->box($html);
 
     if (!empty($CFG->usetags)) {
Index: moodle/mod/wiki/pagelib.php
--- moodle/mod/wiki/pagelib.php Base (1.20)
+++ moodle/mod/wiki/pagelib.php Locally Modified (Based On 1.20)
@@ -694,7 +694,7 @@
                 $t->data[] = $row3;
             }
 
-            echo html_writer::table($t);
+            echo html_writer::tag('div', html_writer::table($t), array('class'=>'no-overflow'));
 
         }
     }
@@ -1035,7 +1035,7 @@
             $parseroutput = wiki_parse_content($data->contentformat, $data->newcontent_editor['text'], $options);
             $this->set_newcontent($data->newcontent_editor['text']);
             echo $OUTPUT->notification(get_string('previewwarning', 'wiki'), 'notifyproblem wiki_info');
-            $content = format_text($parseroutput['parsed_text'], FORMAT_HTML);
+            $content = format_text($parseroutput['parsed_text'], FORMAT_HTML, array('overflowdiv'=>true));
             echo $OUTPUT->box($content, 'generalbox wiki_previewbox');
             $content = $this->newcontent;
         }
@@ -2080,7 +2080,7 @@
             print_container($heading, false, 'mdl-align wiki_modifieduser wiki_headingtime');
             $options = array('swid' => $this->subwiki->id, 'pretty_print' => true, 'pageid' => $this->page->id);
             $parseroutput = wiki_parse_content($pageversion->contentformat, $pageversion->content, $options);
-            $content = print_container(format_text($parseroutput['parsed_text'], FORMAT_HTML), false, '', '', true);
+            $content = print_container(format_text($parseroutput['parsed_text'], FORMAT_HTML, array('overflowdiv'=>true)), false, '', '', true);
             echo $OUTPUT->box($content, 'generalbox wiki_contentbox');
 
         } else {
Index: moodle/mod/wiki/renderer.php
--- moodle/mod/wiki/renderer.php Base (1.8)
+++ moodle/mod/wiki/renderer.php Locally Modified (Based On 1.8)
@@ -67,6 +67,7 @@
             $table->colclasses = array('wikisearchresults');
             $html .= html_writer::table($table);
         }
+        $html = html_writer::tag('div', $html, array('class'=>'no-overflow'));
         return $this->output->container($html);
     }
 
Index: moodle/mod/workshop/assessment.php
--- moodle/mod/workshop/assessment.php Base (1.35)
+++ moodle/mod/workshop/assessment.php Locally Modified (Based On 1.35)
@@ -178,7 +178,7 @@
     $instructions = file_rewrite_pluginfile_urls($workshop->instructreviewers, 'pluginfile.php', $PAGE->context->id,
         'mod_workshop', 'instructreviewers', 0, workshop::instruction_editors_options($PAGE->context));
     print_collapsible_region_start('', 'workshop-viewlet-instructreviewers', get_string('instructreviewers', 'workshop'));
-    echo $output->box(format_text($instructions, $workshop->instructreviewersformat), array('generalbox', 'instructions'));
+    echo $output->box(format_text($instructions, $workshop->instructreviewersformat, array('overflowdiv'=>true)), array('generalbox', 'instructions'));
     print_collapsible_region_end();
 }
 
Index: moodle/mod/workshop/exassessment.php
--- moodle/mod/workshop/exassessment.php Base (1.10)
+++ moodle/mod/workshop/exassessment.php Locally Modified (Based On 1.10)
@@ -115,7 +115,7 @@
     $instructions = file_rewrite_pluginfile_urls($workshop->instructreviewers, 'pluginfile.php', $PAGE->context->id,
         'mod_workshop', 'instructreviewers', 0, workshop::instruction_editors_options($PAGE->context));
     print_collapsible_region_start('', 'workshop-viewlet-instructreviewers', get_string('instructreviewers', 'workshop'));
-    echo $output->box(format_text($instructions, $workshop->instructreviewersformat), array('generalbox', 'instructions'));
+    echo $output->box(format_text($instructions, $workshop->instructreviewersformat, array('overflowdiv'=>true)), array('generalbox', 'instructions'));
     print_collapsible_region_end();
 }
 
Index: moodle/mod/workshop/exsubmission.php
--- moodle/mod/workshop/exsubmission.php Base (1.18)
+++ moodle/mod/workshop/exsubmission.php Locally Modified (Based On 1.18)
@@ -179,7 +179,7 @@
     $instructions = file_rewrite_pluginfile_urls($workshop->instructauthors, 'pluginfile.php', $PAGE->context->id,
         'mod_workshop', 'instructauthors', 0, workshop::instruction_editors_options($PAGE->context));
     print_collapsible_region_start('', 'workshop-viewlet-instructauthors', get_string('instructauthors', 'workshop'));
-    echo $output->box(format_text($instructions, $workshop->instructauthorsformat), array('generalbox', 'instructions'));
+    echo $output->box(format_text($instructions, $workshop->instructauthorsformat, array('overflowdiv'=>true)), array('generalbox', 'instructions'));
     print_collapsible_region_end();
 }
 
Index: moodle/mod/workshop/renderer.php
--- moodle/mod/workshop/renderer.php Base (1.66)
+++ moodle/mod/workshop/renderer.php Locally Modified (Based On 1.66)
@@ -124,7 +124,7 @@
 
         $o .= $this->output->container_end(); // end of header
 
-        $content = format_text($submission->content, $submission->contentformat);
+        $content = format_text($submission->content, $submission->contentformat, array('overflowdiv'=>true));
         $content = file_rewrite_pluginfile_urls($content, 'pluginfile.php', $this->page->context->id,
                                                         'mod_workshop', 'submission_content', $submission->id);
         $o .= $this->output->container($content, 'content');
@@ -215,7 +215,7 @@
         $o .= $this->output->heading(format_string($example->title), 3, 'title');
         $o .= $this->output->container_end(); // end of header
 
-        $content = format_text($example->content, $example->contentformat);
+        $content = format_text($example->content, $example->contentformat, array('overflowdiv'=>true));
         $content = file_rewrite_pluginfile_urls($content, 'pluginfile.php', $this->page->context->id,
                                                         'mod_workshop', 'submission_content', $example->id);
         $o .= $this->output->container($content, 'content');
Index: moodle/mod/workshop/submission.php
--- moodle/mod/workshop/submission.php Base (1.51)
+++ moodle/mod/workshop/submission.php Locally Modified (Based On 1.51)
@@ -223,7 +223,7 @@
     $instructions = file_rewrite_pluginfile_urls($workshop->instructauthors, 'pluginfile.php', $PAGE->context->id,
         'mod_workshop', 'instructauthors', 0, workshop::instruction_editors_options($PAGE->context));
     print_collapsible_region_start('', 'workshop-viewlet-instructauthors', get_string('instructauthors', 'workshop'));
-    echo $output->box(format_text($instructions, $workshop->instructauthorsformat), array('generalbox', 'instructions'));
+    echo $output->box(format_text($instructions, $workshop->instructauthorsformat, array('overflowdiv'=>true)), array('generalbox', 'instructions'));
     print_collapsible_region_end();
 }
 
Index: moodle/mod/workshop/view.php
--- moodle/mod/workshop/view.php Base (1.151)
+++ moodle/mod/workshop/view.php Locally Modified (Based On 1.151)
@@ -100,7 +100,7 @@
         $instructions = file_rewrite_pluginfile_urls($workshop->instructauthors, 'pluginfile.php', $PAGE->context->id,
             'mod_workshop', 'instructauthors', 0, workshop::instruction_editors_options($PAGE->context));
         print_collapsible_region_start('', 'workshop-viewlet-instructauthors', get_string('instructauthors', 'workshop'));
-        echo $output->box(format_text($instructions, $workshop->instructauthorsformat), array('generalbox', 'instructions'));
+        echo $output->box(format_text($instructions, $workshop->instructauthorsformat, array('overflowdiv'=>true)), array('generalbox', 'instructions'));
         print_collapsible_region_end();
     }
 
@@ -241,7 +241,7 @@
         $instructions = file_rewrite_pluginfile_urls($workshop->instructreviewers, 'pluginfile.php', $PAGE->context->id,
             'mod_workshop', 'instructreviewers', 0, workshop::instruction_editors_options($PAGE->context));
         print_collapsible_region_start('', 'workshop-viewlet-instructreviewers', get_string('instructreviewers', 'workshop'));
-        echo $output->box(format_text($instructions, $workshop->instructreviewersformat), array('generalbox', 'instructions'));
+        echo $output->box(format_text($instructions, $workshop->instructreviewersformat, array('overflowdiv'=>true)), array('generalbox', 'instructions'));
         print_collapsible_region_end();
     }
 
Index: moodle/notes/lib.php
--- moodle/notes/lib.php Base (1.16)
+++ moodle/notes/lib.php Locally Modified (Based On 1.16)
@@ -196,7 +196,7 @@
     // print note content
     if ($detail & NOTES_SHOW_BODY) {
         echo '<div class="content">';
-        echo format_text($note->content, $note->format);
+        echo format_text($note->content, $note->format, array('overflowdiv'=>true));
         echo '</div>';
     }
 
Index: moodle/question/editlib.php
--- moodle/question/editlib.php Base (1.175)
+++ moodle/question/editlib.php Locally Modified (Based On 1.175)
@@ -1159,6 +1159,7 @@
     protected function print_category_info($category) {
         $formatoptions = new stdClass;
         $formatoptions->noclean = true;
+        $formatoptions->overflowdiv = true;
         echo '<div class="boxaligncenter">';
         echo format_text($category->info, FORMAT_MOODLE, $formatoptions, $this->course->id);
         echo "</div>\n";
Index: moodle/tag/locallib.php
--- moodle/tag/locallib.php Base (1.34)
+++ moodle/tag/locallib.php Locally Modified (Based On 1.34)
@@ -116,6 +116,7 @@
     if (!empty($tag_object->description)) {
         $options = new stdClass();
         $options->para = false;
+        $options->overflowdiv = true;
         $tag_object->description = file_rewrite_pluginfile_urls($tag_object->description, 'pluginfile.php', get_context_instance(CONTEXT_SYSTEM)->id, 'tag', 'description', $tag_object->id);
         $output .= format_text($tag_object->description, $tag_object->descriptionformat, $options);
     }
Index: moodle/theme/anomaly/config.php
--- moodle/theme/anomaly/config.php Base (1.16)
+++ moodle/theme/anomaly/config.php Locally Modified (Based On 1.16)
@@ -121,6 +121,11 @@
         'regions' => array(),
         'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
     ),
+    'report' => array(
+        'file' => 'report.php',
+        'regions' => array('side-pre'),
+        'defaultregion' => 'side-pre'
+    ),
\ No newline at end of file
 );
 
 $THEME->rendererfactory = 'theme_overridden_renderer_factory';
Index: moodle/theme/anomaly/layout/report.php
--- moodle/theme/anomaly/layout/report.php No Base Revision
+++ moodle/theme/anomaly/layout/report.php Locally New
@@ -0,0 +1,80 @@
+<?php
+
+$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);
+$showsidepre = $hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT);
+
+
+$bodyclasses = array();
+if (!$showsidepre) {
+    $bodyclasses[] = 'content-only';
+}
+
+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">
+<?php if ($hasheading || $hasnavbar) { ?>
+    <div id="page-header">
+        <?php if ($hasheading) { ?>
+        <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
+        <div class="headermenu"><?php
+            echo $OUTPUT->login_info();
+            if (!empty($PAGE->layout_options['langmenu'])) {
+                echo $OUTPUT->lang_menu();
+            }
+            echo $PAGE->headingmenu
+        ?></div><?php } ?>
+        <?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 } ?>
+    </div>
+<?php } ?>
+<!-- END OF HEADER -->
+
+    <div id="page-content" class="clearfix">
+        <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>
+
+<!-- START OF FOOTER -->
+    <?php if ($hasfooter) { ?>
+    <div id="page-footer" class="clearfix">
+        <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
+        <?php
+        echo $OUTPUT->login_info();
+        echo $OUTPUT->home_link();
+        echo $OUTPUT->standard_footer_html();
+        ?>
+        <div class="rounded-corner bottom-left"></div>
+        <div class="rounded-corner bottom-right"></div>
+    </div>
+    <?php } ?>
+</div>
+<?php echo $OUTPUT->standard_end_of_body_html() ?>
+</body>
+</html>
\ No newline at end of file
Index: moodle/theme/arialist/config.php
--- moodle/theme/arialist/config.php Base (1.5)
+++ moodle/theme/arialist/config.php Locally Modified (Based On 1.5)
@@ -167,6 +167,11 @@
         'regions' => array(),
         'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>false, 'nocustommenu'=>true),
     ),
+    'report' => array(
+        'file' => 'report.php',
+        'regions' => array('side-post'),
+        'defaultregion' => 'side-post',
+    ),
\ No newline at end of file
 );
 
 ///////////////////////////////////////////////////////////////
Index: moodle/theme/arialist/layout/report.php
--- moodle/theme/arialist/layout/report.php No Base Revision
+++ moodle/theme/arialist/layout/report.php Locally New
@@ -0,0 +1,119 @@
+<?php
+
+$hasheading = ($PAGE->heading);
+$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
+$hasfooter = (empty($PAGE->layout_options['nofooter']));
+$hassidepost = $PAGE->blocks->region_has_content('side-post', $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 ($showsidepost) {
+    $bodyclasses[] = 'side-post-only';
+} else if (!$showsidepost) {
+    $bodyclasses[] = 'content-only';
+}
+if ($hascustommenu) {
+    $bodyclasses[] = 'has-custom-menu';
+}
+
+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() ?>
+
+<?php if ($hascustommenu) { ?>
+<div id="custommenu"><?php echo $custommenu; ?></div>
+<?php } ?>
+
+<div id="page">
+
+    <?php if ($hasheading || $hasnavbar) { ?>
+       <div id="wrapper" class="clearfix">
+
+<!-- START OF HEADER -->
+
+            <div id="page-header" class="inside">
+                <div id="page-header-wrapper" class="wrapper clearfix">
+                    <?php if ($hasheading) { ?>
+                        <div id="header-left">
+                            <h1 class="headermain inside"><?php echo $PAGE->heading ?></h1>
+                        </div>
+                        <div class="headermenu"><?php
+                            echo $OUTPUT->login_info();
+                                if (!empty($PAGE->layout_options['langmenu'])) {
+                                    echo $OUTPUT->lang_menu();
+                                }
+                            echo $PAGE->headingmenu ?>
+                        </div>
+                    <?php } ?>
+                </div>
+            </div>
+            <?php if ($hasnavbar) { ?>
+                <div class="navbar">
+                    <div class="wrapper clearfix">
+                        <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
+                        <div class="navbutton"> <?php echo $PAGE->button; ?></div>
+                    </div>
+                </div>
+            <?php } ?>
+
+<!-- END OF HEADER -->
+
+    <?php } ?>
+
+
+<!-- START OF CONTENT -->
+
+            <div id="page-content-wrapper" class="wrapper clearfix">
+                <div id="page-content" class="clearfix">
+                    <div id="report-main-content">
+                        <div class="region-content">
+                            <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
+                        </div>
+                    </div>
+                    <?php if ($hassidepost) { ?>
+                    <div id="report-region-wrap">
+                        <div id="report-region-pre" class="block-region">
+                            <div class="region-content">
+                                <?php echo $OUTPUT->blocks_for_region('side-post') ?>
+                            </div>
+                        </div>
+                    </div>
+                    <?php } ?>
+                </div>
+            </div>
+
+        </div>
+
+<!-- END OF CONTENT -->
+
+    <?php if ($hasheading || $hasnavbar) { ?>
+        </div>
+    <?php } ?>
+
+<!-- START OF FOOTER -->
+
+        <?php if ($hasfooter) { ?>
+            <div id="page-footer" class="wrapper">
+                <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
+                <?php
+                    echo $OUTPUT->login_info();
+                    echo $OUTPUT->home_link();
+                    echo $OUTPUT->standard_footer_html();
+                ?>
+            </div>
+        <?php } ?>
+
+</div>
+<?php echo $OUTPUT->standard_end_of_body_html() ?>
+</body>
+</html>
\ No newline at end of file
Index: moodle/theme/arialist/style/core.css
--- moodle/theme/arialist/style/core.css Base (1.2)
+++ moodle/theme/arialist/style/core.css Locally Modified (Based On 1.2)
@@ -168,7 +168,7 @@
 .forumpost .topic {
     background: #eee;
     border-width: 0;
-    padding: 0 10px 0;
+    padding: 4px 10px 4px;
 }
 
 .forumpost .subject {
@@ -180,10 +180,14 @@
     font-style: italic;
 }
 
-.forumpost .content {
+.forumpost .no-overflow {
     border-width: 0 1px 10px;
     border-style: solid;
     border-color: #aaa #eee #eee;
+    margin: 0 1px 1px 1px;
+}
+
+.forumpost .content .posting {
\ No newline at end of file
     padding: 5px 10px 10px;
 }
 
Index: moodle/theme/arialist/style/pagelayout.css
--- moodle/theme/arialist/style/pagelayout.css Base (1.1)
+++ moodle/theme/arialist/style/pagelayout.css Locally Modified (Based On 1.1)
@@ -38,33 +38,33 @@
 	right: 100%;
 }
 
-#page-content #region-main-box #region-post-box {
+#page-content #region-post-box {
 	float: left;
 	width: 100%;
 }
 
-#page-content #region-main-box #region-post-box #region-main-wrap {
+#page-content #region-main-wrap {
 	float: left;
 	width: 50%;
 }
 
-#page-content #region-main-box #region-post-box #region-main-wrap #region-main {
+#page-content #region-main {
 	overflow: hidden;
 	position: relative;
 	left: 100%;
 }
 
-#page-content #region-main-box #region-post-box #region-post {
+#page-content #region-post {
 	float: right;
 	position: relative;
 }
 
-#page-content #region-main-box #region-post-box #region-main-wrap #region-main .region-content {
+#page-content #region-main .region-content {
 	overflow: hidden;
 	padding: 20px 30px 20px 0;
 }
 
-#page-content #region-main-box #region-post-box #region-post .region-content {
+#page-content #region-post .region-content {
 	overflow: hidden;
 	padding: 20px 0 20px 10px;
 }
@@ -76,28 +76,54 @@
 }
 
 
-.has_dock.side-post-only .page-middle #region-main-box #region-post-box #region-main-wrap #region-main {
+.has_dock.side-post-only .page-middle #region-main {
 	margin-left: 200px;
 }
 
 /** No blocks whatsoever **/
-
 .content-only #page-content #region-main-box {
 	margin-left: 0px;
 }
 
-.content-only #page-content #region-main-box #region-post-box {
+.content-only #page-content #region-post-box {
 	margin-left: 0px;
 }
 
-.content-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main {
+.content-only #page-content #region-main {
 	margin-left: 0px;
 }
 
-.content-only #page-content #region-main-box #region-post-box #region-pre {
+.content-only #page-content #region-pre {
 	width: 0px;
 }
 
-.content-only #page-content #region-main-box #region-post-box #region-post {
+.content-only #page-content #region-post {
 	width: 0px;
 }
+
+/** Report layout **/
+.pagelayout-report #page {width:auto;position:relative;overflow:visible;}
+.pagelayout-report #page-header {float:none;}
+.pagelayout-report #page-content {float:none;overflow:visible;width:auto;}
+.pagelayout-report #report-main-content {float:left;width:100%;}
+.pagelayout-report #report-main-content .region-content {margin-left:210px;margin-top:20px;}
+.pagelayout-report #report-main-content .region-content table {background-color:#FFF;}
+.pagelayout-report #report-region-wrap {width:0;float:right;position:relative;left:-100%;}
+.pagelayout-report #report-region-pre {width:200px;margin-top:20px;}
+.pagelayout-report #page-footer {float:none;}
+.pagelayout-report #page-content .region-content {overflow:visible;}
+.pagelayout-report.content-only #report-main-content .region-content {margin-left:0;}
+
+/** Correct for right to left languages **/
+.dir-rtl.pagelayout-report #report-main-content .region-content {margin-left:0;margin-right:200px;}
+.dir-rtl.pagelayout-report #report-region-wrap {left:0;}
+
+/** Stabalise IE6 behaviour on the report layout **/
+.ie6.pagelayout-report #report-main-content,
+.ie7.pagelayout-report #report-main-content {float:none;width:auto;}
+.ie6.pagelayout-report #report-region-wrap,
+.ie7.pagelayout-report #report-region-wrap {float:none;width:200px;left:auto;position:absolute;top:0;}
+.ie6.pagelayout-report #report-region-pre,
+.ie6.pagelayout-report #report-region-pre .block
+.ie7.pagelayout-report #report-region-pre,
+.ie7.pagelayout-report #report-region-pre .block {width:100%;}
\ No newline at end of file
Index: moodle/theme/base/config.php
--- moodle/theme/base/config.php Base (1.19)
+++ moodle/theme/base/config.php Locally Modified (Based On 1.19)
@@ -152,6 +152,12 @@
         'regions' => array(),
         'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true),
     ),
+    // The pagelayout used for reports
+    'report' => array(
+        'file' => 'report.php',
+        'regions' => array('side-pre'),
+        'defaultregion' => 'side-pre',
+    ),
 );
 
 // We don't want the base theme to be shown on the theme selection screen, by setting
Index: moodle/theme/base/layout/report.php
--- moodle/theme/base/layout/report.php No Base Revision
+++ moodle/theme/base/layout/report.php Locally New
@@ -0,0 +1,89 @@
+<?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));
+$haslogininfo = (empty($PAGE->layout_options['nologininfo']));
+
+$showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
+
+$custommenu = $OUTPUT->custom_menu();
+$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
+
+$bodyclasses = array();
+if (!$showsidepre) {
+    $bodyclasses[] = 'content-only';
+}
+if ($hascustommenu) {
+    $bodyclasses[] = 'has_custom_menu';
+}
+
+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">
+<?php if ($hasheading || $hasnavbar) { ?>
+    <div id="page-header">
+        <?php if ($hasheading) { ?>
+        <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
+        <div class="headermenu"><?php
+            if ($haslogininfo) {
+                echo $OUTPUT->login_info();
+            }
+            if (!empty($PAGE->layout_options['langmenu'])) {
+                echo $OUTPUT->lang_menu();
+            }
+            echo $PAGE->headingmenu
+        ?></div><?php } ?>
+        <?php if ($hascustommenu) { ?>
+        <div id="custommenu"><?php echo $custommenu; ?></div>
+        <?php } ?>
+        <?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 } ?>
+    </div>
+<?php } ?>
+<!-- END OF HEADER -->
+
+    <div id="page-content" class="clearfix">
+        <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>
+
+<!-- START OF FOOTER -->
+    <?php if ($hasfooter) { ?>
+    <div id="page-footer" class="clearfix">
+        <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
+        <?php
+        echo $OUTPUT->login_info();
+        echo $OUTPUT->home_link();
+        echo $OUTPUT->standard_footer_html();
+        ?>
+    </div>
+    <?php } ?>
+</div>
+<?php echo $OUTPUT->standard_end_of_body_html() ?>
+</body>
+</html>
\ No newline at end of file
Index: moodle/theme/base/style/core.css
--- moodle/theme/base/style/core.css Base (1.70)
+++ moodle/theme/base/style/core.css Locally Modified (Based On 1.70)
@@ -98,6 +98,11 @@
 form.popupform div {display: inline;}
 .arrow_button input {overflow:hidden;}
 
+.no-overflow {overflow:auto;}
+.pagelayout-report .no-overflow {overflow:visible;}
+.no-overflow > .generaltable {margin-bottom:0;}
+.ie6 .no-overflow {width:100%;}
+
 /** IE6 float + background bug solution **/
 .ie6 li.section {line-height:1.2em;width:100%;}
 
@@ -649,10 +654,12 @@
 
 .restore-course-search .rcs-results {width:70%;min-width:400px;border:1px solid #ddd;margin:5px 0;}
 .restore-course-search .rcs-results table {width:100%;margin:0;border-width:0;}
+.restore-course-search .rcs-results table .no-overflow {max-width:600px;}
 .restore-course-search .rcs-results .paging {text-align:left;margin:0;background-color:#eee;padding:3px;}
 
 .restore-course-category .rcs-results {width:70%;min-width:400px;border:1px solid #ddd;margin:5px 0;}
 .restore-course-category .rcs-results table {width:100%;margin:0;border-width:0;}
+.restore-course-category .rcs-results table .no-overflow {max-width:600px;}
 .restore-course-category .rcs-results .paging {text-align:left;margin:0;background-color:#eee;padding:3px;}
 
 .corelightbox {background-color:#CCC;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;}
Index: moodle/theme/base/style/pagelayout.css
--- moodle/theme/base/style/pagelayout.css Base (1.8)
+++ moodle/theme/base/style/pagelayout.css Locally Modified (Based On 1.8)
@@ -32,37 +32,62 @@
 #page-header {float:left;width:100%;}
 #page-content {clear:both;float:left;overflow:hidden;position:relative;width:100%;min-width:900px;}
 #page-content #region-main-box {float:left;left:200px;position:relative;width:200%;}
-#page-content #region-main-box #region-post-box {float:left;left:50%;margin-left:-400px;position:relative;width:100%;}
-#page-content #region-main-box #region-post-box #region-main-wrap {float:right;position:relative;right:100%;width:50%;}
-#page-content #region-main-box #region-post-box #region-main-wrap #region-main {margin-right:0px;margin-left:400px;overflow:hidden;}
-#page-content #region-main-box #region-post-box #region-pre {float:left;left:200px;overflow:hidden;position:relative;width:200px;margin-left:-50%;}
-#page-content #region-main-box #region-post-box #region-post {float:left;left:0px;overflow:hidden;position:relative;width:200px;}
-#page-content #region-main-box .region-content {overflow:hidden;padding:10px;}
+#page-content #region-post-box {float:left;left:50%;margin-left:-400px;position:relative;width:100%;}
+#page-content #region-main-wrap {float:right;position:relative;right:100%;width:50%;}
+#page-content #region-main {margin-right:0px;margin-left:400px;overflow:hidden;}
+#page-content #region-pre {float:left;left:200px;overflow:hidden;position:relative;width:200px;margin-left:-50%;}
+#page-content #region-post {float:left;left:0px;overflow:hidden;position:relative;width:200px;}
+#page-content .region-content {overflow:hidden;padding:10px;}
 #page-footer {clear:both;float:left;width:100%;}
 
 /** Only side pre **/
-.side-pre-only #page-content #region-main-box #region-post-box {margin-left:-200px;}
-.side-pre-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main {margin-left:200px;}
-.side-pre-only #page-content #region-main-box #region-post-box #region-pre {left:0px;}
-.side-pre-only #page-content #region-main-box #region-post-box #region-post {width:0px;}
+.side-pre-only #page-content #region-post-box {margin-left:-200px;}
+.side-pre-only #page-content #region-main {margin-left:200px;}
+.side-pre-only #page-content #region-pre {left:0px;}
+.side-pre-only #page-content #region-post {width:0px;}
 
 /** Only side post **/
 .side-post-only #page-content #region-main-box {left:0px;}
-.side-post-only #page-content #region-main-box #region-post-box {margin-left:-200px;}
-.side-post-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main {margin-left:200px;}
-.side-post-only #page-content #region-main-box #region-post-box #region-pre {width:0px;}
-.has_dock.side-post-only .page-middle #region-main-box #region-post-box #region-main-wrap #region-main {margin-left:200px;}
+.side-post-only #page-content #region-post-box {margin-left:-200px;}
+.side-post-only #page-content #region-main {margin-left:200px;}
+.side-post-only #page-content #region-pre {width:0px;}
+.has_dock.side-post-only .page-middle #region-main {margin-left:200px;}
 
 /** No blocks whatsoever **/
 .content-only #page-content {min-width:0;}
 .content-only #page-content #region-main-box {left:0px;}
-.content-only #page-content #region-main-box #region-post-box {margin-left:0px;}
-.content-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main {margin-left:0px;}
-.content-only #page-content #region-main-box #region-post-box #region-pre {left:0;width:0px;}
-.content-only #page-content #region-main-box #region-post-box #region-post {width:0;}
+.content-only #page-content #region-post-box {margin-left:0px;}
+.content-only #page-content #region-main {margin-left:0px;}
+.content-only #page-content #region-pre {left:0;width:0px;}
+.content-only #page-content #region-post {width:0;}
 
 /** Stabalise some IE6 behaviour **/
 .ie6 #region-pre .region-content,
 .ie6 #region-post .region-content {padding:0 !important;width:100%;float:none;}
 .ie6 #region-pre .region-content .block,
 .ie6 #region-post .region-content .block {width:auto;padding:0;margin:10px;}
+
+/** Report layout **/
+.pagelayout-report #page {width:auto;position:relative;}
+.pagelayout-report #page-header {float:none;}
+.pagelayout-report #page-content {float:none;overflow:visible;width:auto;}
+.pagelayout-report #report-main-content {float:left;width:100%;}
+.pagelayout-report #report-main-content .region-content {margin-left:200px;}
+.pagelayout-report #report-main-content .region-content table {background-color:#FFF;}
+.pagelayout-report #report-region-wrap {width:0;float:right;position:relative;left:-100%;}
+.pagelayout-report #report-region-pre {width:200px;}
+.pagelayout-report #page-footer {float:none;}
+.pagelayout-report #page-content .region-content {overflow:visible;}
+
+/** Correct for content only **/
+.pagelayout-report.content-only #report-main-content .region-content {margin-left:0;}
+
+/** Correct for right to left languages **/
+.dir-rtl.pagelayout-report #report-main-content .region-content {margin-left:0;margin-right:200px;}
+.dir-rtl.pagelayout-report #report-region-wrap {left:0;}
+
+/** Stabalise IE6 behaviour on the report layout **/
+.ie6.pagelayout-report #report-main-content {float:none;width:auto;}
+.ie6.pagelayout-report #report-region-wrap {float:none;width:200px;left:auto;position:absolute;top:0;}
+.ie6.pagelayout-report #report-region-pre,
+.ie6.pagelayout-report #report-region-pre .block {width:100%;}
Index: moodle/theme/binarius/config.php
--- moodle/theme/binarius/config.php Base (1.6)
+++ moodle/theme/binarius/config.php Locally Modified (Based On 1.6)
@@ -166,6 +166,11 @@
         'regions' => array(),
         'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>false, 'nocustommenu'=>true),
     ),
+    'report' => array(
+        'file' => 'report.php',
+        'regions' => array('side-post'),
+        'defaultregion' => 'side-post',
+    ),
\ No newline at end of file
 );
 
 ///////////////////////////////////////////////////////////////
Index: moodle/theme/binarius/layout/report.php
--- moodle/theme/binarius/layout/report.php No Base Revision
+++ moodle/theme/binarius/layout/report.php Locally New
@@ -0,0 +1,118 @@
+<?php
+
+$hasheading = ($PAGE->heading);
+$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
+$hasfooter = (empty($PAGE->layout_options['nofooter']));
+$hassidepost = $PAGE->blocks->region_has_content('side-post', $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 ($showsidepost) {
+    $bodyclasses[] = 'side-post-only';
+} else if (!$showsidepost) {
+    $bodyclasses[] = 'content-only';
+}
+
+if ($hascustommenu) {
+    $bodyclasses[] = 'has-custom-menu';
+}
+
+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">
+
+    <?php if ($hasheading || $hasnavbar) { ?>
+           <div id="wrapper" class="clearfix">
+
+<!-- START OF HEADER -->
+
+            <div id="page-header" class="inside">
+                <div id="page-header-wrapper" class="wrapper clearfix">
+
+                    <?php if ($hasheading) { ?>
+                        <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
+                        <div class="headermenu"><?php
+                            echo $OUTPUT->login_info();
+                                if (!empty($PAGE->layout_options['langmenu'])) {
+                                    echo $OUTPUT->lang_menu();
+                                }
+                            echo $PAGE->headingmenu ?>
+                        </div>
+                    <?php } ?>
+                    <?php if ($hascustommenu) { ?>
+                    <div id="custommenu"><?php echo $custommenu; ?></div>
+                    <?php } ?>
+                </div>
+            </div>
+
+            <?php if ($hasnavbar) { ?>
+                <div class="navbar">
+                    <div class="wrapper clearfix">
+                        <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
+                        <div class="navbutton"> <?php echo $PAGE->button; ?></div>
+                    </div>
+                </div>
+            <?php } ?>
+
+<!-- END OF HEADER -->
+
+    <?php } ?>
+
+
+<!-- START OF CONTENT -->
+
+        <div id="page-content-wrapper" class="wrapper clearfix">
+            <div id="page-content" class="clearfix">
+                <div id="report-main-content">
+                    <div class="region-content">
+                        <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
+                    </div>
+                </div>
+                <?php if ($hassidepost) { ?>
+                <div id="report-region-wrap">
+                    <div id="report-region-pre" class="block-region">
+                        <div class="region-content">
+                            <?php echo $OUTPUT->blocks_for_region('side-post') ?>
+                        </div>
+                    </div>
+                </div>
+                <?php } ?>
+            </div>
+        </div>
+
+<!-- END OF CONTENT -->
+
+    <?php if ($hasheading || $hasnavbar) { ?>
+    <div class="myclear"></div>
+        </div>
+    <?php } ?>
+
+<!-- START OF FOOTER -->
+
+        <?php if ($hasfooter) { ?>
+            <div id="page-footer" class="wrapper">
+                <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
+                <?php
+                    echo $OUTPUT->login_info();
+                    echo $OUTPUT->home_link();
+                    echo $OUTPUT->standard_footer_html();
+                ?>
+            </div>
+        <?php } ?>
+
+</div>
+<?php echo $OUTPUT->standard_end_of_body_html() ?>
+</body>
+</html>
\ No newline at end of file
Index: moodle/theme/binarius/style/pagelayout.css
--- moodle/theme/binarius/style/pagelayout.css Base (1.1)
+++ moodle/theme/binarius/style/pagelayout.css Locally Modified (Based On 1.1)
@@ -113,3 +113,32 @@
 .content-only #page-content #region-main-box #region-post-box #region-post {
 	width: 0px;
 }
+
+
+/** Report layout **/
+.pagelayout-report {border-top:1px solid #555555;}
+.pagelayout-report #page {width:auto;position:relative;overflow:visible;}
+.pagelayout-report #page-header {float:none;}
+.pagelayout-report #page-content {float:none;overflow:visible;width:auto;}
+.pagelayout-report #report-main-content {float:left;width:100%;}
+.pagelayout-report #report-main-content .region-content {margin-left:210px;margin-top:20px;}
+.pagelayout-report #report-main-content .region-content table {background-color:#FFF;}
+.pagelayout-report #report-region-wrap {width:0;float:right;position:relative;left:-100%;}
+.pagelayout-report #report-region-pre {width:200px;margin-top:20px;}
+.pagelayout-report #page-footer {float:none;}
+.pagelayout-report #page-content .region-content {overflow:visible;}
+.pagelayout-report.content-only #report-main-content .region-content {margin-left:0;}
+
+/** Correct for right to left languages **/
+.dir-rtl.pagelayout-report #report-main-content .region-content {margin-left:0;margin-right:200px;}
+.dir-rtl.pagelayout-report #report-region-wrap {left:0;}
+
+/** Stabalise IE6 behaviour on the report layout **/
+.ie6.pagelayout-report #report-main-content,
+.ie7.pagelayout-report #report-main-content {float:none;width:auto;}
+.ie6.pagelayout-report #report-region-wrap,
+.ie7.pagelayout-report #report-region-wrap {float:none;width:200px;left:auto;position:absolute;top:0;}
+.ie6.pagelayout-report #report-region-pre,
+.ie6.pagelayout-report #report-region-pre .block
+.ie7.pagelayout-report #report-region-pre,
+.ie7.pagelayout-report #report-region-pre .block {width:100%;}
\ No newline at end of file
Index: moodle/theme/boxxie/style/core.css
--- moodle/theme/boxxie/style/core.css Base (1.10)
+++ moodle/theme/boxxie/style/core.css Locally Modified (Based On 1.10)
@@ -645,15 +645,14 @@
     text-decoration: none;
 }
 
-.forumpost .content {
-    border-width: 1px ;
-    border-color: #a0c278;
-    border-style: solid;
-    padding: 5px 10px;
+.forumpost .no-overflow,
+.forumpost .options {
+    border: 1px solid #a0c278;
 }
 
-.forumpost .commands {
-    padding: 10px 0;
\ No newline at end of file
+.forumpost .options,
+.forumpost .content .posting {
+    padding: 5px 10px;
\ No newline at end of file
 }
 
 .forumaddnew,
Index: moodle/theme/brick/config.php
--- moodle/theme/brick/config.php Base (1.2)
+++ moodle/theme/brick/config.php Locally Modified (Based On 1.2)
@@ -58,7 +58,6 @@
 	'core',
 	'colors',
 	'css3',
-	
 );
 
 ////////////////////////////////////////////////////
@@ -163,6 +162,11 @@
         'regions' => array(),
         'options' => array('nofooter'=>true, 'nonavbar'=>true),
     ),
+    'report' => array(
+        'file' => 'general.php',
+        'regions' => array('side-post'),
+        'defaultregion' => 'side-post',
+    ),
     
 );
 
@@ -203,14 +207,14 @@
 // As above but will be included in the page footer.
 ////////////////////////////////////////////////////
 
-//$THEME->larrow	= '&lang;';
+//$THEME->larrow    = '&lang;';
 
 ////////////////////////////////////////////////////
 // Overrides the left arrow image used throughout 
 // Moodle
 ////////////////////////////////////////////////////
 
-//$THEME->rarrow	= '&rang;';
+//$THEME->rarrow    = '&rang;';
 
 ////////////////////////////////////////////////////
 // Overrides the right arrow image used throughout Moodle
Index: moodle/theme/brick/style/core.css
--- moodle/theme/brick/style/core.css Base (1.2)
+++ moodle/theme/brick/style/core.css Locally Modified (Based On 1.2)
@@ -362,10 +362,15 @@
 	border: 1px solid #dadada;
 }
 
-.forumpost .content {
+.forumpost .options,
+.forumpost .no-overflow {
 	border-width: 0 1px 1px;
 	border-style: solid;
 	border-color: #aaa #dadada #dadada;
+}
+
+.forumpost .options,
+.forumpost .content .posting {
\ No newline at end of file
 	padding: 5px 10px 10px;
 }
 
Index: moodle/theme/brick/style/pagelayout.css
--- moodle/theme/brick/style/pagelayout.css Base (1.1)
+++ moodle/theme/brick/style/pagelayout.css Locally Modified (Based On 1.1)
@@ -38,33 +38,33 @@
 	right: 100%;
 }
 
-#page-content #region-main-box #region-post-box {
+#page-content #region-post-box {
 	float: left;
 	width: 100%;
 }
 
-#page-content #region-main-box #region-post-box #region-main-wrap {
+#page-content #region-main-wrap {
 	float: left;
 	width: 50%;
 }
 
-#page-content #region-main-box #region-post-box #region-main-wrap #region-main {
+#page-content #region-main {
 	overflow: hidden;
 	position: relative;
 	left: 100%;
 }
 
-#page-content #region-main-box #region-post-box #region-post {
+#page-content #region-post {
 	float: right;
 	position: relative;
 }
 
-#page-content #region-main-box #region-post-box #region-main-wrap #region-main .region-content {
+#page-content #region-main .region-content {
 	overflow: hidden;
 	padding: 0px 30px 20px 0;
 }
 
-#page-content #region-main-box #region-post-box #region-post .region-content {
+#page-content #region-post .region-content {
 	overflow: hidden;
 	padding: 0px 0 20px 10px;
 }
@@ -86,31 +86,34 @@
 	margin-left: 0px;
 }
 
-.content-only #page-content #region-main-box #region-post-box {
+.content-only #page-content #region-post-box {
 	margin-left: 0px;
 }
 
-.content-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main {
+.content-only #page-content #region-main {
 	margin-left: 0px;
 }
 
-.content-only #page-content #region-main-box #region-post-box #region-pre {
+.content-only #page-content #region-pre {
 	width: 0px;
 }
 
-.content-only #page-content #region-main-box #region-post-box #region-post {
+.content-only #page-content #region-post {
 	width: 0px;
 }
 
-#page-content #region-main-box #region-post-box {
+#page-content #region-post-box {
 	margin-left: -250px;
 }
 
-#page-content #region-main-box #region-post-box #region-main-wrap #region-main {
+#page-content #region-main {
 	margin-left: 250px;
 }
 
-#page-content #region-main-box #region-post-box #region-post {
+#page-content #region-post {
 	left: 250px;
 	width: 250px;
 }
+
+.pagelayout-report #page-content #region-main {overflow:auto;}
+.pagelayout-report #page-content #region-main .region-content {overflow:visible;}
\ No newline at end of file
Index: moodle/theme/canvas/config.php
--- moodle/theme/canvas/config.php Base (1.14)
+++ moodle/theme/canvas/config.php Locally Modified (Based On 1.14)
@@ -168,6 +168,11 @@
         'regions' => array(),
         'options' => array('nofooter'=>true, 'nonavbar'=>true),
     ),
+    'report' => array(
+        'file' => 'report.php',
+        'regions' => array('side-pre'),
+        'defaultregion' => 'side-pre',
+    )
\ No newline at end of file
 );
 
 /////////////////////////////////////////////////////////
Index: moodle/theme/canvas/layout/general.php
--- moodle/theme/canvas/layout/general.php Base (1.2)
+++ moodle/theme/canvas/layout/general.php Locally Modified (Based On 1.2)
Index: moodle/theme/canvas/layout/report.php
--- moodle/theme/canvas/layout/report.php No Base Revision
+++ moodle/theme/canvas/layout/report.php Locally New
@@ -0,0 +1,109 @@
+<?php
+
+$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);
+
+$bodyclasses = array();
+if ($hassidepre && !$hassidepost) {
+    $bodyclasses[] = 'side-pre-only';
+} else if ($hassidepost && !$hassidepre) {
+    $bodyclasses[] = 'side-post-only';
+} else if (!$hassidepost && !$hassidepre) {
+    $bodyclasses[] = 'content-only';
+}
+
+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">
+
+<!-- START OF HEADER -->
+
+    <?php if ($hasheading || $hasnavbar) { ?>
+    <div id="wrapper" class="clearfix">
+
+        <div id="page-header">
+            <div id="page-header-wrapper" class="clearfix">
+                   <?php if ($hasheading) { ?>
+                <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
+                <div class="headermenu">
+                    <?php
+                        echo $OUTPUT->login_info();
+                           if (!empty($PAGE->layout_options['langmenu'])) {
+                               echo $OUTPUT->lang_menu();
+                           }
+                           echo $PAGE->headingmenu;
+                    ?>
+                </div>
+                <?php } ?>
+            </div>
+        </div>
+
+        <?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 } ?>
+
+<?php } ?>
+
+<!-- END OF HEADER -->
+
+<!-- START OF CONTENT -->
+
+        
+            <div id="page-content-wrapper" class="clearfix">
+                <div id="page-content">
+                    <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>
+        </div>
+
+<!-- END OF CONTENT -->
+
+<!-- START OF FOOTER -->
+
+        <?php if ($hasfooter) { ?>
+        <div id="page-footer" class="clearfix">
+            <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
+            <?php
+                echo $OUTPUT->login_info();
+                echo $OUTPUT->home_link();
+                echo $OUTPUT->standard_footer_html();
+            ?>
+        </div>
+        <?php } ?>
+
+    <?php if ($hasheading || $hasnavbar) { ?>
+        </div> <!-- END #wrapper -->
+    <?php } ?>
+
+</div> <!-- END #page -->
+
+<?php echo $OUTPUT->standard_end_of_body_html() ?>
+</body>
+</html>
\ No newline at end of file
Index: moodle/theme/canvas/style/pagelayout.css
--- moodle/theme/canvas/style/pagelayout.css Base (1.3)
+++ moodle/theme/canvas/style/pagelayout.css Locally Modified (Based On 1.3)
@@ -1,11 +1,9 @@
 #page-content #region-main-box {
 	left: 210px;
-/
-
-* Width of left sideblock */
+/* Width of left sideblock */
 }
 
-#page-content #region-main-box #region-post-box {
+#page-content #region-post-box {
 	margin-left: -420px;
 	
 
@@ -13,7 +11,7 @@
   padding-top: 5px;
 }
 
-#page-content #region-main-box #region-post-box #region-main-wrap #region-main {
+#page-content #region-main {
 	margin-left: 420px;
 	
 
@@ -24,7 +22,7 @@
 /* Padding around middle column */
 }
 
-#page-content #region-main-box #region-post-box #region-pre {
+#page-content #region-pre {
 	left: 210px;
 	
 
@@ -35,11 +33,9 @@
 /* Width of left sideblock */
 }
 
-#page-content #region-main-box #region-post-box #region-post {
+#page-content #region-post {
 	width: 210px;
-/
-
-* Width of right sideblock */
\ No newline at end of file
+/* Width of right sideblock */
\ No newline at end of file
 }
 
 #page-content #region-main-box .region-content {
Index: moodle/theme/formal_white/config.php
--- moodle/theme/formal_white/config.php Base (1.24)
+++ moodle/theme/formal_white/config.php Locally Modified (Based On 1.24)
@@ -156,6 +156,11 @@
         'regions' => array(),
         'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
     ),
+    'report' => array(
+        'file' => 'report.php',
+        'regions' => array('side-pre'),
+        'defaultregion' => 'side-pre'
+    ),
\ No newline at end of file
 );
 
 $THEME->rendererfactory = 'theme_overridden_renderer_factory';
Index: moodle/theme/formal_white/layout/report.php
--- moodle/theme/formal_white/layout/report.php No Base Revision
+++ moodle/theme/formal_white/layout/report.php Locally New
@@ -0,0 +1,127 @@
+<?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
Index: moodle/theme/formal_white/lib.php
--- moodle/theme/formal_white/lib.php Base (1.1)
+++ moodle/theme/formal_white/lib.php Locally Modified (Based On 1.1)
@@ -64,12 +64,14 @@
 function formalwhite_set_regionwidth($css, $regionwidth) {
     $tag = '[[setting:regionwidth]]';
     $doubletag = '[[setting:regionwidthdouble]]';
+    $tagplus10 = '[[setting:regionwidthplus10]]';
     $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);
\ No newline at end of file
     return $css;
 }
 
Index: moodle/theme/formal_white/style/general.css
--- moodle/theme/formal_white/style/general.css Base (1.5)
+++ moodle/theme/formal_white/style/general.css Locally Modified (Based On 1.5)
@@ -162,13 +162,16 @@
 
 /** Forum **/
 .forumheaderlist,
-.forumpost {margin-top:15px;border:1px solid #DDD;border-collapse:separate;}
-.forumpost td {border-width:0px;}
-.forumpost .topic {background-color:#C8C9C7;}
+.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;padding:4px;text-align:center;vertical-align:top;width:35px;}
-.forumpost .content .commands {font-size:0.9em;clear:both;padding-top:0.5em;text-align:right;}
\ No newline at end of file
+.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;}
\ No newline at end of file
 .forumpost .content .link {font-size:0.9em;}
 .forumpost .content .footer {font-size:0.9em;padding-top:0.5em;text-align:right;}
 
Index: moodle/theme/formal_white/style/settings.css
--- moodle/theme/formal_white/style/settings.css Base (1.1)
+++ moodle/theme/formal_white/style/settings.css Locally Modified (Based On 1.1)
@@ -1,13 +1,11 @@
 .block .content {background-color:[[setting:backgroundcolor]];}
-#page-content #region-main-box {left:[[setting:regionwidth]];}
-#page-content #region-main-box #region-post-box {margin-left:-[[setting:regionwidthdouble]];}
-#page-content #region-main-box #region-post-box #region-pre {width:[[setting:regionwidth]];left:[[setting:regionwidth]];}
-#page-content #region-main-box #region-post-box #region-post {width:[[setting:regionwidth]];}
-#page-content #region-main-box #region-post-box #region-main-wrap #region-main {margin-left:[[setting:regionwidthdouble]];}
-.side-pre-only #page-content #region-main-box #region-post-box {margin-left:-[[setting:regionwidth]];}
-.side-pre-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main {margin-left:[[setting:regionwidth]];}
-/* #page {width:[[setting:regionwidth]]%;margin:15px (100-[[setting:regionwidth])/2% 0;} */
-/* #page {min-width: 934px;} */
\ No newline at end of file
+#page-content #region-main-box {left:[[setting:regionwidthplus10]];}
+#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]];}
\ No newline at end of file
 
 /** Custom CSS **/
 [[setting:customcss]]
Index: moodle/theme/formfactor/style/mods.css
--- moodle/theme/formfactor/style/mods.css Base (1.2)
+++ moodle/theme/formfactor/style/mods.css Locally Modified (Based On 1.2)
@@ -7,10 +7,11 @@
 .path-mod-forum .forumheaderlist th {background: url([[pix:theme|gradient-sb]]) repeat-x 0 0}
 .path-mod-forum .forumheaderlist .r1 td { background:#f5f5f5; }
 
-.forumpost .topic { background:#eee;border-color:#aaa;border-width:0 0 2px 0;padding-left:7px; }
+.forumpost .topic { background:#eee;border-bottom:2px solid #AAA;padding-left:7px; }
 .forumpost .topic .subject { font-size:1.25em; }
 .forumpost .topic .author { font-style:italic;color:#444;font-size:0.95em; }
-.forumpost .content { border-bottom:5px solid #aaa;padding:5px 7px 10px 7px; }
\ No newline at end of file
+.forumpost .content .posting { padding:5px 7px 10px 7px; }
+.forumpost .options { border-bottom:5px solid #aaa;}
\ No newline at end of file
 
 /* Assignments 
 --------------------------*/
Index: moodle/theme/fusion/config.php
--- moodle/theme/fusion/config.php Base (1.5)
+++ moodle/theme/fusion/config.php Locally Modified (Based On 1.5)
@@ -167,7 +167,11 @@
         'regions' => array(),
         'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
     ),
-
+    'report' => array(
+        'file' => 'general.php',
+        'regions' => array('side-post'),
+        'defaultregion' => 'side-post',
+    ),
 );
 
 ///////////////////////////////////////////////////////////////
@@ -208,14 +212,14 @@
 // As above but will be included in the page footer.
 ////////////////////////////////////////////////////
 
-$THEME->larrow	= '&lang;';
+$THEME->larrow    = '&lang;';
 
 ////////////////////////////////////////////////////
 // Overrides the left arrow image used throughout
 // Moodle
 ////////////////////////////////////////////////////
 
-$THEME->rarrow	= '&rang;';
\ No newline at end of file
+$THEME->rarrow    = '&rang;';
\ No newline at end of file
 
 ////////////////////////////////////////////////////
 // Overrides the right arrow image used throughout Moodle
Index: moodle/theme/fusion/style/pagelayout.css
--- moodle/theme/fusion/style/pagelayout.css Base (1.1)
+++ moodle/theme/fusion/style/pagelayout.css Locally Modified (Based On 1.1)
@@ -38,14 +38,14 @@
 	width: 100%;
 }
 
-#page-content #region-main-box #region-post-box {
+#page-content #region-post-box {
 	float: left;
 	right: 72%;
 	position: relative;
 	width: 100%;
 }
 
-#page-content #region-main-box #region-post-box #region-main-wrap #region-main {
+#page-content #region-main {
 	float: left;
 	overflow: hidden;
 	position: relative;
@@ -54,7 +54,7 @@
 	width: 72%;
 }
 
-#page-content #region-main-box #region-post-box #region-post {
+#page-content #region-post {
 	float: left;
 	overflow: hidden;
 	position: relative;
@@ -62,12 +62,12 @@
 	width: 28%;
 }
 
-#page-content #region-main-box #region-post-box #region-main-wrap #region-main .region-content {
+#page-content #region-main .region-content {
 	overflow: hidden;
 	padding: 50px 15px 20px 0;
 }
 
-#page-content #region-main-box #region-post-box #region-post .region-content {
+#page-content #region-post .region-content {
 	overflow: hidden;
 	padding: 0 0 0 10px;
 }
@@ -84,19 +84,22 @@
 	right: 0%;
 }
 
-.content-only #page-content #region-main-box #region-post-box {
+.content-only #page-content #region-post-box {
 	right: 100%;
 }
 
-.content-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main {
+.content-only #page-content #region-main {
 	left: 100%;
 	width: 100%;
 }
 
-.content-only #page-content #region-main-box #region-post-box #region-pre {
+.content-only #page-content #region-pre {
 	width: 0%;
 }
 
-.content-only #page-content #region-main-box #region-post-box #region-post {
+.content-only #page-content #region-post {
 	width: 0%;
 }
+
+.pagelayout-report #page-content #region-main {overflow:auto;}
+.pagelayout-report #page-content #region-main .region-content {overflow:visible;}
\ No newline at end of file
Index: moodle/theme/leatherbound/config.php
--- moodle/theme/leatherbound/config.php Base (1.6)
+++ moodle/theme/leatherbound/config.php Locally Modified (Based On 1.6)
@@ -155,7 +155,11 @@
         'regions' => array(),
         'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
     ),
-
+    'report' => array(
+        'file' => 'report.php',
+        'regions' => array('side-pre'),
+        'defaultregion' => 'side-pre',
+    ),
 );
 
 ///////////////////////////////////////////////////////////////
Index: moodle/theme/leatherbound/layout/general.php
--- moodle/theme/leatherbound/layout/general.php Base (1.2)
+++ moodle/theme/leatherbound/layout/general.php Locally Modified (Based On 1.2)
Index: moodle/theme/leatherbound/layout/report.php
--- moodle/theme/leatherbound/layout/report.php No Base Revision
+++ moodle/theme/leatherbound/layout/report.php Locally New
@@ -0,0 +1,91 @@
+<?php
+
+$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);
+
+$bodyclasses = array();
+if ($hassidepre && !$hassidepost) {
+    $bodyclasses[] = 'side-pre-only';
+} else if ($hassidepost && !$hassidepre) {
+    $bodyclasses[] = 'side-post-only';
+} else if (!$hassidepost && !$hassidepre) {
+    $bodyclasses[] = 'content-only';
+}
+
+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">
+<?php if ($hasheading || $hasnavbar) { ?>
+    <div id="page-header">
+        <div id="page-header-wrapper" class="wrapper clearfix">
+            <?php if ($hasheading) { ?>
+                <h1 class="headermain inside"><?php echo $PAGE->heading ?></h1>
+                <div class="headermenu"><?php
+                    echo $OUTPUT->login_info();
+                        if (!empty($PAGE->layout_options['langmenu'])) {
+                            echo $OUTPUT->lang_menu();
+                        }
+                    echo $PAGE->headingmenu ?>
+                </div>
+            <?php } ?>
+        </div>
+    </div>
+
+        <?php if ($hasnavbar) { ?>
+            <div class="navbar">
+                <div class="wrapper clearfix">
+                    <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
+                    <div class="navbutton"> <?php echo $PAGE->button; ?></div>
+                </div>
+            </div>
+        <?php } ?>
+
+<?php } ?>
+<!-- END OF HEADER -->
+
+<div id="page-content-wrapper" class="wrapper clearfix">
+    <div id="page-content">
+        <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>
+
+<!-- START OF FOOTER -->
+    <?php if ($hasfooter) { ?>
+    <div id="page-footer" class="wrapper">
+        <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
+        <?php
+        echo $OUTPUT->login_info();
+        echo $OUTPUT->home_link();
+        echo $OUTPUT->standard_footer_html();
+        ?>
+    </div>
+    <?php } ?>
+</div>
+<?php echo $OUTPUT->standard_end_of_body_html() ?>
+</body>
+</html>
\ No newline at end of file
Index: moodle/theme/leatherbound/style/core.css
--- moodle/theme/leatherbound/style/core.css Base (1.3)
+++ moodle/theme/leatherbound/style/core.css Locally Modified (Based On 1.3)
@@ -124,7 +124,8 @@
 
 .forumpost .topic {
 	background: #dbd6c7;
-	border-bottom-color: #da5013;
\ No newline at end of file
+    border-bottom:1px solid #da5013;
+    padding:5px 4px 4px;
\ No newline at end of file
 }
 
 .forumpost .topic .subject {
Index: moodle/theme/magazine/config.php
--- moodle/theme/magazine/config.php Base (1.4)
+++ moodle/theme/magazine/config.php Locally Modified (Based On 1.4)
@@ -120,7 +120,11 @@
         'regions' => array(),
         'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
     ),
-
\ No newline at end of file
+    'report' => array(
+        'file' => 'general.php',
+        'regions' => array('side-pre'),
+        'defaultregion' => 'side-pre',
+    ),
\ No newline at end of file
 );
 
 ///////////////////////////////////////////////////////////////
Index: moodle/theme/magazine/style/colors.css
--- moodle/theme/magazine/style/colors.css Base (1.1)
+++ moodle/theme/magazine/style/colors.css Locally Modified (Based On 1.1)
@@ -52,7 +52,7 @@
 
 /** forum post subject background default is #e6e2af **/
 
-.forumpost td.topic {
\ No newline at end of file
+.forumpost .topic {
\ No newline at end of file
 	background: [[setting:forumback]] url([[pix:theme|alert-overlay]]) repeat-x;
 }
 
Index: moodle/theme/magazine/style/core.css
--- moodle/theme/magazine/style/core.css Base (1.4)
+++ moodle/theme/magazine/style/core.css Locally Modified (Based On 1.4)
@@ -668,23 +668,27 @@
 
 /** forum post style **/
 
-.forumpost td.content {
+.forumpost .content {
 	border: 1px solid #dadada;
 	border-top: none;
 	background: #fff;
 	padding: 1em 1em 1em 1em;
 }
 
-.forumpost td.content div.posting {
+.forumpost .content div.posting {
 	font-size: 90%;
 }
 
-.forumpost td.topic {
+.forumpost .topic {
 	border: 1px solid #dadada;
 	padding-top: 0px;
 	padding-bottom: 0px;
 }
 
+.forumpost .topic div {
+    margin:4px;
+}
+
 .forumpost .subject, .blog_entry div.subject a {
 	font-size: 19px;
 }
@@ -697,7 +701,7 @@
 	border-left: none !important;
 }
 
-table.forumpost {
+.forumpost {
 	border: none;
 }
 
@@ -706,21 +710,22 @@
 	font-weight: 200;
 }
 
-.forumpost td.left {
-	padding: 4px 5px 4px 0;
+.forumpost .left {
+    
 }
 
-.forumpost td.left.picture {
-	background: url([[pix:theme|postline]]) no-repeat 120% 104%;
+.forumpost .left.picture {
+    background-image: url([[pix:theme|postline]]);
+    background-repeat: no-repeat;
+    background-position: 180% 106%;
 }
 
-.forumpost td.left.picture img {
+.forumpost .left.picture img {
 	border: 1px solid #eee;
 	border-bottom: 1px solid #ccc;
 	border-right: 1px solid #dadada;
 	background: #fff;
-	padding: 4px 4px 9px;
-	margin-top: 0px;
+    margin: 4px 0 9px;
 }
 
 .forumpost .starter {
@@ -1103,10 +1108,7 @@
 	border-top: none;
 }
 
-/** fix overflow on quiz results display **/
-
 div#tablecontainer {
-	overflow: auto;
\ No newline at end of file
 	margin-bottom: 10px;
 }
 
Index: moodle/theme/magazine/style/layout.css
--- moodle/theme/magazine/style/layout.css Base (1.1)
+++ moodle/theme/magazine/style/layout.css Locally Modified (Based On 1.1)
@@ -62,27 +62,27 @@
 	right: 0%;
 }
 
-.side-pre-only #page-content #region-main-box #region-post-box {
+.side-pre-only #page-content #region-post-box {
 	right: 77%;
 }
 
-.side-pre-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main {
+.side-pre-only #page-content #region-main {
 	left: 100%;
 	width: 77%;
 }
 
-.side-pre-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main .region-content {
+.side-pre-only #page-content #region-main .region-content {
 	overflow: hidden;
 	padding: 20px 10px;
 	padding-top: 10px;
 }
 
-.side-pre-only #page-content #region-main-box #region-post-box #region-pre {
+.side-pre-only #page-content #region-pre {
 	left: 1%;
 	width: 21%;
 }
 
-.side-pre-only #page-content #region-main-box #region-post-box #region-post {
+.side-pre-only #page-content #region-post {
 	width: 0%;
 }
 
@@ -92,21 +92,21 @@
 	right: 23%;
 }
 
-.side-post-only #page-content #region-main-box #region-post-box {
+.side-post-only #page-content #region-post-box {
 	right: 76%;
 }
 
-.side-post-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main {
+.side-post-only #page-content #region-main {
 	left: 100%;
 	width: 77%;
 }
 
-.side-post-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main .region-content {
+.side-post-only #page-content #region-main .region-content {
 	overflow: hidden;
 	padding: 20px 10px;
 }
 
-.side-post-only #page-content #region-main-box #region-post-box #region-post {
+.side-post-only #page-content #region-post {
 	left: 100%;
 	width: 21%;
 }
@@ -121,15 +121,15 @@
 	right: 0%;
 }
 
-.content-only #page-content #region-main-box #region-post-box {
+.content-only #page-content #region-post-box {
 	right: 100%;
 }
 
-.content-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main {
+.content-only #page-content #region-main {
 	width: 98%;
 }
 
-.content-only #page-content #region-main-box #region-post-box #region-pre {
+.content-only #page-content #region-pre {
 	width: 0%;
 }
 
@@ -146,3 +146,6 @@
 #region-post {
 	padding-top: 0px;
 }
+
+.pagelayout-report #page-content #region-main {overflow:auto;}
+.pagelayout-report #page-content #region-main .region-content {overflow:visible;}
\ No newline at end of file
Index: moodle/theme/nonzero/config.php
--- moodle/theme/nonzero/config.php Base (1.6)
+++ moodle/theme/nonzero/config.php Locally Modified (Based On 1.6)
@@ -166,7 +166,11 @@
         'regions' => array(),
         'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
     ),
-
+    'report' => array(
+        'file' => 'general.php',
+        'regions' => array('side-pre'),
+        'defaultregion' => 'side-pre',
+    ),
 );
 
 ///////////////////////////////////////////////////////////////
Index: moodle/theme/nonzero/style/pagelayout.css
--- moodle/theme/nonzero/style/pagelayout.css Base (1.5)
+++ moodle/theme/nonzero/style/pagelayout.css Locally Modified (Based On 1.5)
@@ -1,7 +1,4 @@
 /** Path: theme pagelayout **/
-
-
-
 body {margin:auto 0px;width:auto;}
 #page {width:100%;overflow:hidden;}
 #page-content {
@@ -19,45 +16,45 @@
 	right: 100%;
 }
 
-#page-content #region-main-box #region-post-box {
+#page-content #region-post-box {
 	float: left;
 	margin-left: -[[setting:regionprewidth]];;
 	width: 100%;
 }
 
-#page-content #region-main-box #region-post-box #region-main-wrap {
+#page-content #region-main-wrap {
 	float: left;
 	width: 50%;
 }
 
-#page-content #region-main-box #region-post-box #region-main-wrap #region-main {
+#page-content #region-main {
 	overflow: hidden;
 	position: relative;
 	margin-left: [[setting:regionsumwidth]];
 	left: 100%;
 }
 
-#page-content #region-main-box #region-post-box #region-pre {
+#page-content #region-pre {
 	float: right;
 	position: relative;
 	width: [[setting:regionprewidth]];
 	left: [[setting:regionprewidth]];
 }
 
-#page-content #region-main-box #region-post-box #region-post {
+#page-content #region-post {
 	float: right;
 	position: relative;
 	left: [[setting:regiondoublepresumwidth]];
  	width: [[setting:regionpostwidth]];
 }
 
-#page-content #region-main-box #region-post-box #region-main-wrap #region-main .region-content {
+#page-content #region-main .region-content {
 	overflow: hidden;
 	padding: 20px 20px 20px 0;
 }
 
-#page-content #region-main-box #region-post-box #region-pre .region-content,
-#page-content #region-main-box #region-post-box #region-post .region-content {
+#page-content #region-pre .region-content,
+#page-content #region-post .region-content {
 	overflow: hidden;
 	padding: 20px 10px;
 }
@@ -69,45 +66,43 @@
 }
 
 /** Only side pre **/
-
 .side-pre-only #page-content #region-main-box {
 	margin-left: 0px;
 }
 
-.side-pre-only #page-content #region-main-box #region-post-box {
+.side-pre-only #page-content #region-post-box {
 	margin-left: -[[setting:regionprewidth]];
 }
 
-.side-pre-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main {
+.side-pre-only #page-content #region-main {
 	margin-left: [[setting:regionprewidth]];
 }
 
-.side-pre-only #page-content #region-main-box #region-post-box #region-pre {
+.side-pre-only #page-content #region-pre {
 	left: [[setting:regionprewidth]];
  	width: [[setting:regionprewidth]];
 }
 
-.side-pre-only #page-content #region-main-box #region-post-box #region-post {
+.side-pre-only #page-content #region-post {
 	width: 0%;
 }
 
 /** Only side post **/
-
 .side-post-only #page-content #region-main-box {
 	margin-left: 0px;
 	
 }
 
-.side-post-only #page-content #region-main-box #region-post-box {
+.side-post-only #page-content #region-post-box {
 	margin-left: -[[setting:regionpostwidth]];
 }
 
-.side-post-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main {
+.side-post-only #page-content #region-main {
 	margin-left: [[setting:regionpostwidth]];
 	
 }
 
-.side-post-only #page-content #region-main-box #region-post-box #region-post {
+.side-post-only #page-content #region-post {
 		left: [[setting:regionpostwidth]];
 		width: [[setting:regionpostwidth]];
 }
@@ -117,23 +112,25 @@
 }
 
 /** No blocks whatsoever **/
-
 .content-only #page-content #region-main-box {
 	margin-left: 0px;
 }
 
-.content-only #page-content #region-main-box #region-post-box {
+.content-only #page-content #region-post-box {
 	margin-left: 0px;
 }
 
-.content-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main {
+.content-only #page-content #region-main {
 	margin-left: 0px;
 }
 
-.content-only #page-content #region-main-box #region-post-box #region-pre {
+.content-only #page-content #region-pre {
 	width: 0px;
 }
 
-.content-only #page-content #region-main-box #region-post-box #region-post {
+.content-only #page-content #region-post {
 	width: 0px;
 }
+
+.pagelayout-report #page-content #region-main {overflow:auto;}
+.pagelayout-report #page-content #region-main .region-content {overflow:visible;}
\ No newline at end of file
Index: moodle/theme/overlay/config.php
--- moodle/theme/overlay/config.php Base (1.2)
+++ moodle/theme/overlay/config.php Locally Modified (Based On 1.2)
@@ -161,7 +161,11 @@
         'regions' => array(),
         'options' => array('nofooter'=>true, 'nonavbar'=>true),
     ),
-    
+    'report' => array(
+        'file' => 'general.php',
+        'regions' => array('side-pre'),
+        'defaultregion' => 'side-pre',
+    ),
 );
 
 ///////////////////////////////////////////////////////////////
Index: moodle/theme/serenity/style/core.css
--- moodle/theme/serenity/style/core.css Base (1.5)
+++ moodle/theme/serenity/style/core.css Locally Modified (Based On 1.5)
@@ -6,8 +6,10 @@
 .pagelayout-admin,
 .pagelayout-mydashboard,
 .pagelayout-mypublic,
-.pagelayout-login { 
+.pagelayout-login,
+.pagelayout-report {
 	background: url([[pix:theme|body]]);
+    border-top:1px solid #c1bc9d;
 }
 
 body,h1,h2,h3,h4,h5,h6,p,ul,ol,dl,input,textarea { 
@@ -129,6 +131,12 @@
 	border-style: solid;
 }
 
+.forumpost .topic div,
+.forumpost .content div {
+    margin:4px;
+}
+
+
\ No newline at end of file
 .forumpost .starter .subject { 
 	font-weight: bold;
 }
Index: moodle/theme/sky_high/config.php
--- moodle/theme/sky_high/config.php Base (1.3)
+++ moodle/theme/sky_high/config.php Locally Modified (Based On 1.3)
@@ -165,7 +165,11 @@
         'regions' => array(),
         'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
     ),
-
+    'report' => array(
+        'file' => 'general.php',
+        'regions' => array('side-pre'),
+        'defaultregion' => 'side-pre',
+    )
 );
 
 ///////////////////////////////////////////////////////////////
Index: moodle/theme/sky_high/layout/report.php
--- moodle/theme/sky_high/layout/report.php No Base Revision
+++ moodle/theme/sky_high/layout/report.php Locally New
@@ -0,0 +1,136 @@
+<?php
+
+$hassidepre = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-pre', $OUTPUT));
+$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
+$showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
+
+$custommenu = $OUTPUT->custom_menu();
+$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
+
+$bodyclasses = array();
+if (!$showsidepre) {
+    $bodyclasses[] = 'content-only';
+}
+if ($hassidepre) {
+    $bodyclasses[] = 'background';
+}
+
+if (!empty($PAGE->theme->settings->logo)) {
+    $logourl = $PAGE->theme->settings->logo;
+} else {
+    $logourl = NULL;
+}
+
+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')?>" />
+    <meta name="description" content="<?php echo strip_tags(format_text($SITE->summary, FORMAT_HTML)) ?>" />
+    <?php echo $OUTPUT->standard_head_html() ?>
+</head>
+<body id="<?php echo $PAGE->bodyid ?>" class="<?php echo $PAGE->bodyclasses.' '.join(' ', $bodyclasses) ?>">
+<?php echo $OUTPUT->standard_top_of_body_html() ?>
+
+<div id="page">
+    <div id="wrapper" class="clearfix">
+
+<!-- START OF HEADER -->
+
+    <div id="page-header" class="clearfix">
+        <div id="page-header-wrapper">
+            <?php if($logourl == NULL) { ?>
+             <h1 class="headermain">
+                <?php echo $PAGE->heading ?>
+            </h1>
+            <?php } else { ?>
+           <img class="logo" src="<?php echo $logourl;?>" alt="Custom logo here" /><h1 class="headerwlogo">- <?php echo $PAGE->heading ?></h1>
+            <?php } ?>
+
+
+            <div class="headermenu">
+                <?php
+                        echo $OUTPUT->login_info();
+                           if (!empty($PAGE->layout_options['langmenu'])) {
+                               echo $OUTPUT->lang_menu();
+                        }
+                           echo $PAGE->headingmenu
+                    ?>
+            </div>
+        </div>
+    </div>
+
+<!-- END OF HEADER -->
+
+<!-- START OF CONTENT -->
+<?php if ($hascustommenu) { ?>
+      <div id="custommenu"><?php echo $custommenu; ?></div>
+<?php } ?>
+<div class="navbar clearfix">
+            <?php if ($hasnavbar) { ?>
+            <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
+            <div class="navbutton"> <?php echo $PAGE->button; ?></div>
+            <?php } ?>
+      </div>
+
+
+
+
+<div id="page-content-wrapper">
+    <div id="page-content">
+        <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 if ($hassidepre) { ?>
+                <div id="region-pre" class="block-region">
+                    <div class="region-content">
+                        <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
+                    </div>
+                </div>
+                <?php } ?>
+
+            </div>
+        </div>
+    </div>
+</div>
+
+<!-- END OF CONTENT -->
+
+
+
+<!-- START OF FOOTER -->
+
+    <div id="page-footer">
+        <div class="footnote"><?php echo $footnote; ?></div>
+        <?php
+        echo $OUTPUT->login_info();
+        echo $OUTPUT->standard_footer_html();
+        ?>
+    </div>
+
+<!-- END OF FOOTER -->
+</div>
+</div>
+    <p class="helplink">
+        <?php echo page_doc_link(get_string('moodledocslink')) ?>
+    </p><center>
+        <?php
+    echo $OUTPUT->home_link();
+    echo $OUTPUT->standard_end_of_body_html() ?>
+</center>
+</body>
+</html>
Index: moodle/theme/sky_high/style/core.css
--- moodle/theme/sky_high/style/core.css Base (1.1)
+++ moodle/theme/sky_high/style/core.css Locally Modified (Based On 1.1)
@@ -8,19 +8,17 @@
 .pagelayout-admin,
 .pagelayout-mydashboard,
 .pagelayout-mypublic,
-.pagelayout-login
-{ 
+.pagelayout-login,
+.pagelayout-report {
 	background:url([[pix:theme|body]]) top left repeat-x #dcecf9; 
 }
 
-body,h1,h2,h3,h4,h5,h6,p,ul,ol,dl,input,textarea
-{ 
+body,h1,h2,h3,h4,h5,h6,p,ul,ol,dl,input,textarea {
 	font-family:Arial, Helvetica, sans-serif; 
 	color:#333;
 }
 
-#wrapper
-{ 
+#wrapper {
 	background:#fff; 
 	margin:20px 5% 0px 5%; 
 	padding:0px;
@@ -37,14 +35,12 @@
   padding-top: 0;
 }
 
-a:link, a:visited
-{
+a:link, a:visited {
 	color: #003466;
 	text-decoration: none;
 }
 
-a:hover, a:active, a:focus
-{
+a:hover, a:active, a:focus {
 	color: #4785ac;
 	text-decoration: none;
 }
@@ -53,7 +49,6 @@
 	border: 0px none;
 }
 
-
 #newmessageoverlay {
 	background: #f9f9d4;
 	margin-left: 55px;
@@ -81,17 +76,13 @@
 
 /* @group Header */
 
-#page-header
-{ 
+#page-header {
 	background:#97d3f4 url([[pix:theme|header]]) no-repeat top right; 
 	margin-bottom: 0px;
 	height: 80px;
 	border-bottom: 1px solid #fff;
 }
 
-#page-header .sitelogo {
-}
-
 .logo {
 	height: 50px;
 	float: left;
@@ -105,8 +96,7 @@
 	margin:.8em 0.5em 0.75em;
 }
 
-h1.headermain
-{
+h1.headermain {
 	color: #006699;
 	font-weight: normal;
 	font-size: 1.85em !important;
@@ -123,8 +113,7 @@
 
 }
 
-.tagline
-{
+.tagline {
 	color: #006699 !important;
 	padding-top: 7px;
 	font-size: .45em;
@@ -187,28 +176,24 @@
 	border: none;
 }
 
-.block
-{
+.block {
 	border: 0px none;
 }
 
-.block .header
-{
+.block .header {
 	border: 1px solid #ccc;
 	background: #fff;
 	padding-left:5px;
 }
 
-.block .title h2
-{
+.block .title h2 {
 	text-transform: uppercase;
 	padding-bottom: 0px;
 	color: #336699;
 	font-size: .95em;
 }
 
-.block .content
-{
+.block .content {
 	background: #fff;
 	border: 1px solid #ccc;
 	padding: 10px;
@@ -338,15 +323,24 @@
 
 .forumpost {
 	border: 1px solid #ccc;
+    background: #c7eafd;
 }
 .forumpost .left {
 	background: #c7eafd;
 }
-
-.forumpost .topic {
-	border-bottom: 2px solid #94b9d3;
+.forumpost .header {
 	background: #d6e2f2;
 }
+.forumpost .no-overflow {
+    border-top: 2px solid #94b9d3;background: #FFF;
+}
+.forumpost .content .posting {
+    padding:4px;
+}
+.forumpost .options {
+    background: #FFF;
+    padding:4px;
+}
 
 
 /* @end */
@@ -356,4 +350,3 @@
 [[setting:customcss]]
 
 /* @end */
-
Index: moodle/theme/sky_high/style/pagelayout.css
--- moodle/theme/sky_high/style/pagelayout.css Base (1.1)
+++ moodle/theme/sky_high/style/pagelayout.css Locally Modified (Based On 1.1)
@@ -18,6 +18,7 @@
 	width:100%;
 	max-width: 1600px;
 	overflow:hidden;
+    margin:0 auto;
 }
 
 #page-content {
@@ -37,7 +38,7 @@
 	right: 100%;
 }
 
-#page-content #region-main-box #region-post-box {
+#page-content #region-post-box {
 	float: left;
 	margin-left: -[[setting:regionwidth]];
 	width: 100%;
@@ -45,20 +46,19 @@
 	background: url([[pix:theme|top_bg]]) repeat-x top #fff;
 }
 
-#page-content #region-main-box #region-post-box #region-main-wrap {
+#page-content #region-main-wrap {
 	float: left;
 	width: 50%;
-	margin-left: 20px;
 }
 
-#page-content #region-main-box #region-post-box #region-main-wrap #region-main {
+#page-content #region-main {
 	overflow: hidden;
 	position: relative;
 	margin-left: [[setting:regionwidthdouble]];
 	left: 100%;
 }
 
-#page-content #region-main-box #region-post-box #region-pre {
+#page-content #region-pre {
 	float: right;
 	position: relative;
 	left: [[setting:leftregionwidthmargin]];
@@ -66,7 +66,7 @@
 	background: transparent;
 }
 
-#page-content #region-main-box #region-post-box #region-post {
+#page-content #region-post {
 	float: right;
 	position: relative;
 	left: [[setting:rightregionwidthmargin]];
@@ -74,13 +74,13 @@
 	background: transparent;
 }
 
-#page-content #region-main-box #region-post-box #region-main-wrap #region-main .region-content {
+#page-content #region-main .region-content {
 	overflow: hidden;
-	padding: 20px 40px 20px 0px;
+    margin: 20px;
 }
 
-#page-content #region-main-box #region-post-box #region-pre .region-content,
-#page-content #region-main-box #region-post-box #region-post .region-content {
+#page-content #region-pre .region-content,
+#page-content #region-post .region-content {
 	overflow: hidden;
 	padding: 20px 10px;
 }
@@ -101,20 +101,20 @@
 	margin-left: 0px;
 }
 
-.side-pre-only #page-content #region-main-box #region-post-box {
+.side-pre-only #page-content #region-post-box {
 	margin-left: -[[setting:regionwidth]];
 }
 
-.side-pre-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main {
+.side-pre-only #page-content #region-main {
 	margin-left: [[setting:regionwidth]];
 }
 
-.side-pre-only #page-content #region-main-box #region-post-box #region-pre {
+.side-pre-only #page-content #region-pre {
 	left: [[setting:regionwidth]];
 	width: [[setting:regionwidth]];
 }
 
-.side-pre-only #page-content #region-main-box #region-post-box #region-post {
+.side-pre-only #page-content #region-post {
 	width: 0%;
 }
 
@@ -174,3 +174,9 @@
 
 
 /* @end */
+.pagelayout-report #page-content #region-main {
+    overflow:auto;
+}
+.pagelayout-report #page-content #region-main .region-content {
+    overflow:visible;
+}
\ No newline at end of file
Index: moodle/theme/splash/config.php
--- moodle/theme/splash/config.php Base (1.4)
+++ moodle/theme/splash/config.php Locally Modified (Based On 1.4)
@@ -145,6 +145,11 @@
         'regions' => array(),
         'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
     ),
+    'report' => array(
+        'file' => 'report.php',
+        'regions' => array('side-pre'),
+        'defaultregion' => 'side-pre'
+    ),
\ No newline at end of file
 );
 
 
Index: moodle/theme/splash/layout/report.php
--- moodle/theme/splash/layout/report.php No Base Revision
+++ moodle/theme/splash/layout/report.php Locally New
@@ -0,0 +1,149 @@
+<?php
+
+$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);
+
+$custommenu = $OUTPUT->custom_menu();
+$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
+
+splash_check_colourswitch();
+splash_initialise_colourswitcher($PAGE);
+
+$bodyclasses = array();
+$bodyclasses[] = 'splash-'.splash_get_colour();
+if (!$hassidepre) {
+    $bodyclasses[] = 'content-only';
+}
+
+$haslogo = (!empty($PAGE->theme->settings->logo));
+$hasfootnote = (!empty($PAGE->theme->settings->footnote));
+$hidetagline = (!empty($PAGE->theme->settings->hide_tagline) && $PAGE->theme->settings->hide_tagline == 1);
+
+if (!empty($PAGE->theme->settings->tagline)) {
+    $tagline = $PAGE->theme->settings->tagline;
+} else {
+    $tagline = get_string('defaulttagline', 'theme_splash');
+}
+
+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')?>" />
+    <meta name="description" content="<?php echo strip_tags(format_text($SITE->summary, FORMAT_HTML)) ?>" />
+    <?php echo $OUTPUT->standard_head_html() ?>
+</head>
+<body id="<?php echo $PAGE->bodyid ?>" class="<?php echo $PAGE->bodyclasses.' '.join(' ', $bodyclasses) ?>">
+    <?php echo $OUTPUT->standard_top_of_body_html() ?>
+    <div id="page">
+        <?php if ($hasheading || $hasnavbar) { ?>
+        <div id="page-header">
+            <div id="page-header-wrapper" class="wrapper clearfix">
+                <?php if ($hasheading) { ?>
+                <div id="headermenu">
+                    <?php if (isloggedin()) {
+                        echo html_writer::start_tag('div', array('id'=>'userdetails'));
+                        echo html_writer::tag('h1', get_string('usergreeting', 'theme_splash', $USER->firstname));
+                        echo html_writer::start_tag('p', array('class'=>'prolog'));
+                        echo html_writer::link(new moodle_url('/user/profile.php', array('id'=>$USER->id)), get_string('myprofile')).' | ';
+                        echo html_writer::link(new moodle_url('/login/logout.php', array('sesskey'=>sesskey())), get_string('logout'));
+                        echo html_writer::end_tag('p');
+                        echo html_writer::end_tag('div');
+                        echo html_writer::tag('div', $OUTPUT->user_picture($USER, array('size'=>55)), array('class'=>'userimg'));
+                    } else {
+                        echo html_writer::start_tag('div', array('id'=>'userdetails_loggedout'));
+                        $loginlink = html_writer::link(new moodle_url('/login/'), get_string('loginhere', 'theme_splash'));
+                        echo html_writer::tag('h1', get_string('welcome', 'theme_splash', $loginlink));
+                        echo html_writer::end_tag('div');;
+                    } ?>
+                    <div class="clearer"></div>
+                    <div id="colourswitcher">
+                        <ul>
+                            <li><img src="<?php echo $OUTPUT->pix_url('colour', 'theme'); ?>" alt="colour" /></li>
+                            <li><a href="<?php echo new moodle_url($PAGE->url, array('splashcolour'=>'red')); ?>" class="styleswitch colour-red"><img src="<?php echo $OUTPUT->pix_url('red-theme2', 'theme'); ?>" alt="red" /></a></li>
+                            <li><a href="<?php echo new moodle_url($PAGE->url, array('splashcolour'=>'green')); ?>" class="styleswitch colour-green"><img src="<?php echo $OUTPUT->pix_url('green-theme2', 'theme'); ?>" alt="green" /></a></li>
+                            <li><a href="<?php echo new moodle_url($PAGE->url, array('splashcolour'=>'blue')); ?>" class="styleswitch colour-blue"><img src="<?php echo $OUTPUT->pix_url('blue-theme2', 'theme'); ?>" alt="blue" /></a></li>
+                            <li><a href="<?php echo new moodle_url($PAGE->url, array('splashcolour'=>'orange')); ?>" class="styleswitch colour-orange"><img src="<?php echo $OUTPUT->pix_url('orange-theme2', 'theme'); ?>" alt="orange" /></a></li>
+                        </ul>
+                    </div>
+                    <?php echo $OUTPUT->lang_menu();?>
+                </div>
+                <div id="logobox">
+                    <?php if ($haslogo) {
+                        echo html_writer::link(new moodle_url('/'), "<img src='".$PAGE->theme->settings->logo."' alt='logo' />");
+                    } else {
+                        echo html_writer::link(new moodle_url('/'), $PAGE->heading, array('class'=>'nologoimage'));
+                    } ?>
+                    <?php if (!$hidetagline) { ?>
+                        <h4><?php echo $tagline ?></h4>
+                    <?php } ?>
+                </div>
+                <div class="clearer"></div>
+                <?php if ($haslogo) { ?>
+                <h4 class="headermain inside">&nbsp;</h4>
+                <?php } else { ?>
+                <h4 class="headermain inside"><?php echo $PAGE->heading ?></h4>
+                <?php } ?>
+            <?php } // End of if ($hasheading)?>
+                <!-- DROP DOWN MENU -->
+                <div class="clearer"></div>
+                <div id="dropdownmenu">
+                    <?php if ($hascustommenu) { ?>
+                    <div id="custommenu"><?php echo $custommenu; ?></div>
+                    <?php } ?>
+                    <div class="navbar">
+                        <div class="wrapper clearfix">
+                            <div class="breadcrumb"><?php if ($hasnavbar) echo $OUTPUT->navbar(); ?></div>
+                            <div class="navbutton"> <?php echo $PAGE->button; ?></div>
+                        </div>
+                    </div>
+                </div>
+                <!-- END DROP DOWN MENU -->
+            </div>
+        </div>
+    <?php } // if ($hasheading || $hasnavbar) ?>
+        <!-- END OF HEADER -->
+        <!-- START OF CONTENT -->
+
+        <div id="page-content" class="clearfix">
+            <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>
+
+        <!-- END OF CONTENT -->
+        <div class="clearfix"></div>
+    <!-- END OF #Page -->
+    </div>
+    <!-- START OF FOOTER -->
+    <?php if ($hasfooter) { ?>
+    <div id="page-footer">
+	<div id="footer-wrapper">
+            <?php if ($hasfootnote) { ?>
+            <div id="footnote"><?php echo $PAGE->theme->settings->footnote; ?></div>
+            <?php } ?>
+            <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
+            <?php
+            echo $OUTPUT->login_info();
+            echo $OUTPUT->home_link();
+            echo $OUTPUT->standard_footer_html();
+            ?>
+        </div>
+    </div>
+    <?php } ?>
+<?php echo $OUTPUT->standard_end_of_body_html() ?>
+</body>
+</html>
\ No newline at end of file
Index: moodle/theme/splash/style/sl.css
--- moodle/theme/splash/style/sl.css Base (1.3)
+++ moodle/theme/splash/style/sl.css Locally Modified (Based On 1.3)
@@ -20,7 +20,6 @@
     margin: 0 auto;
     padding: 0;
     width: 100%;
-    overflow-x:hidden;
 }
 
 body,h1,h2,h3,h4,h5,h6,p,ul,ol,dl,input,textarea {   /* Set fonttype for site */ 
@@ -428,48 +427,27 @@
     padding-top: 10px;
 }
 
-#region-pre {
+.block-region {
     background: #fff;
 }
 
-#region-post {
-    background: #fff;
-}
-
-#region-pre .block .header {  /*-- right block header   --*/
+.block-region .block .header {  /*-- right block header   --*/
     background: url([[pix:theme|sbheaderbg2]]) center no-repeat;
     height: 25px;
     color: #fff;
     padding: 12px 5px 5px 5px;
 }
 
-#region-pre .block .header h2{  /*-- right block text --*/
+.block-region .block .header h2{  /*-- right block text --*/
     color: #333;
     padding: 0 0 0 10px;
 }
 
-#region-pre .block .content {  /*-- right block content   --*/
+.block-region .block .content {  /*-- right block content   --*/
     background:  #f2f2f2;
     padding: 4px 5px 5px;
 }
 
-#region-post .block .header {  /*-- left block header   --*/
-    background: url([[pix:theme|sbheaderbg2]]) center no-repeat;
-    height: 25px;
-    color: #fff;
-    padding: 12px 5px 5px 5px;
-}
-
-#region-post .block .header h2{  /*-- left block text   --*/
-    color: #333;
-    padding: 0 0 0 10px;
-}
-
-#region-post .block .content { /*-- left block content   --*/
-    background:  #f2f2f2;
-    padding: 4px 5px 5px;
-}
-
 .block .title h2 {        /* Settings for h2 tags in sideblock headers */
     color: #35251B;
     font-weight: normal;
@@ -639,6 +617,11 @@
 .pagelayout-redirect {background-position:0 0;border-top:1px solid #853650;}
 .pagelayout-redirect #content {margin-top:150px;}
 
+.pagelayout-report #page #page-header {
+    width:960px;
+    margin:0 auto;
+}
+
\ No newline at end of file
 /* Splash Theme Specific settings for Administrators to customise css.
 ---------------------------*/
 [[setting:customcss]]
Index: moodle/theme/standard/style/css3.css
--- moodle/theme/standard/style/css3.css Base (1.4)
+++ moodle/theme/standard/style/css3.css Locally Modified (Based On 1.4)
@@ -195,6 +195,7 @@
 .loginbox .content.right,
 .forumpost .content,
 .forumpost .message,
+.forumpost .side,
 .glossarycomment .entry {
   -moz-border-radius-bottomright:10px;
   -webkit-border-bottom-right-radius: 10px;
Index: moodle/theme/standard/style/modules.css
--- moodle/theme/standard/style/modules.css Base (1.5)
+++ moodle/theme/standard/style/modules.css Locally Modified (Based On 1.5)
@@ -76,20 +76,17 @@
 #page-mod-folder-view .foldertree {width: 90%;margin:0 auto;}
 
 /** Forum **/
-.forumpost {border-color:#DDDDDD;} /** header of reply posts and lower corners of all posts in */
-.forumpost .starter {background-color:#DDDDDD;} /** header of the first post in */
-.forumpost .topic {border-bottom-color: #EEEEEE;} /** line between header and post body in */
-.forumpost .topic .author {font-size: 0.8em;}
-.forumpost .topic .subject {font-weight: bold;}
-.forumpost .ratings {padding-top: 1em;}
-.forumpost .attachments {padding: 7px;}
-.forumpost .content {padding: 4px;background-color: #FFFFFF;}
-.forumpost .commands,
-.forumpost .footer,
-.forumpost .link {padding-top: 0.5em;font-size: 0.9em;}
-.forumpost .left {padding: 4px;text-align: center;background-color:#EEEEEE;}
-.forumpost .edited {font-style: italic;}
+.forumpost {border-color:#DDDDDD;}
+.forumpost .row {background-color:#FFF;}
+.forumpost .row.header {background-color:#EEE;background-image:none;}
+.forumpost.firstpost .row.header {background-color:#DDD;}
+.forumpost .topic .author {font-size: 0.8em;padding:4px;}
+.forumpost .topic .subject {font-weight: bold;padding:4px 4px 0;}
+.forumpost .content div,
+.forumpost .options div {padding:4px;}
 .forumpost.unread {background: #9EBEFF;}
+.forumpost.unread .content {border:2px solid #0046C7;} /** inside border of unread posts in nested format in */
+
 #page-mod-forum-view .forummode,
 .path-mod-forum .forumheaderlist .replies {text-align: center;}
 .path-mod-forum .forumheaderlist .discussion .lastpost {font-size: 0.7em;}
@@ -99,7 +96,6 @@
 #page-mod-forum-subscribers .subscriberdiv,
 #page-mod-forum-subscribers .subscribertable tr td {padding:0.2em 0.3em;}
 #page-mod-forum-discuss .ratingsubmit {text-align:center;padding:10px;}
-#page-mod-forum-discuss .forumpost.unread .content {border:2px solid #0046C7;} /** inside border of unread posts in nested format in */
\ No newline at end of file
 #page-mod-forum-view .forumheaderlist .discussion .starter, /** Discussion column background in */
 #page-mod-forum-view .forumaddnew {margin-bottom: 20px;text-align:center;}
 #page-mod-forum-view .forumheaderlist td {border-color: #FFFFFF;} /** wire frame around cells in */
Index: moodle/user/index.php
--- moodle/user/index.php Base (1.286)
+++ moodle/user/index.php Locally Modified (Based On 1.286)
@@ -305,7 +305,8 @@
                 if (!isset($group->descriptionformat)) {
                     $group->descriptionformat = FORMAT_MOODLE;
                 }
-                $contentcell->text = $OUTPUT->heading($contentheading, 3) . format_text($group->description, $group->descriptionformat);
+                $options = array('overflowdiv'=>true);
+                $contentcell->text = $OUTPUT->heading($contentheading, 3) . format_text($group->description, $group->descriptionformat, $options);
                 $groupinfotable->data[] = new html_table_row(array($picturecell, $contentcell));
                 echo html_writer::table($groupinfotable);
             }
Index: moodle/user/profile.php
--- moodle/user/profile.php Base (1.14)
+++ moodle/user/profile.php Locally Modified (Based On 1.14)
@@ -214,7 +214,8 @@
         echo get_string('profilenotshown', 'moodle');
     } else {
         $user->description = file_rewrite_pluginfile_urls($user->description, 'pluginfile.php', $usercontext->id, 'user', 'profile', null);
-        echo format_text($user->description, $user->descriptionformat);
+        $options = array('overflowdiv'=>true);
+        echo format_text($user->description, $user->descriptionformat, $options);
     }
 }
 echo '</div>';
Index: moodle/user/profile/field/textarea/field.class.php
--- moodle/user/profile/field/textarea/field.class.php Base (1.5)
+++ moodle/user/profile/field/textarea/field.class.php Locally Modified (Based On 1.5)
@@ -36,7 +36,7 @@
      * Display the data for this field
      */
     function display_data() {
-        return format_text($this->data, $this->dataformat, new stdClass());
+        return format_text($this->data, $this->dataformat, array('overflowdiv'=>true));
     }
 
 }
Index: moodle/user/view.php
--- moodle/user/view.php Base (1.246)
+++ moodle/user/view.php Locally Modified (Based On 1.246)
@@ -219,7 +219,8 @@
             // we have to make a little detour thought the course context to verify the access control for course profile
             $user->description = file_rewrite_pluginfile_urls($user->description, 'pluginfile.php', $coursecontext->id, 'user', 'profile', $user->id);
         }
-        echo format_text($user->description, $user->descriptionformat);
+        $options = array('overflowdiv'=>true);
+        echo format_text($user->description, $user->descriptionformat, $options);
     }
 }
 echo '</div>';
