themes lib MDL-24895 Multiple fixes to better handle overflow.

Major tasks undertaken in this patch:
* New format_text argument, overflowdiv.
* New page layout Report.
* Review of all format_text calls.
* Added support for the report layout to all themes.
* Changed forum post display from tables to divs.
This commit is contained in:
Sam Hemelryk 2010-11-05 02:53:47 +00:00
parent 2412f8b882
commit 367a75fae4
125 changed files with 3366 additions and 2062 deletions

View file

@ -267,7 +267,7 @@ function print_user_entry($user, $keywords, $count) {
$user->descriptionformat = FORMAT_MOODLE; $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 .= '<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.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>'; $html .= '<button onclick="M.report_spamcleaner.ignore_user(this,'.$user->id.')">'.get_string('ignore', 'admin').'</button>';

View file

@ -587,7 +587,7 @@ class core_backup_renderer extends plugin_renderer_base {
$row->cells = array( $row->cells = array(
html_writer::empty_tag('input', array('type'=>'radio', 'name'=>'targetid', 'value'=>$category->id)), html_writer::empty_tag('input', array('type'=>'radio', 'name'=>'targetid', 'value'=>$category->id)),
$category->name, $category->name,
format_text($category->description, $category->descriptionformat) format_text($category->description, $category->descriptionformat, array('overflowdiv'=>true))
); );
$table->data[] = $row; $table->data[] = $row;
} }

View file

@ -25,6 +25,7 @@ class block_course_summary extends block_base {
$this->content = new stdClass(); $this->content = new stdClass();
$options = new stdClass(); $options = new stdClass();
$options->noclean = true; // Don't clean Javascripts etc $options->noclean = true; // Don't clean Javascripts etc
$options->overflowdiv = true;
$context = get_context_instance(CONTEXT_COURSE, $this->page->course->id); $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->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); $this->content->text = format_text($this->page->course->summary, $this->page->course->summaryformat, $options);

View file

@ -84,6 +84,7 @@ class block_glossary_random extends block_base {
$options = new stdClass(); $options = new stdClass();
$options->trusted = $entry->definitiontrust; $options->trusted = $entry->definitiontrust;
$options->overflowdiv = true;
$text .= format_text($entry->definition, $entry->definitionformat, $options); $text .= format_text($entry->definition, $entry->definitionformat, $options);
$this->config->nexttime = usergetmidnight(time()) + DAYSECS * $this->config->refresh; $this->config->nexttime = usergetmidnight(time()) + DAYSECS * $this->config->refresh;

View file

@ -46,12 +46,11 @@ class block_html extends block_base {
return $this->content; return $this->content;
} }
$filteropt = new stdClass;
$filteropt->overflowdiv = true;
if ($this->content_is_trusted()) { if ($this->content_is_trusted()) {
// fancy html allowed only on course, category and system blocks. // fancy html allowed only on course, category and system blocks.
$filteropt = new stdClass;
$filteropt->noclean = true; $filteropt->noclean = true;
} else {
$filteropt = null;
} }
$this->content = new stdClass; $this->content = new stdClass;

2
blocks/html/styles.css Normal file
View file

@ -0,0 +1,2 @@
.block.block_html .content {padding:0;}
.block.block_html .content .no-overflow {padding:4px;}

View file

@ -185,7 +185,7 @@
} }
$r.='<ul class="list">'."\n"; $r.='<ul class="list no-overflow">'."\n";
$feeditems = $feed->get_items(0, $maxentries); $feeditems = $feed->get_items(0, $maxentries);
foreach($feeditems as $item){ foreach($feeditems as $item){

View file

@ -34,13 +34,14 @@ class block_site_main_menu extends block_list {
/// extra fast view mode /// extra fast view mode
if (!$isediting) { if (!$isediting) {
if (!empty($modinfo->sections[0])) { if (!empty($modinfo->sections[0])) {
$options = array('overflowdiv'=>true);
foreach($modinfo->sections[0] as $cmid) { foreach($modinfo->sections[0] as $cmid) {
$cm = $modinfo->cms[$cmid]; $cm = $modinfo->cms[$cmid];
if (!$cm->uservisible) { if (!$cm->uservisible) {
continue; continue;
} }
if ($cm->modname == 'label') { 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[] = ''; $this->content->icons[] = '';
} else { } else {
$linkcss = $cm->visible ? '' : ' class="dimmed" '; $linkcss = $cm->visible ? '' : ' class="dimmed" ';
@ -85,6 +86,7 @@ class block_site_main_menu extends block_list {
if (!empty($section->sequence)) { if (!empty($section->sequence)) {
$sectionmods = explode(',', $section->sequence); $sectionmods = explode(',', $section->sequence);
$options = array('overflowdiv'=>true);
foreach ($sectionmods as $modnumber) { foreach ($sectionmods as $modnumber) {
if (empty($mods[$modnumber])) { if (empty($mods[$modnumber])) {
continue; continue;
@ -127,7 +129,7 @@ class block_site_main_menu extends block_list {
} }
if ($mod->modname == 'label') { 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[] = ''; $this->content->icons[] = '';
} else { } else {
//Accessibility: incidental image - should be empty Alt text //Accessibility: incidental image - should be empty Alt text

View file

@ -36,13 +36,14 @@ class block_social_activities extends block_list {
/// extra fast view mode /// extra fast view mode
if (!$isediting) { if (!$isediting) {
if (!empty($modinfo->sections[0])) { if (!empty($modinfo->sections[0])) {
$options = array('overflowdiv'=>true);
foreach($modinfo->sections[0] as $cmid) { foreach($modinfo->sections[0] as $cmid) {
$cm = $modinfo->cms[$cmid]; $cm = $modinfo->cms[$cmid];
if (!$cm->uservisible) { if (!$cm->uservisible) {
continue; continue;
} }
if ($cm->modname == 'label') { 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[] = ''; $this->content->icons[] = '';
} else { } else {
$linkcss = $cm->visible ? '' : ' class="dimmed" '; $linkcss = $cm->visible ? '' : ' class="dimmed" ';
@ -94,6 +95,7 @@ class block_social_activities extends block_list {
if (!empty($section) && !empty($section->sequence)) { if (!empty($section) && !empty($section->sequence)) {
$sectionmods = explode(',', $section->sequence); $sectionmods = explode(',', $section->sequence);
$options = array('overflowdiv'=>true);
foreach ($sectionmods as $modnumber) { foreach ($sectionmods as $modnumber) {
if (empty($mods[$modnumber])) { if (empty($mods[$modnumber])) {
continue; continue;
@ -136,7 +138,7 @@ class block_social_activities extends block_list {
} }
if ($mod->modname == 'label') { 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[] = ''; $this->content->icons[] = '';
} else { } else {
//Accessibility: incidental image - should be empty Alt text //Accessibility: incidental image - should be empty Alt text

View file

@ -114,7 +114,8 @@ class blog_entry {
} }
$this->summary = file_rewrite_pluginfile_urls($this->summary, 'pluginfile.php', SYSCONTEXTID, 'blog', 'post', $this->id); $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['title'] = format_string($this->subject);
$template['userid'] = $user->id; $template['userid'] = $user->id;
$template['author'] = fullname($user); $template['author'] = fullname($user);

View file

@ -54,7 +54,7 @@ if (!$manager) {
$strcohorts = get_string('cohorts', 'cohort'); $strcohorts = get_string('cohorts', 'cohort');
if ($category) { if ($category) {
$PAGE->set_pagelayout('admin'); $PAGE->set_pagelayout('report');
$PAGE->set_context($context); $PAGE->set_context($context);
$PAGE->set_url('/cohort/index.php', array('contextid'=>$context->id)); $PAGE->set_url('/cohort/index.php', array('contextid'=>$context->id));
$PAGE->set_title($strcohorts); $PAGE->set_title($strcohorts);
@ -62,7 +62,7 @@ if ($category) {
$PAGE->navbar->add($category->name, new moodle_url('/course/index.php', array('categoryedit'=>'1'))); $PAGE->navbar->add($category->name, new moodle_url('/course/index.php', array('categoryedit'=>'1')));
$PAGE->navbar->add($strcohorts); $PAGE->navbar->add($strcohorts);
} else { } else {
admin_externalpage_setup('cohorts'); admin_externalpage_setup('cohorts', '', null, '', array('pagelayout'=>'report'));
} }
echo $OUTPUT->header(); echo $OUTPUT->header();

View file

@ -23,7 +23,7 @@ require_once($CFG->libdir.'/adminlib.php');
require_once('locallib.php'); require_once('locallib.php');
require_login(); require_login();
admin_externalpage_setup('comments'); admin_externalpage_setup('comments', '', null, '', array('pagelayout'=>'report'));
$context = get_context_instance(CONTEXT_SYSTEM); $context = get_context_instance(CONTEXT_SYSTEM);
require_capability('moodle/comment:delete', $context); require_capability('moodle/comment:delete', $context);

View file

@ -413,6 +413,7 @@ EOD;
$comments = array(); $comments = array();
$candelete = has_capability('moodle/comment:delete', $this->context); $candelete = has_capability('moodle/comment:delete', $this->context);
$formatoptions = array('overflowdiv' => true);
$rs = $DB->get_recordset_sql($sql, $params, $start, $CFG->commentsperpage); $rs = $DB->get_recordset_sql($sql, $params, $start, $CFG->commentsperpage);
foreach ($rs as $u) { foreach ($rs as $u) {
$c = new stdClass(); $c = new stdClass();
@ -424,7 +425,7 @@ EOD;
$c->profileurl = $url->out(); $c->profileurl = $url->out();
$c->fullname = fullname($u); $c->fullname = fullname($u);
$c->time = userdate($c->timecreated, get_string('strftimerecent', 'langconfig')); $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)); $c->avatar = $OUTPUT->user_picture($u, array('size'=>18));
if (($USER->id == $u->id) || !empty($candelete)) { if (($USER->id == $u->id) || !empty($candelete)) {
@ -513,7 +514,7 @@ EOD;
$newcmt->fullname = fullname($USER); $newcmt->fullname = fullname($USER);
$url = new moodle_url('/user/view.php', array('id'=>$USER->id, 'course'=>$this->courseid)); $url = new moodle_url('/user/view.php', array('id'=>$USER->id, 'course'=>$this->courseid));
$newcmt->profileurl = $url->out(); $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)); $newcmt->avatar = $OUTPUT->user_picture($USER, array('size'=>16));
return $newcmt; return $newcmt;
} else { } else {

View file

@ -47,11 +47,12 @@ class comment_manager {
WHERE u.id=c.userid ORDER BY c.timecreated ASC"; WHERE u.id=c.userid ORDER BY c.timecreated ASC";
$comments = array(); $comments = array();
$formatoptions = array('overflowdiv' => true);
if ($records = $DB->get_records_sql($sql, array(), $start, $this->perpage)) { if ($records = $DB->get_records_sql($sql, array(), $start, $this->perpage)) {
foreach ($records as $item) { foreach ($records as $item) {
$item->fullname = fullname($item); $item->fullname = fullname($item);
$item->time = userdate($item->timecreated); $item->time = userdate($item->timecreated);
$item->content = format_text($item->content); $item->content = format_text($item->content, FORMAT_MOODLE, $formatoptions);
$comments[] = $item; $comments[] = $item;
unset($item->firstname); unset($item->firstname);
unset($item->lastname); unset($item->lastname);

View file

@ -196,6 +196,7 @@
$options = new stdClass; $options = new stdClass;
$options->noclean = true; $options->noclean = true;
$options->para = false; $options->para = false;
$options->overflowdiv = true;
if (!isset($category->descriptionformat)) { if (!isset($category->descriptionformat)) {
$category->descriptionformat = FORMAT_MOODLE; $category->descriptionformat = FORMAT_MOODLE;
} }

View file

@ -107,6 +107,7 @@ if ($thissection->summary or $thissection->sequence or $PAGE->user_is_editing())
$summarytext = file_rewrite_pluginfile_urls($thissection->summary, 'pluginfile.php', $coursecontext->id, 'course', 'section', $thissection->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->noclean = true;
$summaryformatoptions->overflowdiv = true;
echo format_text($summarytext, $thissection->summaryformat, $summaryformatoptions); echo format_text($summarytext, $thissection->summaryformat, $summaryformatoptions);
if ($PAGE->user_is_editing() && has_capability('moodle/course:update', $coursecontext)) { if ($PAGE->user_is_editing() && has_capability('moodle/course:update', $coursecontext)) {
@ -229,6 +230,7 @@ while ($section <= $course->numsections) {
$summarytext = file_rewrite_pluginfile_urls($thissection->summary, 'pluginfile.php', $coursecontext->id, 'course', 'section', $thissection->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->noclean = true;
$summaryformatoptions->overflowdiv = true;
echo format_text($summarytext, $thissection->summaryformat, $summaryformatoptions); echo format_text($summarytext, $thissection->summaryformat, $summaryformatoptions);
} else { } else {
echo '&nbsp;'; echo '&nbsp;';

View file

@ -99,8 +99,9 @@ defined('MOODLE_INTERNAL') || die();
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id); $coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
$summarytext = file_rewrite_pluginfile_urls($thissection->summary, 'pluginfile.php', $coursecontext->id, 'course', 'section', $thissection->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->noclean = true;
$summaryformatoptions->overflowdiv = true;
echo format_text($summarytext, $thissection->summaryformat, $summaryformatoptions); echo format_text($summarytext, $thissection->summaryformat, $summaryformatoptions);
if ($PAGE->user_is_editing() && has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) { if ($PAGE->user_is_editing() && has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) {
@ -230,8 +231,9 @@ defined('MOODLE_INTERNAL') || die();
echo '<div class="summary">'; echo '<div class="summary">';
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id); $coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
$summarytext = file_rewrite_pluginfile_urls($thissection->summary, 'pluginfile.php', $coursecontext->id, 'course', 'section', $thissection->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->noclean = true;
$summaryformatoptions->overflowdiv = true;
echo format_text($summarytext, $thissection->summaryformat, $summaryformatoptions); echo format_text($summarytext, $thissection->summaryformat, $summaryformatoptions);
if ($PAGE->user_is_editing() && has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) { if ($PAGE->user_is_editing() && has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) {

View file

@ -54,7 +54,7 @@
echo $OUTPUT->box_start('generalbox info'); echo $OUTPUT->box_start('generalbox info');
$course->summary = file_rewrite_pluginfile_urls($course->summary, 'pluginfile.php', $context->id, 'course', 'summary', NULL); $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)) { if (!empty($CFG->coursecontact)) {
$coursecontactroles = explode(',', $CFG->coursecontact); $coursecontactroles = explode(',', $CFG->coursecontact);

View file

@ -1272,6 +1272,7 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
$labelformatoptions = new stdClass(); $labelformatoptions = new stdClass();
$labelformatoptions->noclean = true; $labelformatoptions->noclean = true;
$labelformatoptions->overflowdiv = true;
/// Casting $course->modinfo to string prevents one notice when the field is null /// Casting $course->modinfo to string prevents one notice when the field is null
$modinfo = get_fast_modinfo($course); $modinfo = get_fast_modinfo($course);
@ -2322,6 +2323,7 @@ function print_course($course, $highlightterms = '') {
$options = NULL; $options = NULL;
$options->noclean = true; $options->noclean = true;
$options->para = false; $options->para = false;
$options->overflowdiv = true;
if (!isset($course->summaryformat)) { if (!isset($course->summaryformat)) {
$course->summaryformat = FORMAT_MOODLE; $course->summaryformat = FORMAT_MOODLE;
} }
@ -2468,6 +2470,7 @@ function print_remote_course($course, $width="100%") {
$options = NULL; $options = NULL;
$options->noclean = true; $options->noclean = true;
$options->para = false; $options->para = false;
$options->overflowdiv = true;
echo format_text($course->summary, $course->summaryformat, $options); echo format_text($course->summary, $course->summaryformat, $options);
echo '</div>'; echo '</div>';
echo '</div>'; echo '</div>';

View file

@ -12,7 +12,7 @@
} }
$PAGE->set_url('/course/report/outline/index.php', array('id'=>$id)); $PAGE->set_url('/course/report/outline/index.php', array('id'=>$id));
$PAGE->set_pagelayout('admin'); $PAGE->set_pagelayout('report');
require_login($course); require_login($course);
$context = get_context_instance(CONTEXT_COURSE, $course->id); $context = get_context_instance(CONTEXT_COURSE, $course->id);
@ -47,6 +47,7 @@
$outlinetable = new html_table(); $outlinetable = new html_table();
$outlinetable->attributes['class'] = 'generaltable boxaligncenter'; $outlinetable->attributes['class'] = 'generaltable boxaligncenter';
$outlinetable->attributes['style'] = 'width:2000px;';
$outlinetable->cellpadding = 5; $outlinetable->cellpadding = 5;
$outlinetable->id = 'outlinetable'; $outlinetable->id = 'outlinetable';
$outlinetable->head = array($stractivity, $strviews); $outlinetable->head = array($stractivity, $strviews);

View file

@ -41,6 +41,7 @@ if (!$course = $DB->get_record('course', array('id' => $courseid))) {
print_error('nocourseid'); print_error('nocourseid');
} }
$PAGE->set_pagelayout('incourse');
require_login($course); require_login($course);
$context = get_context_instance(CONTEXT_COURSE, $course->id); $context = get_context_instance(CONTEXT_COURSE, $course->id);
if (!has_capability('moodle/grade:manage', $context)) { if (!has_capability('moodle/grade:manage', $context)) {

View file

@ -628,7 +628,11 @@ function print_grade_page_head($courseid, $active_type, $active_plugin=null,
$title = $PAGE->course->fullname.': ' . $stractive_plugin; $title = $PAGE->course->fullname.': ' . $stractive_plugin;
} }
$PAGE->set_pagelayout('admin'); if ($active_type == 'report') {
$PAGE->set_pagelayout('report');
} else {
$PAGE->set_pagelayout('admin');
}
$PAGE->set_title(get_string('grades') . ': ' . $stractive_type); $PAGE->set_title(get_string('grades') . ': ' . $stractive_type);
$PAGE->set_heading($title); $PAGE->set_heading($title);
if ($buttons instanceof single_button) { if ($buttons instanceof single_button) {

View file

@ -106,13 +106,15 @@ if (!empty($target) && !empty($action) && confirm_sesskey()) {
$reportname = get_string('pluginname', 'gradereport_grader'); $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 //Initialise the grader report object that produces the table
//the class grade_report_grader_ajax was removed as part of MDL-21562 //the class grade_report_grader_ajax was removed as part of MDL-21562
$report = new grade_report_grader($courseid, $gpr, $context, $page, $sortitemid); $report = new grade_report_grader($courseid, $gpr, $context, $page, $sortitemid);
// make sure separate group does not prevent view // make sure separate group does not prevent view
if ($report->currentgroup == -2) { if ($report->currentgroup == -2) {
print_grade_page_head($COURSE->id, 'report', 'grader', $reportname, false, $buttons);
echo $OUTPUT->heading(get_string("notingroup")); echo $OUTPUT->heading(get_string("notingroup"));
echo $OUTPUT->footer(); echo $OUTPUT->footer();
exit; exit;
@ -136,9 +138,6 @@ $report->load_users();
$numusers = $report->get_numusers(); $numusers = $report->get_numusers();
$report->load_final_grades(); $report->load_final_grades();
/// Print header
print_grade_page_head($COURSE->id, 'report', 'grader', $reportname, false, $buttons);
echo $report->group_selector; echo $report->group_selector;
echo '<div class="clearer"></div>'; echo '<div class="clearer"></div>';
// echo $report->get_toggles_html(); // echo $report->get_toggles_html();

View file

@ -30,6 +30,7 @@ if (!$course = $DB->get_record('course', array('id' => $courseid))) {
print_error('nocourseid'); print_error('nocourseid');
} }
require_login($course); require_login($course);
$PAGE->set_pagelayout('report');
$context = get_context_instance(CONTEXT_COURSE, $course->id); $context = get_context_instance(CONTEXT_COURSE, $course->id);
require_capability('gradereport/user:view', $context); require_capability('gradereport/user:view', $context);
@ -149,5 +150,3 @@ if (has_capability('moodle/grade:viewall', $context)) { //Teachers will see all
} }
echo $OUTPUT->footer(); echo $OUTPUT->footer();

View file

@ -324,7 +324,7 @@ class grade_report_user extends grade_report {
} else { } else {
$data['feedback']['class'] = $class.' feedbacktext'; $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 /// Range

View file

@ -1,36 +1,37 @@
.path-grade-report-user table.user-grade .datesubmitted {font-size: 0.7em;} .path-grade-report-user .user-grade .datesubmitted {font-size: 0.7em;}
.path-grade-report-user table.user-grade .courseitem, .path-grade-report-user .user-grade .courseitem,
.path-grade-report-user table.user-grade .categoryitem {font-weight: bold;} .path-grade-report-user .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 td.cell {padding-left: 5px;padding-right: 5px;}
#graded_users_selector {float: right;text-align: right;} #graded_users_selector {float: right;text-align: right;}
/* this must be last if we want to override other category and course item colors */ /* 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 .user-grade .hidden,
.path-grade-report-user table.user-grade .hidden a {color:#aaaaaa;} .path-grade-report-user .user-grade .hidden a {color:#aaaaaa;}
table.user-grade {border: 1px solid black;margin: auto;padding: 0.25em;font-size: 0.8em;} .user-grade {border: 1px solid black;margin: auto;padding: 0.25em;font-size: 0.8em;}
table.user-grade td {margin: 1px;padding: 0.25em;} .user-grade td {margin: 1px;padding: 0.25em;min-width: 2em;vertical-align: top;}
table.user-grade thead {border-bottom: 3px double black;} .user-grade thead {border-bottom: 3px double black;}
table.user-grade thead th {padding: 0.25em 0.75em;} .user-grade thead th {padding: 0.25em 0.75em;}
table.user-grade td.oddd1 {background-color: #f3dfd0;} .user-grade td.oddd1 {background-color: #f3dfd0;}
table.user-grade td.oddd2 {background-color: #d0dbf3;} .user-grade td.oddd2 {background-color: #d0dbf3;}
table.user-grade td.oddd3 {background-color: #d0f3d6;} .user-grade td.oddd3 {background-color: #d0f3d6;}
table.user-grade td.oddd4 {background-color: #f0f0aa;} .user-grade td.oddd4 {background-color: #f0f0aa;}
table.user-grade td.evend2 {background-color: #b0bbd3;} .user-grade td.evend2 {background-color: #b0bbd3;}
table.user-grade td.evend3 {background-color: #b0dfb6;} .user-grade td.evend3 {background-color: #b0dfb6;}
table.user-grade td.evend4 {background-color: #cac8be;} .user-grade td.evend4 {background-color: #cac8be;}
table.user-grade td.b1t, .user-grade td.b1t,
table.user-grade td.b2t {border-top: 2px solid black;} .user-grade td.b2t {border-top: 2px solid black;}
table.user-grade td.b1r, .user-grade td.b1r,
table.user-grade td.b2r {border-right: 2px solid black;} .user-grade td.b2r {border-right: 2px solid black;}
table.user-grade td.b1b, .user-grade td.b1b,
table.user-grade td.b2b {border-bottom: 2px solid black;} .user-grade td.b2b {border-bottom: 2px solid black;}
table.user-grade td.b1l, .user-grade td.b1l,
table.user-grade td.b2l {border-left: 2px solid black;} .user-grade td.b2l {border-left: 2px solid black;}
table.user-grade td.baggt, .user-grade td.baggt,
table.user-grade td.baggb {font-style: italic;font-weight: bold;} .user-grade td.baggb {font-style: italic;font-weight: bold;}
table.user-grade td.baggt {border-top: 3px double black;} .user-grade td.baggt {border-top: 3px double black;}
table.user-grade td.baggb {border-bottom: 3px double black;} .user-grade td.baggb {border-bottom: 3px double black;}
table.user-grade td.item {border-left: 1px solid gray;border-right: 1px solid gray;} .user-grade td.item {border-left: 1px solid gray;border-right: 1px solid gray;}
table.user-grade td.excluded {background-color: #666;} .user-grade td.excluded {background-color: #666;}
table.user-grade td.hidden {color: #aaa;} .user-grade td.hidden {color: #aaa;}
table.user-grade td {min-width: 0.5em;vertical-align: top;} .user-grade td.feedbacktext {max-width:600px;padding:0;}
.pagelayout-report .user-grade .feedbacktext .no-overflow {overflow:auto;padding:0.25em;}

View file

@ -97,7 +97,9 @@ $group->description = file_rewrite_pluginfile_urls($group->description, 'pluginf
if (!isset($group->descriptionformat)) { if (!isset($group->descriptionformat)) {
$group->descriptionformat = FORMAT_MOODLE; $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)); $groupinfotable->data[] = new html_table_row(array($picturecell, $contentcell));
echo html_writer::table($groupinfotable); echo html_writer::table($groupinfotable);

View file

@ -162,6 +162,7 @@ foreach ($members as $gpgid=>$groupdata) {
$description = file_rewrite_pluginfile_urls($groups[$gpid]->description, 'pluginfile.php', $context->id, 'group', 'description', $gpid); $description = file_rewrite_pluginfile_urls($groups[$gpid]->description, 'pluginfile.php', $context->id, 'group', 'description', $gpid);
$options = new stdClass; $options = new stdClass;
$options->noclean = true; $options->noclean = true;
$options->overflowdiv = true;
$jsdescription = trim(format_text($description, $groups[$gpid]->descriptionformat, $options)); $jsdescription = trim(format_text($description, $groups[$gpid]->descriptionformat, $options));
if (empty($jsdescription)) { if (empty($jsdescription)) {
$line[] = $name; $line[] = $name;
@ -187,6 +188,7 @@ foreach ($members as $gpgid=>$groupdata) {
$description = file_rewrite_pluginfile_urls($groupings[$gpgid]->description, 'pluginfile.php', $context->id, 'grouping', 'description', $gpgid); $description = file_rewrite_pluginfile_urls($groupings[$gpgid]->description, 'pluginfile.php', $context->id, 'grouping', 'description', $gpgid);
$options = new stdClass; $options = new stdClass;
$options->noclean = true; $options->noclean = true;
$options->overflowdiv = true;
echo $OUTPUT->box(format_text($description, $groupings[$gpgid]->descriptionformat, $options), 'generalbox boxwidthnarrow boxaligncenter'); echo $OUTPUT->box(format_text($description, $groupings[$gpgid]->descriptionformat, $options), 'generalbox boxwidthnarrow boxaligncenter');
} }
echo html_writer::table($table); echo html_writer::table($table);

View file

@ -65,6 +65,7 @@ if ($sm->string_exists($identifier.'_help', $component)) {
$options->filter = false; $options->filter = false;
$options->para = true; $options->para = true;
$options->newlines = false; $options->newlines = false;
$options->overflowdiv = !$ajax;
echo $OUTPUT->heading(format_string(get_string($identifier, $component)), 1, 'helpheading'); echo $OUTPUT->heading(format_string(get_string($identifier, $component)), 1, 'helpheading');
// Should be simple wiki only MDL-21695 // Should be simple wiki only MDL-21695

View file

@ -117,6 +117,7 @@
$summarytext = file_rewrite_pluginfile_urls($section->summary, 'pluginfile.php', $context->id, 'course', 'section', $section->id); $summarytext = file_rewrite_pluginfile_urls($section->summary, 'pluginfile.php', $context->id, 'course', 'section', $section->id);
$summaryformatoptions = new stdClass(); $summaryformatoptions = new stdClass();
$summaryformatoptions->noclean = true; $summaryformatoptions->noclean = true;
$summaryformatoptions->overflowdiv = true;
echo format_text($summarytext, $section->summaryformat, $summaryformatoptions); echo format_text($summarytext, $section->summaryformat, $summaryformatoptions);

View file

@ -5526,8 +5526,10 @@ class admin_setting_manageportfolio extends admin_setting {
* added to the turn blocks editing on/off form, so this page reloads correctly. * 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 * @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. * 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; global $CFG, $PAGE, $USER, $SITE, $OUTPUT;
$PAGE->set_context(null); // hack - set context to something, by default to system context $PAGE->set_context(null); // hack - set context to something, by default to system context
@ -5549,7 +5551,10 @@ function admin_externalpage_setup($section, $extrabutton = '', array $extraurlpa
die; 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'); $PAGE->set_pagelayout('maintenance');
} else { } else {
$PAGE->set_pagelayout('admin'); $PAGE->set_pagelayout('admin');

View file

@ -838,6 +838,9 @@ class moodle_page {
* in the standard theme. * in the standard theme.
*/ */
public function set_pagelayout($pagelayout) { 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; $this->_pagelayout = $pagelayout;
} }
@ -1203,11 +1206,6 @@ class moodle_page {
public function initialise_theme_and_output() { public function initialise_theme_and_output() {
global $OUTPUT, $PAGE, $SITE; 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)) { if (!empty($this->_wherethemewasinitialised)) {
return; return;
} }

View file

@ -1187,7 +1187,7 @@ class flexible_table {
$this->wrap_html_start(); $this->wrap_html_start();
// Start of main data table // 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).'>'; echo '<table'.$this->make_attributes_string($this->attributes).'>';
} }

View file

@ -940,6 +940,19 @@ function format_text_menu() {
* This function should mainly be used for long strings like posts, * This function should mainly be used for long strings like posts,
* answers, glossary items etc. For short strings @see format_string(). * 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 * @todo Finish documenting this function
* *
* @staticvar array $croncache * @staticvar array $croncache
@ -983,6 +996,9 @@ function format_text($text, $format = FORMAT_MOODLE, $options = NULL, $courseid_
if (!isset($options['newlines'])) { if (!isset($options['newlines'])) {
$options['newlines'] = true; $options['newlines'] = true;
} }
if (!isset($options['overflowdiv'])) {
$options['overflowdiv'] = false;
}
// Calculate best context // Calculate best context
if (empty($CFG->version) or $CFG->version < 2010072800 or during_initial_install()) { if (empty($CFG->version) or $CFG->version < 2010072800 or during_initial_install()) {
@ -1092,6 +1108,10 @@ function format_text($text, $format = FORMAT_MOODLE, $options = NULL, $courseid_
'relies on it. Please seek out and destroy that filter code.', DEBUG_DEVELOPER); '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 (empty($options['nocache']) and !empty($CFG->cachetext)) {
if (CLI_SCRIPT) { if (CLI_SCRIPT) {
// special static cron cache - no need to store it in db if its not already there // special static cron cache - no need to store it in db if its not already there
@ -1367,7 +1387,7 @@ function format_module_intro($module, $activity, $cmid, $filter=true) {
global $CFG; global $CFG;
require_once("$CFG->libdir/filelib.php"); require_once("$CFG->libdir/filelib.php");
$context = get_context_instance(CONTEXT_MODULE, $cmid); $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); $intro = file_rewrite_pluginfile_urls($activity->intro, 'pluginfile.php', $context->id, 'mod_'.$module, 'intro', null);
return trim(format_text($intro, $activity->introformat, $options, null)); return trim(format_text($intro, $activity->introformat, $options, null));
} }

View file

@ -67,6 +67,7 @@ if (!empty($course->summary)) {
$options->para = false; $options->para = false;
$options->filter = false; $options->filter = false;
$options->noclean = false; $options->noclean = false;
$options->overflowdiv = true;
print_collapsible_region_start('remotecourse summary', 'remotecourse-summary', get_string('coursesummary'), false, true); print_collapsible_region_start('remotecourse summary', 'remotecourse-summary', get_string('coursesummary'), false, true);
echo format_text($course->summary, $course->summaryformat, $options, $course->id); echo format_text($course->summary, $course->summaryformat, $options, $course->id);
print_collapsible_region_end(); print_collapsible_region_end();

View file

@ -10,8 +10,6 @@
.path-mod-assignment .feedback .from {float: left;} .path-mod-assignment .feedback .from {float: left;}
.path-mod-assignment .files img {margin-right: 4px;} .path-mod-assignment .files img {margin-right: 4px;}
.path-mod-assignment .files a {white-space:nowrap;} .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;} .path-mod-assignment .late {color: red;}
/** Styles for submissions.php **/ /** Styles for submissions.php **/

View file

@ -133,7 +133,7 @@ foreach ($views as $view) {
//submission part //submission part
echo $OUTPUT->container_start('generalbox submission'); echo $OUTPUT->container_start('generalbox submission');
echo '<div class="submissiondate">'.$view->submissiondate.'</div>'; echo '<div class="submissiondate">'.$view->submissiondate.'</div>';
echo "<p>$view->submissiontext</p>\n"; echo "<p class='no-overflow'>$view->submissiontext</p>\n";
echo "<p>$view->editlink</p>\n"; echo "<p>$view->editlink</p>\n";
echo $OUTPUT->container_end(); echo $OUTPUT->container_end();

View file

@ -100,7 +100,7 @@ class assignment_online extends assignment_base {
echo $OUTPUT->box_start('generalbox boxwidthwide boxaligncenter', 'online'); echo $OUTPUT->box_start('generalbox boxwidthwide boxaligncenter', 'online');
if ($submission && has_capability('mod/assignment:exportownsubmission', $this->context)) { 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); $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) { if ($CFG->enableportfolios) {
require_once($CFG->libdir . '/portfoliolib.php'); require_once($CFG->libdir . '/portfoliolib.php');
$button = new portfolio_add_button(); $button = new portfolio_add_button();
@ -233,7 +233,7 @@ class assignment_online extends assignment_base {
$wordcount .= '</p>'; $wordcount .= '</p>';
$text = file_rewrite_pluginfile_urls($submission->data1, 'pluginfile.php', $this->context->id, 'mod_assignment', $this->filearea, $submission->id); $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));
} }

View file

@ -60,7 +60,7 @@ if ($submission = $assignmentinstance->get_submission($user->id)) {
echo $OUTPUT->box_end(); echo $OUTPUT->box_end();
$text = file_rewrite_pluginfile_urls($submission->data1, 'pluginfile.php', $context->id, 'mod_assignment', $assignmentinstance->filearea, $submission->id); $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'); echo $OUTPUT->box(format_text($text, $submission->data2, array('overflowdiv'=>true)), 'generalbox boxaligncenter boxwidthwide');
echo $OUTPUT->close_window_button(); echo $OUTPUT->close_window_button();
echo $OUTPUT->footer(); echo $OUTPUT->footer();
} else { } else {

View file

@ -211,7 +211,7 @@ class assignment_upload extends assignment_base {
if ($submission = $this->get_submission($USER->id) if ($submission = $this->get_submission($USER->id)
and !empty($submission->data1)) { 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 { } else {
echo $OUTPUT->box(get_string('notesempty', 'assignment'), 'generalbox boxaligncenter'); echo $OUTPUT->box(get_string('notesempty', 'assignment'), 'generalbox boxaligncenter');
} }

View file

@ -53,7 +53,7 @@ if ($submission = $assignmentinstance->get_submission($user->id)
$PAGE->set_title(fullname($user,true).': '.$assignment->name); $PAGE->set_title(fullname($user,true).': '.$assignment->name);
echo $OUTPUT->header(); echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('notes', 'assignment').' - '.fullname($user,true)); echo $OUTPUT->heading(get_string('notes', 'assignment').' - '.fullname($user,true));
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');
if ($mode != 'single') { if ($mode != 'single') {
echo $OUTPUT->close_window_button(); echo $OUTPUT->close_window_button();
} else { } else {

View file

@ -141,6 +141,6 @@ foreach ($datas as $data) {
} }
echo "<br />"; echo "<br />";
echo html_writer::table($table); echo html_writer::tag('div', html_writer::table($table), array('class'=>'no-overflow'));
echo $OUTPUT->footer(); echo $OUTPUT->footer();

View file

@ -315,7 +315,7 @@
if(isset($savereturn) && $savereturn == 'saved') { if(isset($savereturn) && $savereturn == 'saved') {
if($feedback->page_after_submit) { if($feedback->page_after_submit) {
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide'); 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(); echo $OUTPUT->box_end();
} else { } else {
echo '<p align="center"><b><font color="green">'.get_string('entries_saved','feedback').'</font></b></p>'; echo '<p align="center"><b><font color="green">'.get_string('entries_saved','feedback').'</font></b></p>';

View file

@ -282,7 +282,7 @@
if(isset($savereturn) && $savereturn == 'saved') { if(isset($savereturn) && $savereturn == 'saved') {
if($feedback->page_after_submit) { if($feedback->page_after_submit) {
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide'); 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(); echo $OUTPUT->box_end();
} else { } else {
echo '<p align="center"><b><font color="green">'.get_string('entries_saved','feedback').'</font></b></p>'; echo '<p align="center"><b><font color="green">'.get_string('entries_saved','feedback').'</font></b></p>';

View file

@ -129,7 +129,7 @@ class feedback_item_label extends feedback_item_base {
$item->presentationtrust = 1; $item->presentationtrust = 1;
$output = file_rewrite_pluginfile_urls($item->presentation, 'pluginfile.php', $context->id, 'mod_feedback', $filearea, $item->id); $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));
} }
/** /**

View file

@ -168,7 +168,7 @@ echo $OUTPUT->box_end();
if(has_capability('mod/feedback:edititems', $context)) { if(has_capability('mod/feedback:edititems', $context)) {
echo $OUTPUT->heading(get_string("page_after_submit", "feedback"), 4); echo $OUTPUT->heading(get_string("page_after_submit", "feedback"), 4);
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide'); 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(); echo $OUTPUT->box_end();
} }

View file

@ -3121,13 +3121,11 @@ function forum_make_mail_post($course, $cm, $forum, $discussion, $post, $userfro
* @return void * @return void
*/ */
function forum_print_post($post, $discussion, $forum, &$cm, $course, $ownpost=false, $reply=false, $link=false, 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; global $USER, $CFG, $OUTPUT;
static $stredit, $strdelete, $strreply, $strparent, $strprune; // String cache
static $strpruneheading, $displaymode; static $str;
static $strmarkread, $strmarkunread;
$modcontext = get_context_instance(CONTEXT_MODULE, $cm->id); $modcontext = get_context_instance(CONTEXT_MODULE, $cm->id);
@ -3137,7 +3135,7 @@ function forum_print_post($post, $discussion, $forum, &$cm, $course, $ownpost=fa
// caching // caching
if (!isset($cm->cache)) { if (!isset($cm->cache)) {
$cm->cache = new stdClass(); $cm->cache = new stdClass;
} }
if (!isset($cm->cache->caps)) { if (!isset($cm->cache->caps)) {
@ -3157,103 +3155,72 @@ function forum_print_post($post, $discussion, $forum, &$cm, $course, $ownpost=fa
$cm->uservisible = coursemodule_visible_for_user($cm); $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)) { if (!forum_user_can_see_post($forum, $discussion, $post, NULL, $cm)) {
$output = '';
if (!$dummyifcantsee) { if (!$dummyifcantsee) {
if ($return) {
return $output;
}
echo $output;
return; return;
} }
echo '<a id="p'.$post->id.'"></a>'; $output .= html_writer::tag('a', '', array('id'=>'p'.$post->id));
echo '<table cellspacing="0" class="forumpost">'; $output .= html_writer::start_tag('div', array('class'=>'forumpost clearfix '.$forumpostclass));
echo '<tr class="header"><td class="picture left">'; $output .= html_writer::start_tag('div', array('class'=>'row header'));
// print_user_picture($post->userid, $courseid, $post->picture); $output .= html_writer::tag('div', '', array('class'=>'left picture')); // Picture
echo '</td>';
if ($post->parent) { if ($post->parent) {
echo '<td class="topic">'; $output .= html_writer::start_tag('div', array('class'=>'topic'));
} else { } 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>'; $output .= html_writer::tag('div', get_string('forumsubjecthidden','forum'), array('class'=>'subject')); // Subject
echo '<div class="author">'; $output .= html_writer::tag('div', get_string('forumauthorhidden','forum'), array('class'=>'author')); // author
print_string('forumauthorhidden','forum'); $output .= html_writer::end_tag('div'); // row
echo '</div></td></tr>'; $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">'; if ($return) {
echo '&nbsp;'; return $output;
}
// Actual content echo $output;
echo '</td><td class="content">'."\n";
echo get_string('forumbodyhidden','forum');
echo '</td></tr></table>';
return; return;
} }
if (empty($stredit)) { if (empty($str)) {
$stredit = get_string('edit', 'forum'); $str = new stdClass;
$strdelete = get_string('delete', 'forum'); $str->edit = get_string('edit', 'forum');
$strreply = get_string('reply', 'forum'); $str->delete = get_string('delete', 'forum');
$strparent = get_string('parent', 'forum'); $str->reply = get_string('reply', 'forum');
$strpruneheading = get_string('pruneheading', 'forum'); $str->parent = get_string('parent', 'forum');
$strprune = get_string('prune', 'forum'); $str->pruneheading = get_string('pruneheading', 'forum');
$displaymode = get_user_preferences('forum_displaymode', $CFG->forum_displaymode); $str->prune = get_string('prune', 'forum');
$strmarkread = get_string('markread', 'forum'); $str->displaymode = get_user_preferences('forum_displaymode', $CFG->forum_displaymode);
$strmarkunread = get_string('markunread', 'forum'); $str->markread = get_string('markread', 'forum');
$str->markunread = get_string('markunread', 'forum');
} }
$read_style = ''; $discussionlink = new moodle_url('/mod/forum/discuss.php', array('d'=>$post->discussion));
// 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);
}
if ($post_read) { // Build an object that represents the posting user
$read_style = ' read'; $postuser = new stdClass;
} 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();
$postuser->id = $post->userid; $postuser->id = $post->userid;
$postuser->firstname = $post->firstname; $postuser->firstname = $post->firstname;
$postuser->lastname = $post->lastname; $postuser->lastname = $post->lastname;
$postuser->imagealt = $post->imagealt; $postuser->imagealt = $post->imagealt;
$postuser->picture = $post->picture; $postuser->picture = $post->picture;
$postuser->email = $post->email; $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">'; // Prepare the groups the posting user belongs to
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">';
if (isset($cm->cache->usersgroups)) { if (isset($cm->cache->usersgroups)) {
$groups = array(); $groups = array();
if (isset($cm->cache->usersgroups[$post->userid])) { if (isset($cm->cache->usersgroups[$post->userid])) {
@ -3265,117 +3232,67 @@ function forum_print_post($post, $discussion, $forum, &$cm, $course, $ownpost=fa
$groups = groups_get_all_groups($course->id, $post->userid, $cm->groupingid); $groups = groups_get_all_groups($course->id, $post->userid, $cm->groupingid);
} }
if ($groups) { // Prepare the attachements for the post, files then images
print_group_picture($groups, $course->id, false, false, true);
} else {
echo '&nbsp;';
}
// Actual content
echo '</td><td class="content">'."\n";
list($attachments, $attachedimages) = forum_print_attachments($post, $cm, 'separateimages'); list($attachments, $attachedimages) = forum_print_attachments($post, $cm, 'separateimages');
if ($attachments !== '') { // Determine if we need to shorten this post
echo '<div class="attachments">'; $shortenpost = ($link && (strlen(strip_tags($post->message)) > $CFG->forum_longpost));
echo $attachments;
echo '</div>';
}
$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(); $commands = array();
if ($istracked) { // SPECIAL CASE: The front page can display a news item post to non-logged in users.
// 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.
// Don't display the mark read / unread controls in this case. if ($istracked && $CFG->forum_usermarksread && isloggedin()) {
if ($CFG->forum_usermarksread and isloggedin()) { $url = new moodle_url($discussionlink, array('postid'=>$post->id, 'mark'=>'unread'));
if ($post_read) { $text = $str->markunread;
$mcmd = '&amp;mark=unread&amp;postid='.$post->id; if (!$postisread) {
$mtxt = $strmarkunread; $url->param('mark', 'read');
} else { $text = $str->markread;
$mcmd = '&amp;mark=read&amp;postid='.$post->id;
$mtxt = $strmarkread;
}
if ($displaymode == FORUM_MODE_THREADED) {
$commands[] = '<a href="'.$CFG->wwwroot.'/mod/forum/discuss.php?d='.
$post->discussion.'&amp;parent='.$post->id.$mcmd.'">'.$mtxt.'</a>';
} else {
$commands[] = '<a href="'.$CFG->wwwroot.'/mod/forum/discuss.php?d='.
$post->discussion.$mcmd.'#p'.$post->id.'">'.$mtxt.'</a>';
}
} }
} if ($str->displaymode == FORUM_MODE_THREADED) {
$url->param('parent', $post->parent);
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>';
} else { } else {
$commands[] = '<a href="'.$CFG->wwwroot.'/mod/forum/discuss.php?d='. $url->set_anchor('p'.$post->id);
$post->discussion.'#p'.$post->parent.'">'.$strparent.'</a>';
} }
$commands[] = array('url'=>$url, 'text'=>$text);
}
// 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 {
$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 // 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; $age = 0;
} }
$editanypost = $cm->cache->caps['mod/forum:editanypost']; 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 ($ownpost or $editanypost) {
if (($age < $CFG->maxeditingtime) or $editanypost) {
$commands[] = '<a href="'.$CFG->wwwroot.'/mod/forum/post.php?edit='.$post->id.'">'.$stredit.'</a>';
}
} }
if ($cm->cache->caps['mod/forum:splitdiscussions'] if ($cm->cache->caps['mod/forum:splitdiscussions'] && $post->parent && $forum->type != 'single') {
&& $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);
$commands[] = '<a href="'.$CFG->wwwroot.'/mod/forum/post.php?prune='.$post->id.
'" title="'.$strpruneheading.'">'.$strprune.'</a>';
} }
if (($ownpost and $age < $CFG->maxeditingtime if (($ownpost && $age < $CFG->maxeditingtime && $cm->cache->caps['mod/forum:deleteownpost']) || $cm->cache->caps['mod/forum:deleteanypost']) {
and $cm->cache->caps['mod/forum:deleteownpost']) $commands[] = array('url'=>new moodle_url('/mod/forum/post.php', array('delete'=>$post->id)), 'text'=>$str->delete);
or $cm->cache->caps['mod/forum:deleteanypost']) {
$commands[] = '<a href="'.$CFG->wwwroot.'/mod/forum/post.php?delete='.$post->id.'">'.$strdelete.'</a>';
} }
if ($reply) { 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'])) { if ($cm->cache->caps['mod/forum:exportpost'] || ($ownpost && $cm->cache->caps['mod/forum:exportownpost'])) {
$p = array( $p = array('postid' => $post->id);
'postid' => $post->id,
);
require_once($CFG->libdir.'/portfoliolib.php'); require_once($CFG->libdir.'/portfoliolib.php');
$button = new portfolio_add_button(); $button = new portfolio_add_button();
$button->set_callback_options('forum_portfolio_caller', array('postid' => $post->id), '/mod/forum/locallib.php'); $button->set_callback_options('forum_portfolio_caller', array('postid' => $post->id), '/mod/forum/locallib.php');
@ -3390,39 +3307,151 @@ function forum_print_post($post, $discussion, $forum, &$cm, $course, $ownpost=fa
$commands[] = $porfoliohtml; $commands[] = $porfoliohtml;
} }
} }
// Finished building commands
echo '<div class="commands">';
echo implode(' | ', $commands);
echo '</div>';
// Ratings // Begin output
if (!empty($post->rating)) {
echo html_writer::tag('div', $OUTPUT->render($post->rating), array('class'=>'forum-post-rating')); 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 = '';
} }
// Link to post if required $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)) {
$output .= html_writer::tag('div', $OUTPUT->render($post->rating), array('class'=>'forum-post-rating'));
}
// 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) { if ($link) {
echo '<div class="link">';
if ($post->replies == 1) { if ($post->replies == 1) {
$replystring = get_string('repliesone', 'forum', $post->replies); $replystring = get_string('repliesone', 'forum', $post->replies);
} else { } else {
$replystring = get_string('repliesmany', 'forum', $post->replies); $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.')'; $output .= html_writer::start_tag('div', array('class'=>'link'));
echo '</div>'; $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) { 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); forum_tp_mark_post_read($USER->id, $post, $forum->id);
} }
if ($return) {
return $output;
}
echo $output;
return;
} }
/** /**

View file

@ -1,14 +1,54 @@
/** General Styles **/ /**
.forumpost {border-width:1px;border-style:solid;border-collapse:separate;margin-top: 10px;} * Structure of a forum post
.forumpost .topic {padding: 4px;border-style:solid;border-width: 0px;border-bottom-width: 1px;} * div.forumpost(.read.unread)
.forumpost .commands, * div.header.row
.forumpost .ratings, * div.picture.left
.forumpost .attachments, * div.topic(.starter)
.forumpost .footer, * div.subject
.forumpost .link, * 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, .path-mod-forum .forumolddiscuss,
#page-mod-forum-search .c0 {text-align:right;} #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 .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 {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;} .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-view .groupmenu {float: left;text-align:left;white-space: nowrap;}
#page-mod-forum-index .subscription, #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 .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 */ /** Styles for search.php */
#page-mod-forum-search .introcontent {padding: 15px;font-weight:bold;} #page-mod-forum-search .introcontent {padding: 15px;font-weight:bold;}
@ -48,6 +87,4 @@
#page-mod-forum-view .unread img {margin-left: 5px;} #page-mod-forum-view .unread img {margin-left: 5px;}
/** Unknown Styles ??? */ /** Unknown Styles ??? */
#user-view .forumpost,
.course .forumpost {width: 100%;}
#email .unsubscribelink {margin-top:20px;} #email .unsubscribelink {margin-top:20px;}

View file

@ -846,6 +846,7 @@ function glossary_print_entry_default ($entry, $glossary, $cm) {
$options->para = false; $options->para = false;
$options->trusted = $entry->definitiontrust; $options->trusted = $entry->definitiontrust;
$options->context = $context; $options->context = $context;
$options->overflowdiv = true;
$definition = format_text($definition, $entry->definitionformat, $options); $definition = format_text($definition, $entry->definitionformat, $options);
echo ($definition); echo ($definition);
echo '<br /><br />'; echo '<br /><br />';
@ -873,22 +874,19 @@ function glossary_print_entry_concept($entry, $return=false) {
/** /**
* *
* @global object * @global moodle_database DB
* @global array
* @param object $entry * @param object $entry
* @param object $glossary * @param object $glossary
* @param object $cm * @param object $cm
*/ */
function glossary_print_entry_definition($entry, $glossary, $cm) { function glossary_print_entry_definition($entry, $glossary, $cm) {
global $DB; global $DB, $GLOSSARY_EXCLUDECONCEPTS;
$definition = $entry->definition; $definition = $entry->definition;
global $GLOSSARY_EXCLUDECONCEPTS;
//Calculate all the strings to be no-linked //Calculate all the strings to be no-linked
//First, the concept //First, the concept
$GLOSSARY_EXCLUDECONCEPTS=array($entry->concept); $GLOSSARY_EXCLUDECONCEPTS = array($entry->concept);
//Now the aliases //Now the aliases
if ( $aliases = $DB->get_records('glossary_alias', array('entryid'=>$entry->id))) { if ( $aliases = $DB->get_records('glossary_alias', array('entryid'=>$entry->id))) {
foreach ($aliases as $alias) { foreach ($aliases as $alias) {
@ -903,6 +901,7 @@ function glossary_print_entry_definition($entry, $glossary, $cm) {
$options->para = false; $options->para = false;
$options->trusted = $entry->definitiontrust; $options->trusted = $entry->definitiontrust;
$options->context = $context; $options->context = $context;
$options->overflowdiv = true;
$text = format_text($definition, $entry->definitionformat, $options); $text = format_text($definition, $entry->definitionformat, $options);
// Stop excluding concepts from autolinking // Stop excluding concepts from autolinking

View file

@ -391,6 +391,7 @@ class glossary_entry_portfolio_caller extends portfolio_module_caller_base {
$entry->definition = portfolio_rewrite_pluginfile_urls($entry->definition, $context->id, 'mod_glossary', 'entry', $entry->id, $format); $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); $output .= format_text($entry->definition, $entry->definitionformat, $options);
if (isset($entry->footer)) { if (isset($entry->footer)) {
$output .= $entry->footer; $output .= $entry->footer;

View file

@ -2020,6 +2020,7 @@ abstract class lesson_page extends lesson_base {
$options = new stdClass; $options = new stdClass;
$options->noclean = true; $options->noclean = true;
$options->para = true; $options->para = true;
$options->overflowdiv = true;
$result->feedback = $OUTPUT->box(format_text($this->get_contents(), $this->properties->contentsformat, $options), 'generalbox boxaligncenter'); $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 .= '<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 $result->feedback .= $OUTPUT->box($result->response, $class); // already conerted to HTML

View file

@ -361,6 +361,7 @@ class lesson_page_type_multichoice extends lesson_page {
$answers = $this->get_used_answers(); $answers = $this->get_used_answers();
$formattextdefoptions = new stdClass; $formattextdefoptions = new stdClass;
$formattextdefoptions->para = false; //I'll use it widely in this page $formattextdefoptions->para = false; //I'll use it widely in this page
foreach ($answers as $answer) { foreach ($answers as $answer) {
if ($this->properties->qoption) { if ($this->properties->qoption) {
if ($useranswer == NULL) { if ($useranswer == NULL) {

View file

@ -384,6 +384,7 @@ if ($action === 'delete') {
$formattextdefoptions = new stdClass; $formattextdefoptions = new stdClass;
$formattextdefoptions->para = false; //I'll use it widely in this page $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 $userid = optional_param('userid', NULL, PARAM_INT); // if empty, then will display the general detailed view
$try = optional_param('try', NULL, PARAM_INT); $try = optional_param('try', NULL, PARAM_INT);
@ -442,6 +443,7 @@ if ($action === 'delete') {
$options = new stdClass; $options = new stdClass;
$options->noclean = true; $options->noclean = true;
$options->overflowdiv = true;
$answerpage->contents = format_text($page->contents, $page->contentsformat, $options); $answerpage->contents = format_text($page->contents, $page->contentsformat, $options);
$answerpage->qtype = $qtypes[$page->qtype].$page->option_description_string(); $answerpage->qtype = $qtypes[$page->qtype].$page->option_description_string();

View file

@ -91,7 +91,7 @@ if (!empty($options['printintro'])) {
} }
$content = file_rewrite_pluginfile_urls($page->content, 'pluginfile.php', $context->id, 'mod_page', 'content', $page->revision); $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); $content = format_text($content, $page->contentformat, $formatoptions, $course->id);
echo $OUTPUT->box($content, "generalbox center clearfix"); echo $OUTPUT->box($content, "generalbox center clearfix");

View file

@ -44,6 +44,7 @@
require_login($course, false, $cm); require_login($course, false, $cm);
$context = get_context_instance(CONTEXT_MODULE, $cm->id); $context = get_context_instance(CONTEXT_MODULE, $cm->id);
$PAGE->set_pagelayout('report');
$reportlist = quiz_report_list($context); $reportlist = quiz_report_list($context);
if (count($reportlist)==0){ if (count($reportlist)==0){

View file

@ -402,14 +402,14 @@ class quiz_overview_report extends quiz_default_report {
$imageurl = "{$CFG->wwwroot}/mod/quiz/report/overview/overviewgraph.php?id={$quiz->id}&amp;groupid=$currentgroup"; $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)); $graphname = get_string('overviewreportgraphgroup', 'quiz_overview', groups_get_group_name($currentgroup));
echo $OUTPUT->heading($graphname); 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))) { if ($DB->record_exists('quiz_grades', array('quiz'=> $quiz->id))) {
$graphname = get_string('overviewreportgraph', 'quiz_overview'); $graphname = get_string('overviewreportgraph', 'quiz_overview');
$imageurl = $CFG->wwwroot.'/mod/quiz/report/overview/overviewgraph.php?id='.$quiz->id; $imageurl = $CFG->wwwroot.'/mod/quiz/report/overview/overviewgraph.php?id='.$quiz->id;
echo $OUTPUT->heading($graphname); 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; return true;

View file

@ -230,7 +230,7 @@ class quiz_statistics_report extends quiz_default_report {
echo $OUTPUT->heading(get_string('questioninformation', 'quiz_statistics')); echo $OUTPUT->heading(get_string('questioninformation', 'quiz_statistics'));
echo html_writer::table($questioninfotable); 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 $OUTPUT->heading(get_string('questionstatistics', 'quiz_statistics'));
echo html_writer::table($questionstatstable); echo html_writer::table($questionstatstable);
@ -356,7 +356,7 @@ class quiz_statistics_report extends quiz_default_report {
$quizinformationtable = new html_table(); $quizinformationtable = new html_table();
$quizinformationtable->align = array('center', 'center'); $quizinformationtable->align = array('center', 'center');
$quizinformationtable->width = '60%'; $quizinformationtable->width = '60%';
$quizinformationtable->class = 'generaltable titlesleft'; $quizinformationtable->attributes['class'] = 'generaltable titlesleft boxaligncenter';
$quizinformationtable->data = array(); $quizinformationtable->data = array();
$quizinformationtable->data[] = array(get_string('quizname', 'quiz_statistics'), $quiz->name); $quizinformationtable->data[] = array(get_string('quizname', 'quiz_statistics'), $quiz->name);
$quizinformationtable->data[] = array(get_string('coursename', 'quiz_statistics'), $course->fullname); $quizinformationtable->data[] = array(get_string('coursename', 'quiz_statistics'), $course->fullname);

View file

@ -1,4 +1,3 @@
.path-mod-quiz #tablecontainer .flexible-wrap {overflow:auto;}
.path-mod-quiz .graph.flexible-wrap {text-align:center;overflow:auto;} .path-mod-quiz .graph.flexible-wrap {text-align:center;overflow:auto;}
#page-mod-quiz-comment #manualgradingform, #page-mod-quiz-comment #manualgradingform,

View file

@ -45,6 +45,10 @@ $version = optional_param('version', -1, PARAM_INT);
$attachments = optional_param('attachments', 0, PARAM_INT); $attachments = optional_param('attachments', 0, PARAM_INT);
$deleteuploads = optional_param('deleteuploads', 0, PARAM_RAW); $deleteuploads = optional_param('deleteuploads', 0, PARAM_RAW);
if (is_array($newcontent)) {
$newcontent = $newcontent['text'];
}
if (!$page = wiki_get_page($pageid)) { if (!$page = wiki_get_page($pageid)) {
print_error('incorrectpageid', 'wiki'); print_error('incorrectpageid', 'wiki');
} }

View file

@ -1190,7 +1190,7 @@ function wiki_print_page_content($page, $context, $subwikiid) {
} }
} }
$html = file_rewrite_pluginfile_urls($page->cachedcontent, 'pluginfile.php', $context->id, 'mod_wiki', 'attachments', $subwikiid); $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); echo $OUTPUT->box($html);
if (!empty($CFG->usetags)) { if (!empty($CFG->usetags)) {

View file

@ -589,7 +589,7 @@ class page_wiki_edit extends page_wiki {
file_save_draft_area_files($this->attachments, $context->id, 'mod_wiki', 'attachments', $this->subwiki->id); file_save_draft_area_files($this->attachments, $context->id, 'mod_wiki', 'attachments', $this->subwiki->id);
return null; return null;
//return wiki_process_attachments($this->attachments, $this->deleteuploads, $context->id, 'mod_wiki', 'attachments', $this->subwiki->id); //return wiki_process_attachments($this->attachments, $this->deleteuploads, $context->id, 'mod_wiki', 'attachments', $this->subwiki->id);
} }
} }
} }
@ -694,7 +694,7 @@ class page_wiki_comments extends page_wiki {
$t->data[] = $row3; $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 @@ class page_wiki_preview extends page_wiki_edit {
$parseroutput = wiki_parse_content($data->contentformat, $data->newcontent_editor['text'], $options); $parseroutput = wiki_parse_content($data->contentformat, $data->newcontent_editor['text'], $options);
$this->set_newcontent($data->newcontent_editor['text']); $this->set_newcontent($data->newcontent_editor['text']);
echo $OUTPUT->notification(get_string('previewwarning', 'wiki'), 'notifyproblem wiki_info'); 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'); echo $OUTPUT->box($content, 'generalbox wiki_previewbox');
$content = $this->newcontent; $content = $this->newcontent;
} }
@ -2080,7 +2080,7 @@ class page_wiki_viewversion extends page_wiki {
print_container($heading, false, 'mdl-align wiki_modifieduser wiki_headingtime'); print_container($heading, false, 'mdl-align wiki_modifieduser wiki_headingtime');
$options = array('swid' => $this->subwiki->id, 'pretty_print' => true, 'pageid' => $this->page->id); $options = array('swid' => $this->subwiki->id, 'pretty_print' => true, 'pageid' => $this->page->id);
$parseroutput = wiki_parse_content($pageversion->contentformat, $pageversion->content, $options); $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'); echo $OUTPUT->box($content, 'generalbox wiki_contentbox');
} else { } else {

View file

@ -67,6 +67,7 @@ class mod_wiki_renderer extends plugin_renderer_base {
$table->colclasses = array('wikisearchresults'); $table->colclasses = array('wikisearchresults');
$html .= html_writer::table($table); $html .= html_writer::table($table);
} }
$html = html_writer::tag('div', $html, array('class'=>'no-overflow'));
return $this->output->container($html); return $this->output->container($html);
} }

View file

@ -178,7 +178,7 @@ if (trim($workshop->instructreviewers)) {
$instructions = file_rewrite_pluginfile_urls($workshop->instructreviewers, 'pluginfile.php', $PAGE->context->id, $instructions = file_rewrite_pluginfile_urls($workshop->instructreviewers, 'pluginfile.php', $PAGE->context->id,
'mod_workshop', 'instructreviewers', 0, workshop::instruction_editors_options($PAGE->context)); 'mod_workshop', 'instructreviewers', 0, workshop::instruction_editors_options($PAGE->context));
print_collapsible_region_start('', 'workshop-viewlet-instructreviewers', get_string('instructreviewers', 'workshop')); 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(); print_collapsible_region_end();
} }

View file

@ -115,7 +115,7 @@ if (trim($workshop->instructreviewers)) {
$instructions = file_rewrite_pluginfile_urls($workshop->instructreviewers, 'pluginfile.php', $PAGE->context->id, $instructions = file_rewrite_pluginfile_urls($workshop->instructreviewers, 'pluginfile.php', $PAGE->context->id,
'mod_workshop', 'instructreviewers', 0, workshop::instruction_editors_options($PAGE->context)); 'mod_workshop', 'instructreviewers', 0, workshop::instruction_editors_options($PAGE->context));
print_collapsible_region_start('', 'workshop-viewlet-instructreviewers', get_string('instructreviewers', 'workshop')); 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(); print_collapsible_region_end();
} }

View file

@ -179,7 +179,7 @@ if (trim($workshop->instructauthors)) {
$instructions = file_rewrite_pluginfile_urls($workshop->instructauthors, 'pluginfile.php', $PAGE->context->id, $instructions = file_rewrite_pluginfile_urls($workshop->instructauthors, 'pluginfile.php', $PAGE->context->id,
'mod_workshop', 'instructauthors', 0, workshop::instruction_editors_options($PAGE->context)); 'mod_workshop', 'instructauthors', 0, workshop::instruction_editors_options($PAGE->context));
print_collapsible_region_start('', 'workshop-viewlet-instructauthors', get_string('instructauthors', 'workshop')); 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(); print_collapsible_region_end();
} }

View file

@ -124,7 +124,7 @@ class mod_workshop_renderer extends plugin_renderer_base {
$o .= $this->output->container_end(); // end of header $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, $content = file_rewrite_pluginfile_urls($content, 'pluginfile.php', $this->page->context->id,
'mod_workshop', 'submission_content', $submission->id); 'mod_workshop', 'submission_content', $submission->id);
$o .= $this->output->container($content, 'content'); $o .= $this->output->container($content, 'content');
@ -215,7 +215,7 @@ class mod_workshop_renderer extends plugin_renderer_base {
$o .= $this->output->heading(format_string($example->title), 3, 'title'); $o .= $this->output->heading(format_string($example->title), 3, 'title');
$o .= $this->output->container_end(); // end of header $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, $content = file_rewrite_pluginfile_urls($content, 'pluginfile.php', $this->page->context->id,
'mod_workshop', 'submission_content', $example->id); 'mod_workshop', 'submission_content', $example->id);
$o .= $this->output->container($content, 'content'); $o .= $this->output->container($content, 'content');

View file

@ -223,7 +223,7 @@ if (trim($workshop->instructauthors)) {
$instructions = file_rewrite_pluginfile_urls($workshop->instructauthors, 'pluginfile.php', $PAGE->context->id, $instructions = file_rewrite_pluginfile_urls($workshop->instructauthors, 'pluginfile.php', $PAGE->context->id,
'mod_workshop', 'instructauthors', 0, workshop::instruction_editors_options($PAGE->context)); 'mod_workshop', 'instructauthors', 0, workshop::instruction_editors_options($PAGE->context));
print_collapsible_region_start('', 'workshop-viewlet-instructauthors', get_string('instructauthors', 'workshop')); 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(); print_collapsible_region_end();
} }

View file

@ -100,7 +100,7 @@ case workshop::PHASE_SUBMISSION:
$instructions = file_rewrite_pluginfile_urls($workshop->instructauthors, 'pluginfile.php', $PAGE->context->id, $instructions = file_rewrite_pluginfile_urls($workshop->instructauthors, 'pluginfile.php', $PAGE->context->id,
'mod_workshop', 'instructauthors', 0, workshop::instruction_editors_options($PAGE->context)); 'mod_workshop', 'instructauthors', 0, workshop::instruction_editors_options($PAGE->context));
print_collapsible_region_start('', 'workshop-viewlet-instructauthors', get_string('instructauthors', 'workshop')); 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(); print_collapsible_region_end();
} }
@ -241,7 +241,7 @@ case workshop::PHASE_ASSESSMENT:
$instructions = file_rewrite_pluginfile_urls($workshop->instructreviewers, 'pluginfile.php', $PAGE->context->id, $instructions = file_rewrite_pluginfile_urls($workshop->instructreviewers, 'pluginfile.php', $PAGE->context->id,
'mod_workshop', 'instructreviewers', 0, workshop::instruction_editors_options($PAGE->context)); 'mod_workshop', 'instructreviewers', 0, workshop::instruction_editors_options($PAGE->context));
print_collapsible_region_start('', 'workshop-viewlet-instructreviewers', get_string('instructreviewers', 'workshop')); 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(); print_collapsible_region_end();
} }

View file

@ -196,7 +196,7 @@ function note_print($note, $detail = NOTES_SHOW_FULL) {
// print note content // print note content
if ($detail & NOTES_SHOW_BODY) { if ($detail & NOTES_SHOW_BODY) {
echo '<div class="content">'; echo '<div class="content">';
echo format_text($note->content, $note->format); echo format_text($note->content, $note->format, array('overflowdiv'=>true));
echo '</div>'; echo '</div>';
} }

View file

@ -1159,6 +1159,7 @@ class question_bank_view {
protected function print_category_info($category) { protected function print_category_info($category) {
$formatoptions = new stdClass; $formatoptions = new stdClass;
$formatoptions->noclean = true; $formatoptions->noclean = true;
$formatoptions->overflowdiv = true;
echo '<div class="boxaligncenter">'; echo '<div class="boxaligncenter">';
echo format_text($category->info, FORMAT_MOODLE, $formatoptions, $this->course->id); echo format_text($category->info, FORMAT_MOODLE, $formatoptions, $this->course->id);
echo "</div>\n"; echo "</div>\n";

View file

@ -116,6 +116,7 @@ function tag_print_description_box($tag_object, $return=false) {
if (!empty($tag_object->description)) { if (!empty($tag_object->description)) {
$options = new stdClass(); $options = new stdClass();
$options->para = false; $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); $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); $output .= format_text($tag_object->description, $tag_object->descriptionformat, $options);
} }

View file

@ -121,6 +121,11 @@ $THEME->layouts = array(
'regions' => array(), 'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true), 'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
), ),
'report' => array(
'file' => 'report.php',
'regions' => array('side-pre'),
'defaultregion' => 'side-pre'
),
); );
$THEME->rendererfactory = 'theme_overridden_renderer_factory'; $THEME->rendererfactory = 'theme_overridden_renderer_factory';

View file

@ -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>

View file

@ -167,6 +167,11 @@ $THEME->layouts = array(
'regions' => array(), 'regions' => array(),
'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>false, 'nocustommenu'=>true), 'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>false, 'nocustommenu'=>true),
), ),
'report' => array(
'file' => 'report.php',
'regions' => array('side-post'),
'defaultregion' => 'side-post',
),
); );
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////

View file

@ -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>

View file

@ -168,7 +168,7 @@ h2.headingblock {
.forumpost .topic { .forumpost .topic {
background: #eee; background: #eee;
border-width: 0; border-width: 0;
padding: 0 10px 0; padding: 4px 10px 4px;
} }
.forumpost .subject { .forumpost .subject {
@ -180,10 +180,14 @@ h2.headingblock {
font-style: italic; font-style: italic;
} }
.forumpost .content { .forumpost .no-overflow {
border-width: 0 1px 10px; border-width: 0 1px 10px;
border-style: solid; border-style: solid;
border-color: #aaa #eee #eee; border-color: #aaa #eee #eee;
margin: 0 1px 1px 1px;
}
.forumpost .content .posting {
padding: 5px 10px 10px; padding: 5px 10px 10px;
} }

View file

@ -1,103 +1,129 @@
/********************************************************************************************* /*********************************************************************************************
left column: 250px left column: 250px
right column: 250px right column: 250px
padding left/right column: 10px padding left/right column: 10px
padding center column: 30px padding center column: 30px
**********************************************************************************************/ **********************************************************************************************/
body { body {
margin: auto 0px; margin: auto 0px;
width: auto; width: auto;
} }
#page { #page {
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
} }
#page-header { #page-header {
float: left; float: left;
width: 100%; width: 100%;
} }
#page-content { #page-content {
clear: both; clear: both;
float: left; float: left;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
width: 100%; width: 100%;
} }
#page-content #region-main-box { #page-content #region-main-box {
float: left; float: left;
margin-left: 0; margin-left: 0;
position: relative; position: relative;
width: 200%; width: 200%;
right: 100%; right: 100%;
} }
#page-content #region-main-box #region-post-box { #page-content #region-post-box {
float: left; float: left;
width: 100%; width: 100%;
} }
#page-content #region-main-box #region-post-box #region-main-wrap { #page-content #region-main-wrap {
float: left; float: left;
width: 50%; width: 50%;
} }
#page-content #region-main-box #region-post-box #region-main-wrap #region-main { #page-content #region-main {
overflow: hidden; overflow: hidden;
position: relative; position: relative;
left: 100%; left: 100%;
} }
#page-content #region-main-box #region-post-box #region-post { #page-content #region-post {
float: right; float: right;
position: relative; 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; overflow: hidden;
padding: 20px 30px 20px 0; 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; overflow: hidden;
padding: 20px 0 20px 10px; padding: 20px 0 20px 10px;
} }
#page-footer { #page-footer {
clear: both; clear: both;
float: left; float: left;
width: 100%; width: 100%;
} }
.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; margin-left: 200px;
} }
/** No blocks whatsoever **/ /** No blocks whatsoever **/
.content-only #page-content #region-main-box { .content-only #page-content #region-main-box {
margin-left: 0px; margin-left: 0px;
} }
.content-only #page-content #region-main-box #region-post-box { .content-only #page-content #region-post-box {
margin-left: 0px; 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; margin-left: 0px;
} }
.content-only #page-content #region-main-box #region-post-box #region-pre { .content-only #page-content #region-pre {
width: 0px; width: 0px;
} }
.content-only #page-content #region-main-box #region-post-box #region-post { .content-only #page-content #region-post {
width: 0px; 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%;}

View file

@ -152,6 +152,12 @@ $THEME->layouts = array(
'regions' => array(), 'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'nocustommenu'=>true), '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 // We don't want the base theme to be shown on the theme selection screen, by setting

View file

@ -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>

View file

@ -98,6 +98,11 @@ form.popupform,
form.popupform div {display: inline;} form.popupform div {display: inline;}
.arrow_button input {overflow:hidden;} .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 float + background bug solution **/
.ie6 li.section {line-height:1.2em;width:100%;} .ie6 li.section {line-height:1.2em;width:100%;}
@ -649,10 +654,12 @@ body.tag .managelink {padding: 5px;}
.restore-course-search .rcs-results {width:70%;min-width:400px;border:1px solid #ddd;margin:5px 0;} .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 {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-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 {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 {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;} .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;} .corelightbox {background-color:#CCC;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;}

View file

@ -32,37 +32,62 @@ body {margin:auto 0px;width:auto;}
#page-header {float:left;width:100%;} #page-header {float:left;width:100%;}
#page-content {clear:both;float:left;overflow:hidden;position:relative;width:100%;min-width:900px;} #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 {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-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-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 {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-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-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-content {overflow:hidden;padding:10px;}
#page-footer {clear:both;float:left;width:100%;} #page-footer {clear:both;float:left;width:100%;}
/** Only side pre **/ /** Only side pre **/
.side-pre-only #page-content #region-main-box #region-post-box {margin-left:-200px;} .side-pre-only #page-content #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 {margin-left:200px;}
.side-pre-only #page-content #region-main-box #region-post-box #region-pre {left:0px;} .side-pre-only #page-content #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 {width:0px;}
/** Only side post **/ /** Only side post **/
.side-post-only #page-content #region-main-box {left:0px;} .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-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 {margin-left:200px;}
.side-post-only #page-content #region-main-box #region-post-box #region-pre {width:0px;} .side-post-only #page-content #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;} .has_dock.side-post-only .page-middle #region-main {margin-left:200px;}
/** No blocks whatsoever **/ /** No blocks whatsoever **/
.content-only #page-content {min-width:0;} .content-only #page-content {min-width:0;}
.content-only #page-content #region-main-box {left:0px;} .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-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 {margin-left:0px;}
.content-only #page-content #region-main-box #region-post-box #region-pre {left:0;width:0px;} .content-only #page-content #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 {width:0;}
/** Stabalise some IE6 behaviour **/ /** Stabalise some IE6 behaviour **/
.ie6 #region-pre .region-content, .ie6 #region-pre .region-content,
.ie6 #region-post .region-content {padding:0 !important;width:100%;float:none;} .ie6 #region-post .region-content {padding:0 !important;width:100%;float:none;}
.ie6 #region-pre .region-content .block, .ie6 #region-pre .region-content .block,
.ie6 #region-post .region-content .block {width:auto;padding:0;margin:10px;} .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%;}

View file

@ -166,6 +166,11 @@ $THEME->layouts = array(
'regions' => array(), 'regions' => array(),
'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>false, 'nocustommenu'=>true), 'options' => array('nofooter'=>true, 'noblocks'=>true, 'nonavbar'=>false, 'nocustommenu'=>true),
), ),
'report' => array(
'file' => 'report.php',
'regions' => array('side-post'),
'defaultregion' => 'side-post',
),
); );
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////

View file

@ -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>

View file

@ -1,115 +1,144 @@
/********************************************************************************************* /*********************************************************************************************
left column: 250px left column: 250px
right column: 250px right column: 250px
padding left/right column: 10px padding left/right column: 10px
padding center column: 30px padding center column: 30px
**********************************************************************************************/ **********************************************************************************************/
body { body {
margin: auto 0px; margin: auto 0px;
width: auto; width: auto;
} }
#page { #page {
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
} }
#page-header { #page-header {
float: left; float: left;
width: 100%; width: 100%;
} }
#page-content { #page-content {
clear: both; clear: both;
float: left; float: left;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
width: 100%; width: 100%;
} }
#page-content #region-main-box { #page-content #region-main-box {
float: left; float: left;
margin-left: 0; margin-left: 0;
position: relative; position: relative;
width: 200%; width: 200%;
right: 100%; right: 100%;
} }
#page-content #region-main-box #region-post-box { #page-content #region-main-box #region-post-box {
float: left; float: left;
margin-left: -250px; margin-left: -250px;
width: 100%; width: 100%;
} }
#page-content #region-main-box #region-post-box #region-main-wrap { #page-content #region-main-box #region-post-box #region-main-wrap {
float: left; float: left;
width: 50%; width: 50%;
} }
#page-content #region-main-box #region-post-box #region-main-wrap #region-main { #page-content #region-main-box #region-post-box #region-main-wrap #region-main {
overflow: hidden; overflow: hidden;
position: relative; position: relative;
margin-left: 250px; margin-left: 250px;
left: 100%; left: 100%;
} }
#page-content #region-main-box #region-post-box #region-pre { #page-content #region-main-box #region-post-box #region-pre {
float: right; float: right;
position: relative; position: relative;
left: 250px; left: 250px;
width: 250px; width: 250px;
} }
#page-content #region-main-box #region-post-box #region-post { #page-content #region-main-box #region-post-box #region-post {
float: right; float: right;
position: relative; position: relative;
left: 250px; left: 250px;
width: 250px; width: 250px;
} }
#page-content #region-main-box #region-post-box #region-main-wrap #region-main .region-content { #page-content #region-main-box #region-post-box #region-main-wrap #region-main .region-content {
overflow: hidden; overflow: hidden;
padding: 10px 20px 20px 10px; padding: 10px 20px 20px 10px;
} }
#page-content #region-main-box #region-post-box #region-pre .region-content, #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-main-box #region-post-box #region-post .region-content {
overflow: hidden; overflow: hidden;
padding: 10px 0 20px 10px; padding: 10px 0 20px 10px;
} }
#page-footer { #page-footer {
clear: both; clear: both;
float: left; float: left;
width: 100%; width: 100%;
} }
.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-box #region-post-box #region-main-wrap #region-main {
margin-left: 200px; margin-left: 200px;
} }
/** No blocks whatsoever **/ /** No blocks whatsoever **/
.content-only #page-content #region-main-box { .content-only #page-content #region-main-box {
margin-left: 0px; margin-left: 0px;
} }
.content-only #page-content #region-main-box #region-post-box { .content-only #page-content #region-main-box #region-post-box {
margin-left: 0px; margin-left: 0px;
} }
.content-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main { .content-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main {
margin-left: 0px; margin-left: 0px;
} }
.content-only #page-content #region-main-box #region-post-box #region-pre { .content-only #page-content #region-main-box #region-post-box #region-pre {
width: 0px; width: 0px;
} }
.content-only #page-content #region-main-box #region-post-box #region-post { .content-only #page-content #region-main-box #region-post-box #region-post {
width: 0px; 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%;}

View file

@ -645,15 +645,14 @@ h2.headingblock {
text-decoration: none; text-decoration: none;
} }
.forumpost .content { .forumpost .no-overflow,
border-width: 1px ; .forumpost .options {
border-color: #a0c278; border: 1px solid #a0c278;
border-style: solid;
padding: 5px 10px;
} }
.forumpost .commands { .forumpost .options,
padding: 10px 0; .forumpost .content .posting {
padding: 5px 10px;
} }
.forumaddnew, .forumaddnew,

View file

@ -38,8 +38,8 @@ $THEME->name = 'brick';
$THEME->parents = array( $THEME->parents = array(
'canvas', 'canvas',
'base', 'base',
); );
///////////////////////////////////////////////////// /////////////////////////////////////////////////////
@ -54,11 +54,10 @@ $THEME->parents = array(
$THEME->sheets = array( $THEME->sheets = array(
'pagelayout', 'pagelayout',
'core', 'core',
'colors', 'colors',
'css3', 'css3',
); );
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -67,12 +66,12 @@ $THEME->sheets = array(
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
$THEME->parents_exclude_sheets = array( $THEME->parents_exclude_sheets = array(
'base'=>array( 'base'=>array(
'pagelayout', 'pagelayout',
), ),
'canvas'=>array( 'canvas'=>array(
'pagelayout', 'pagelayout',
), ),
); );
@ -158,11 +157,16 @@ $THEME->layouts = array(
'options' => array('nofooter'=>true, 'nonavbar'=>true), 'options' => array('nofooter'=>true, 'nonavbar'=>true),
), ),
'embedded' => array( 'embedded' => array(
'theme' => 'canvas', 'theme' => 'canvas',
'file' => 'embedded.php', 'file' => 'embedded.php',
'regions' => array(), 'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true), 'options' => array('nofooter'=>true, 'nonavbar'=>true),
), ),
'report' => array(
'file' => 'general.php',
'regions' => array('side-post'),
'defaultregion' => 'side-post',
),
); );
@ -203,14 +207,14 @@ $THEME->layouts = array(
// As above but will be included in the page footer. // As above but will be included in the page footer.
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
//$THEME->larrow = '&lang;'; //$THEME->larrow = '&lang;';
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// Overrides the left arrow image used throughout // Overrides the left arrow image used throughout
// Moodle // Moodle
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
//$THEME->rarrow = '&rang;'; //$THEME->rarrow = '&rang;';
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// Overrides the right arrow image used throughout Moodle // Overrides the right arrow image used throughout Moodle

View file

@ -4,274 +4,274 @@
---------------------------*/ ---------------------------*/
html, body { html, body {
background: #eee; background: #eee;
} }
#mypagewrapper { #mypagewrapper {
width: 100%; width: 100%;
border-top: 1px solid #fff; border-top: 1px solid #fff;
} }
#page { #page {
margin-top: 15px; margin-top: 15px;
width: 90%; width: 90%;
min-width: 960px; min-width: 960px;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
clear: both; clear: both;
border: 1px solid #dadada; border: 1px solid #dadada;
background: #fff; background: #fff;
} }
#wrapper { #wrapper {
padding: 20px; padding: 20px;
padding-left: 20px; padding-left: 20px;
padding-right: 17px; padding-right: 17px;
} }
#wrapper.notathome { #wrapper.notathome {
padding-top: 15px; padding-top: 15px;
} }
.content-only #wrapper { .content-only #wrapper {
padding-right: 0px; padding-right: 0px;
} }
/* Header /* Header
----------------------------*/ ----------------------------*/
#headerwrap { #headerwrap {
width: 100%; width: 100%;
top: 0px; top: 0px;
height: 140px; height: 140px;
} }
#header { #header {
width: 90%; width: 90%;
min-width: 960px; min-width: 960px;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
#logo { #logo {
background-position: 0% 40%; background-position: 0% 40%;
width: 300px; width: 300px;
height: 70px; height: 70px;
float: left; float: left;
} }
#nologo { #nologo {
width: 590px; width: 590px;
height: 70px; height: 70px;
float: left; float: left;
margin-left: 6px; margin-left: 6px;
overflow: hidden; overflow: hidden;
} }
#nologo a, #nologo { #nologo a, #nologo {
font-family: Georgia, Palatino, serif; font-family: Georgia, Palatino, serif;
line-height: 70px; line-height: 70px;
font-size: 28px; font-size: 28px;
font-weight: 600; font-weight: 600;
letter-spacing: -1px; letter-spacing: -1px;
} }
#loggedinas { #loggedinas {
min-width: 300px; min-width: 300px;
height: 65px; height: 65px;
float: right; float: right;
text-align: right; text-align: right;
line-height: 65px; line-height: 65px;
font-size: 10px; font-size: 10px;
} }
#loginas a { #loginas a {
color: #fff; color: #fff;
} }
#headerbottom { #headerbottom {
clear: both; clear: both;
} }
#headingtitle { #headingtitle {
float: right; float: right;
width: 280px; width: 280px;
padding-right: 5px; padding-right: 5px;
text-align: right; text-align: right;
height: 70px; height: 70px;
overflow: hidden; overflow: hidden;
background: url([[pix:theme|youare]]) no-repeat; background: url([[pix:theme|youare]]) no-repeat;
background-position: 95% 110%; background-position: 95% 110%;
position: relative; position: relative;
bottom: -2px; bottom: -2px;
} }
#headingtitle h1 { #headingtitle h1 {
line-height: 67px; line-height: 67px;
font-weight: 200; font-weight: 200;
font-size: 13px; font-size: 13px;
text-transform: uppercase; text-transform: uppercase;
color: #fff; color: #fff;
} }
/* end Header /* end Header
----------------------------*/ ----------------------------*/
#region-post2 .region-content div.navbutton { #region-post2 .region-content div.navbutton {
display: inline-block !important; display: inline-block !important;
width: 100%; width: 100%;
float: none; float: none;
margin-bottom: 5px; margin-bottom: 5px;
margin-top: 5px; margin-top: 5px;
clear: both; clear: both;
} }
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: Georgia, Palatino, serif; font-family: Georgia, Palatino, serif;
line-height: 1.5; line-height: 1.5;
color: #333; color: #333;
} }
h1, h2, h3, h4 { h1, h2, h3, h4 {
font-family: Georgia, Times, "Times New Roman", serif !important; font-family: Georgia, Times, "Times New Roman", serif !important;
} }
h2,h3,h4,h5,h6 { h2,h3,h4,h5,h6 {
color: #999; color: #999;
font-weight: normal; font-weight: normal;
} }
blockquote { blockquote {
border-left: 1px solid #eee; border-left: 1px solid #eee;
padding-left: 15px; padding-left: 15px;
color: #666; color: #666;
} }
.mform fieldset { .mform fieldset {
border-color: #eee; border-color: #eee;
} }
.mform fieldset legend { .mform fieldset legend {
color: #555; color: #555;
font-weight: normal; font-weight: normal;
font-size: 1.2em; font-size: 1.2em;
border: 1px solid #eee; border: 1px solid #eee;
padding: 2px 5px; padding: 2px 5px;
background: #fff; background: #fff;
} }
div.navbar { div.navbar {
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
border-top: 1px solid #eee; border-top: 1px solid #eee;
background: #fafafa url([[pix:theme|block]]) no-repeat; background: #fafafa url([[pix:theme|block]]) no-repeat;
background-position: 100% 0%; background-position: 100% 0%;
font-size: 0.85em; font-size: 0.85em;
font-style: italic; font-style: italic;
font-weight: 200; font-weight: 200;
padding:0 10px; padding:0 10px;
margin-bottom: 7px; margin-bottom: 7px;
} }
div.breadcrumb li { div.breadcrumb li {
line-height: 30px; line-height: 30px;
font-family: Georgia, serif; font-family: Georgia, serif;
} }
.breadcrumb li img { .breadcrumb li img {
vertical-align: middle; vertical-align: middle;
} }
/** breadcrumb image replacement **/ /** breadcrumb image replacement **/
div.navbar span.arrow.sep { div.navbar span.arrow.sep {
font-size: 1px; font-size: 1px;
color: #fafafa; color: #fafafa;
background: url([[pix:theme|crumber]]) no-repeat; background: url([[pix:theme|crumber]]) no-repeat;
background-position: 50% 25%; background-position: 50% 25%;
display: inline-block; display: inline-block;
width: 16px; width: 16px;
height: 30px; height: 30px;
} }
.navbutton { .navbutton {
float: none; float: none;
width: 100%; width: 100%;
padding: 5px 0 15px; padding: 5px 0 15px;
text-align: center; text-align: center;
} }
/* Blocks /* Blocks
----------------------------*/ ----------------------------*/
.block { .block {
border: none; border: none;
} }
div.block { div.block {
padding: 2px; padding: 2px;
border: 1px solid #dadada; border: 1px solid #dadada;
margin-left: -10px; margin-left: -10px;
} }
#region-main div.block { #region-main div.block {
margin-left: 0px; margin-left: 0px;
background-image: none; background-image: none;
} }
.block div.header { .block div.header {
min-height: 33px; min-height: 33px;
padding-top: 3px; padding-top: 3px;
padding-left: 3px; padding-left: 3px;
} }
div.block.hidden div.header { div.block.hidden div.header {
border-bottom: none; border-bottom: none;
} }
.block .header h2 { .block .header h2 {
font-size: 13px; font-size: 13px;
font-weight: 200; font-weight: 200;
text-transform: uppercase; text-transform: uppercase;
} }
.block div.content { .block div.content {
background: #fff; background: #fff;
border: 1px solid #dadada; border: 1px solid #dadada;
border-top: none; border-top: none;
padding: 4px; padding: 4px;
} }
.block div.content h1, .block div.content h2.main, .block div.content h3.main { .block div.content h1, .block div.content h2.main, .block div.content h3.main {
font-size: 13px; font-size: 13px;
background-image: none; background-image: none;
} }
.block_calendar_month table.minicalendar.calendartable td,.block_calendar_month table.minicalendar.calendartable th { .block_calendar_month table.minicalendar.calendartable td,.block_calendar_month table.minicalendar.calendartable th {
border: none !important; border: none !important;
} }
.block_calendar_month table.minicalendar { .block_calendar_month table.minicalendar {
margin-bottom: 0px !important; margin-bottom: 0px !important;
} }
.block_calendar_month table.minicalendar.calendartable th abbr { .block_calendar_month table.minicalendar.calendartable th abbr {
border: none !important; border: none !important;
text-decoration: none; text-decoration: none;
} }
/** main headings **/ /** main headings **/
.generalbox h2,h3.sectionname, h2.headingblock,h2.main,h3.main, h2.main a, h3.main a, div.loginpanel h2, div.signuppanel h2 { .generalbox h2,h3.sectionname, h2.headingblock,h2.main,h3.main, h2.main a, h3.main a, div.loginpanel h2, div.signuppanel h2 {
font-weight: 600; font-weight: 600;
letter-spacing: -1px; letter-spacing: -1px;
line-height: 1.3em; line-height: 1.3em;
font-size: 28px; font-size: 28px;
border-bottom: 0px solid #eee; border-bottom: 0px solid #eee;
padding-bottom: 2px; padding-bottom: 2px;
background: url([[pix:theme|mainbar]]) repeat-x; background: url([[pix:theme|mainbar]]) repeat-x;
background-position: 0% 100%; background-position: 0% 100%;
} }
.generalbox h2, #page-course-info h2.main, h3.sectionname, h2.main a, h3.main a, div.loginpanel h2, div.signuppanel h2, div.hd h3.main { .generalbox h2, #page-course-info h2.main, h3.sectionname, h2.main a, h3.main a, div.loginpanel h2, div.signuppanel h2, div.hd h3.main {
font-size: 22px; font-size: 22px;
background: none; background: none;
} }
@ -280,259 +280,264 @@ div.block.hidden div.header {
----------------------------*/ ----------------------------*/
.coursebox { .coursebox {
border-color: #eee; border-color: #eee;
} }
.coursebox .info { .coursebox .info {
width: 35%; width: 35%;
} }
.coursebox .info .name { .coursebox .info .name {
margin-bottom: 0; margin-bottom: 0;
} }
.coursebox .info .teachers { .coursebox .info .teachers {
font-size: 0.9em; font-size: 0.9em;
color: #888; color: #888;
} }
.coursebox .summary { .coursebox .summary {
width: 63%; width: 63%;
} }
.course-content .section.main { .course-content .section.main {
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
} }
.course-content .section.main .content { .course-content .section.main .content {
padding: 5px 5px 10px; padding: 5px 5px 10px;
} }
.course-content .weeks .section.main .content { .course-content .weeks .section.main .content {
margin-left: 0; margin-left: 0;
} }
.course-content .weeks .section.main .left { .course-content .weeks .section.main .left {
display: none; display: none;
} }
.course-content .section.main.current { .course-content .section.main.current {
background: #fffcdc; background: #fffcdc;
} }
.course-content .weeks .section.main h3.weekdates { .course-content .weeks .section.main h3.weekdates {
color: #999; color: #999;
} }
.course-content .current .left, .course-content .current .left,
.course-content .current h3.weekdates { .course-content .current h3.weekdates {
color: #92310c !important; color: #92310c !important;
} }
span.completionprogress { span.completionprogress {
font-size: 11px; font-size: 11px;
color: #666666; color: #666666;
} }
/* Forum /* Forum
--------------------------*/ --------------------------*/
.forumpost .topic { .forumpost .topic {
background: #eee url([[pix:theme|block]]) no-repeat; background: #eee url([[pix:theme|block]]) no-repeat;
background-position: 100% 0%; background-position: 100% 0%;
border-width: 0; border-width: 0;
border: 1px solid #dadada; border: 1px solid #dadada;
padding: 0 10px 0; padding: 0 10px 0;
} }
.forumpost .subject { .forumpost .subject {
font-size: 1.45em; font-size: 1.45em;
font-family: Georgia, serif; font-family: Georgia, serif;
} }
.forumpost .author { .forumpost .author {
font-size: 0.9em; font-size: 0.9em;
font-style: italic; font-style: italic;
} }
td.picture.left img { td.picture.left img {
background: #fafafa; background: #fafafa;
padding: 4px; padding: 4px;
padding-bottom: 9px; padding-bottom: 9px;
border: 1px solid #dadada; border: 1px solid #dadada;
} }
.forumpost .content { .forumpost .options,
border-width: 0 1px 1px; .forumpost .no-overflow {
border-style: solid; border-width: 0 1px 1px;
border-color: #aaa #dadada #dadada; border-style: solid;
padding: 5px 10px 10px; border-color: #aaa #dadada #dadada;
}
.forumpost .options,
.forumpost .content .posting {
padding: 5px 10px 10px;
} }
/* Footer /* Footer
----------------------------*/ ----------------------------*/
#page-footer .helplink { #page-footer .helplink {
margin: 1em 0; margin: 1em 0;
} }
/* Dock */ /* Dock */
body.has_dock { body.has_dock {
margin: 0px; margin: 0px;
} }
.has_dock #page, .has_dock #header { .has_dock #page, .has_dock #header {
margin-left: 5%; margin-left: 5%;
} }
#dock { #dock {
left: 5%; left: 5%;
top: 107px; top: 107px;
margin-left: -29px; margin-left: -29px;
border-width: 0; border-width: 0;
background-color: transparent; background-color: transparent;
position: absolute; position: absolute;
} }
#dock .controls { #dock .controls {
bottom: auto; bottom: auto;
-webkit-border-bottom-left-radius: 3px; -webkit-border-bottom-left-radius: 3px;
-moz-border-radius-bottomleft: 3px; -moz-border-radius-bottomleft: 3px;
border-bottom-left-radius: 3px; border-bottom-left-radius: 3px;
} }
#dock .dockeditem_container { #dock .dockeditem_container {
position: relative; position: relative;
} }
#dock .dockeditem.firstdockitem { #dock .dockeditem.firstdockitem {
margin-top: 50px; margin-top: 50px;
border-top: 1px solid #dadada; border-top: 1px solid #dadada;
-webkit-border-top-left-radius: 3px; -webkit-border-top-left-radius: 3px;
-moz-border-radius-topleft: 3px; -moz-border-radius-topleft: 3px;
border-top-left-radius: 3px; border-top-left-radius: 3px;
} }
#dock .dockeditem { #dock .dockeditem {
background-color: #fff; background-color: #fff;
padding: 2px; padding: 2px;
padding-right: 0px; padding-right: 0px;
border-left: 1px solid #dadada; border-left: 1px solid #dadada;
border-right: 0px solid #fafafa; border-right: 0px solid #fafafa;
border-top: 1px solid #fafafa; border-top: 1px solid #fafafa;
} }
#dock .dockedtitle { #dock .dockedtitle {
border-width: 0; border-width: 0;
} }
#dock .dockedtitle h2 { #dock .dockedtitle h2 {
margin: 0; margin: 0;
padding: 10px 3px; padding: 10px 3px;
} }
#dock .dockedtitle.activeitem { #dock .dockedtitle.activeitem {
color: #fff !important; color: #fff !important;
width: 35px; width: 35px;
-webkit-border-top-left-radius: 3px; -webkit-border-top-left-radius: 3px;
-moz-border-radius-topleft: 3px; -moz-border-radius-topleft: 3px;
border-top-left-radius: 3px; border-top-left-radius: 3px;
-webkit-border-bottom-left-radius: 3px; -webkit-border-bottom-left-radius: 3px;
-moz-border-radius-bottomleft: 3px; -moz-border-radius-bottomleft: 3px;
border-bottom-left-radius: 3px; border-bottom-left-radius: 3px;
} }
#dock .dockedtitle.activeitem h2 { #dock .dockedtitle.activeitem h2 {
color: #fff !important; color: #fff !important;
} }
#dockeditempanel { #dockeditempanel {
margin-left: 0px; margin-left: 0px;
} }
#dockeditempanel .dockeditempanel_content { #dockeditempanel .dockeditempanel_content {
background-color: #fff; background-color: #fff;
margin: 0 3px; margin: 0 3px;
position: relative; position: relative;
min-height: 100px; min-height: 100px;
-webkit-border-radius: 3px; -webkit-border-radius: 3px;
-webkit-border-top-left-radius: 0; -webkit-border-top-left-radius: 0;
-moz-border-radius: 3px; -moz-border-radius: 3px;
-moz-border-radius-topleft: 0; -moz-border-radius-topleft: 0;
border-radius: 3px; border-radius: 3px;
border-top-left-radius: 0; border-top-left-radius: 0;
} }
#dockeditempanel .dockeditempanel_hd { #dockeditempanel .dockeditempanel_hd {
border-width: 0; border-width: 0;
padding: 2px; padding: 2px;
} }
#dockeditempanel .dockeditempanel_hd h2 { #dockeditempanel .dockeditempanel_hd h2 {
font-size: 0.9em; font-size: 0.9em;
color: #fff; color: #fff;
} }
/** yui menu styles **/ /** yui menu styles **/
#menustuff { #menustuff {
width: 600px; width: 600px;
float: left; float: left;
clear: left; clear: left;
height: 65px; height: 65px;
} }
#custommenu { #custommenu {
border: none !important; border: none !important;
} }
div.yui3-menu-content { div.yui3-menu-content {
border: none !important; border: none !important;
} }
.yui3-menu-content li a { .yui3-menu-content li a {
font-size: 14px; font-size: 14px;
font-family: Georgia, serif !important; font-family: Georgia, serif !important;
font-weight: 200; font-weight: 200;
text-transform: lowercase; text-transform: lowercase;
line-height: 70px; line-height: 70px;
cursor: pointer; cursor: pointer;
border-right: none !important; border-right: none !important;
border-top: none !important; border-top: none !important;
border-bottom: none !important; border-bottom: none !important;
} }
.yui3-menu-content li a:hover { .yui3-menu-content li a:hover {
text-decoration: underline; text-decoration: underline;
} }
div.custom_menu_submenu li a { div.custom_menu_submenu li a {
line-height: 30px; line-height: 30px;
text-shadow: none !important; text-shadow: none !important;
} }
div.yui3-menu.custom_menu_submenu { div.yui3-menu.custom_menu_submenu {
background: url([[pix:theme|youare]]) no-repeat; background: url([[pix:theme|youare]]) no-repeat;
background-position: 30px 10px; background-position: 30px 10px;
top: 120px !important; top: 120px !important;
border: none; border: none;
min-width: 100px; min-width: 100px;
z-index: 99998; z-index: 99998;
} }
div.yui3-menu.custom_menu_submenu div.yui3-menu-content { div.yui3-menu.custom_menu_submenu div.yui3-menu-content {
margin-top: 22px; margin-top: 22px;
border: 1px solid #dadada !important; border: 1px solid #dadada !important;
border-top: none !important; border-top: none !important;
} }
/** below style to move sub subs to the left to keep from going off the page **/ /** below style to move sub subs to the left to keep from going off the page **/
div.yui3-menu.custom_menu_submenu div.yui3-menu-content div.yui3-menu.custom_menu_submenu div.yui3-menu-content { div.yui3-menu.custom_menu_submenu div.yui3-menu-content div.yui3-menu.custom_menu_submenu div.yui3-menu-content {
background-image: none !important; background-image: none !important;
min-width: 200px; min-width: 200px;
position: relative; position: relative;
margin-top: -50px; margin-top: -50px;
border-top: 1px solid #dadada !important; border-top: 1px solid #dadada !important;
} }

View file

@ -38,33 +38,33 @@ body {
right: 100%; right: 100%;
} }
#page-content #region-main-box #region-post-box { #page-content #region-post-box {
float: left; float: left;
width: 100%; width: 100%;
} }
#page-content #region-main-box #region-post-box #region-main-wrap { #page-content #region-main-wrap {
float: left; float: left;
width: 50%; width: 50%;
} }
#page-content #region-main-box #region-post-box #region-main-wrap #region-main { #page-content #region-main {
overflow: hidden; overflow: hidden;
position: relative; position: relative;
left: 100%; left: 100%;
} }
#page-content #region-main-box #region-post-box #region-post { #page-content #region-post {
float: right; float: right;
position: relative; 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; overflow: hidden;
padding: 0px 30px 20px 0; 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; overflow: hidden;
padding: 0px 0 20px 10px; padding: 0px 0 20px 10px;
} }
@ -86,31 +86,34 @@ body {
margin-left: 0px; margin-left: 0px;
} }
.content-only #page-content #region-main-box #region-post-box { .content-only #page-content #region-post-box {
margin-left: 0px; 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; margin-left: 0px;
} }
.content-only #page-content #region-main-box #region-post-box #region-pre { .content-only #page-content #region-pre {
width: 0px; width: 0px;
} }
.content-only #page-content #region-main-box #region-post-box #region-post { .content-only #page-content #region-post {
width: 0px; width: 0px;
} }
#page-content #region-main-box #region-post-box { #page-content #region-post-box {
margin-left: -250px; margin-left: -250px;
} }
#page-content #region-main-box #region-post-box #region-main-wrap #region-main { #page-content #region-main {
margin-left: 250px; margin-left: 250px;
} }
#page-content #region-main-box #region-post-box #region-post { #page-content #region-post {
left: 250px; left: 250px;
width: 250px; width: 250px;
} }
.pagelayout-report #page-content #region-main {overflow:auto;}
.pagelayout-report #page-content #region-main .region-content {overflow:visible;}

View file

@ -41,7 +41,7 @@ $THEME->name = 'canvas';
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
$THEME->parents = array( $THEME->parents = array(
'base', 'base',
); );
///////////////////////////////////////////////////// /////////////////////////////////////////////////////
@ -55,16 +55,16 @@ $THEME->parents = array(
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
$THEME->sheets = array( $THEME->sheets = array(
'pagelayout', 'pagelayout',
'text', 'text',
'core', 'core',
'course', 'course',
'mods', 'mods',
'blocks', 'blocks',
'tabs', 'tabs',
'admin', 'admin',
'tables', 'tables',
'popups', 'popups',
); );
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -73,10 +73,10 @@ $THEME->sheets = array(
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
$THEME->parents_exclude_sheets = array( $THEME->parents_exclude_sheets = array(
'base'=>array( 'base'=>array(
'navigation', 'navigation',
'browser', 'browser',
), ),
); );
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -168,6 +168,11 @@ $THEME->layouts = array(
'regions' => array(), 'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true), 'options' => array('nofooter'=>true, 'nonavbar'=>true),
), ),
'report' => array(
'file' => 'report.php',
'regions' => array('side-pre'),
'defaultregion' => 'side-pre',
)
); );
///////////////////////////////////////////////////////// /////////////////////////////////////////////////////////

View file

@ -29,25 +29,25 @@ echo $OUTPUT->doctype() ?>
<!-- START OF HEADER --> <!-- START OF HEADER -->
<?php if ($hasheading || $hasnavbar) { ?> <?php if ($hasheading || $hasnavbar) { ?>
<div id="wrapper" class="clearfix"> <div id="wrapper" class="clearfix">
<div id="page-header"> <div id="page-header">
<div id="page-header-wrapper" class="clearfix"> <div id="page-header-wrapper" class="clearfix">
<?php if ($hasheading) { ?> <?php if ($hasheading) { ?>
<h1 class="headermain"><?php echo $PAGE->heading ?></h1> <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
<div class="headermenu"> <div class="headermenu">
<?php <?php
echo $OUTPUT->login_info(); echo $OUTPUT->login_info();
if (!empty($PAGE->layout_options['langmenu'])) { if (!empty($PAGE->layout_options['langmenu'])) {
echo $OUTPUT->lang_menu(); echo $OUTPUT->lang_menu();
} }
echo $PAGE->headingmenu; echo $PAGE->headingmenu;
?> ?>
</div> </div>
<?php } ?> <?php } ?>
</div> </div>
</div> </div>
<?php if ($hasnavbar) { ?> <?php if ($hasnavbar) { ?>
<div class="navbar clearfix"> <div class="navbar clearfix">
@ -62,57 +62,57 @@ echo $OUTPUT->doctype() ?>
<!-- START OF CONTENT --> <!-- START OF CONTENT -->
<div id="page-content-wrapper" class="clearfix"> <div id="page-content-wrapper" class="clearfix">
<div id="page-content"> <div id="page-content">
<div id="region-main-box"> <div id="region-main-box">
<div id="region-post-box"> <div id="region-post-box">
<div id="region-main-wrap"> <div id="region-main-wrap">
<div id="region-main"> <div id="region-main">
<div class="region-content"> <div class="region-content">
<?php echo core_renderer::MAIN_CONTENT_TOKEN ?> <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
</div> </div>
</div> </div>
</div> </div>
<?php if ($hassidepre) { ?> <?php if ($hassidepre) { ?>
<div id="region-pre"> <div id="region-pre">
<div class="region-content"> <div class="region-content">
<?php echo $OUTPUT->blocks_for_region('side-pre') ?> <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
</div> </div>
</div> </div>
<?php } ?> <?php } ?>
<?php if ($hassidepost) { ?> <?php if ($hassidepost) { ?>
<div id="region-post"> <div id="region-post">
<div class="region-content"> <div class="region-content">
<?php echo $OUTPUT->blocks_for_region('side-post') ?> <?php echo $OUTPUT->blocks_for_region('side-post') ?>
</div> </div>
</div> </div>
<?php } ?> <?php } ?>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- END OF CONTENT --> <!-- END OF CONTENT -->
<!-- START OF FOOTER --> <!-- START OF FOOTER -->
<?php if ($hasfooter) { ?> <?php if ($hasfooter) { ?>
<div id="page-footer" class="clearfix"> <div id="page-footer" class="clearfix">
<p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p> <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
<?php <?php
echo $OUTPUT->login_info(); echo $OUTPUT->login_info();
echo $OUTPUT->home_link(); echo $OUTPUT->home_link();
echo $OUTPUT->standard_footer_html(); echo $OUTPUT->standard_footer_html();
?> ?>
</div> </div>
<?php } ?> <?php } ?>
<?php if ($hasheading || $hasnavbar) { ?> <?php if ($hasheading || $hasnavbar) { ?>
</div> <!-- END #wrapper --> </div> <!-- END #wrapper -->
<?php } ?> <?php } ?>
</div> <!-- END #page --> </div> <!-- END #page -->

View file

@ -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>

View file

@ -1,20 +1,18 @@
#page-content #region-main-box { #page-content #region-main-box {
left: 210px; 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; margin-left: -420px;
/* Twice width of left sideblock */ /* Twice width of left sideblock */
padding-top: 5px; padding-top: 5px;
} }
#page-content #region-main-box #region-post-box #region-main-wrap #region-main { #page-content #region-main {
margin-left: 420px; margin-left: 420px;
/* Twice width of left sideblock */ /* Twice width of left sideblock */
@ -24,8 +22,8 @@
/* Padding around middle column */ /* Padding around middle column */
} }
#page-content #region-main-box #region-post-box #region-pre { #page-content #region-pre {
left: 210px; left: 210px;
/* Width of left sideblock */ /* Width of left sideblock */
@ -35,37 +33,35 @@
/* Width of left sideblock */ /* Width of left sideblock */
} }
#page-content #region-main-box #region-post-box #region-post { #page-content #region-post {
width: 210px; width: 210px;
/ /* Width of right sideblock */
* Width of right sideblock */
} }
#page-content #region-main-box .region-content { #page-content #region-main-box .region-content {
padding: 0; padding: 0;
} }
/** Only side pre **/ /** Only side pre **/
.side-pre-only #page-content #region-main-box #region-post-box { .side-pre-only #page-content #region-main-box #region-post-box {
margin-left: -210px; margin-left: -210px;
} }
.side-pre-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main { .side-pre-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main {
margin-left: 210px; margin-left: 210px;
} }
/** Only side post **/ /** Only side post **/
.side-post-only #page-content #region-main-box #region-post-box { .side-post-only #page-content #region-main-box #region-post-box {
margin-left: -210px; margin-left: -210px;
} }
.side-post-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main { .side-post-only #page-content #region-main-box #region-post-box #region-main-wrap #region-main {
margin-left: 210px; margin-left: 210px;
} }
.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-box #region-post-box #region-main-wrap #region-main {
margin-left: 210px; margin-left: 210px;
} }

View file

@ -156,6 +156,11 @@ $THEME->layouts = array(
'regions' => array(), 'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true), 'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
), ),
'report' => array(
'file' => 'report.php',
'regions' => array('side-pre'),
'defaultregion' => 'side-pre'
),
); );
$THEME->rendererfactory = 'theme_overridden_renderer_factory'; $THEME->rendererfactory = 'theme_overridden_renderer_factory';

View file

@ -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>

View file

@ -64,12 +64,14 @@ function formalwhite_set_backgroundcolor($css, $backgroundcolor) {
function formalwhite_set_regionwidth($css, $regionwidth) { function formalwhite_set_regionwidth($css, $regionwidth) {
$tag = '[[setting:regionwidth]]'; $tag = '[[setting:regionwidth]]';
$doubletag = '[[setting:regionwidthdouble]]'; $doubletag = '[[setting:regionwidthdouble]]';
$tagplus10 = '[[setting:regionwidthplus10]]';
$replacement = $regionwidth; $replacement = $regionwidth;
if (is_null($replacement)) { if (is_null($replacement)) {
$replacement = 200; $replacement = 200;
} }
$css = str_replace($tag, $replacement.'px', $css); $css = str_replace($tag, $replacement.'px', $css);
$css = str_replace($doubletag, ($replacement*2).'px', $css); $css = str_replace($doubletag, ($replacement*2).'px', $css);
$css = str_replace($tag, ($replacement+10).'px', $css);
return $css; return $css;
} }

View file

@ -162,13 +162,16 @@ img.iconhelp {vertical-align:middle;}
/** Forum **/ /** Forum **/
.forumheaderlist, .forumheaderlist,
.forumpost {margin-top:15px;border:1px solid #DDD;border-collapse:separate;} .forumpost {margin-top:15px;border:1px solid #DDD;background-color:#EEE;}
.forumpost td {border-width:0px;} .forumpost .header {background-color:#C8C9C7;}
.forumpost .topic {background-color:#C8C9C7;} .forumpost .topic {padding:7px;}
.forumpost .topic .subject {font-weight:bold;} .forumpost .topic .subject {font-weight:bold;}
.forumpost .topic .author {font-size:0.8em;} .forumpost .topic .author {font-size:0.8em;}
.forumpost .left {background-color:#EEE;padding:4px;text-align:center;vertical-align:top;width:35px;} .forumpost .left {background-color:#EEE;}
.forumpost .content .commands {font-size:0.9em;clear:both;padding-top:0.5em;text-align:right;} .forumpost .content {background-color:#FFF;border-top:1px solid #333;}
.forumpost .content .posting {padding:4px;}
.forumpost .options {background-color:#FFF;}
.forumpost .options .commands {font-size:0.9em;clear:both;padding:0.5em 5px 5px;text-align:right;}
.forumpost .content .link {font-size:0.9em;} .forumpost .content .link {font-size:0.9em;}
.forumpost .content .footer {font-size:0.9em;padding-top:0.5em;text-align:right;} .forumpost .content .footer {font-size:0.9em;padding-top:0.5em;text-align:right;}

View file

@ -1,13 +1,11 @@
.block .content {background-color:[[setting:backgroundcolor]];} .block .content {background-color:[[setting:backgroundcolor]];}
#page-content #region-main-box {left:[[setting:regionwidth]];} #page-content #region-main-box {left:[[setting:regionwidthplus10]];}
#page-content #region-main-box #region-post-box {margin-left:-[[setting:regionwidthdouble]];} #page-content #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-pre {width:[[setting:regionwidth]];left:[[setting:regionwidth]];}
#page-content #region-main-box #region-post-box #region-post {width:[[setting:regionwidth]];} #page-content #region-post {width:[[setting:regionwidth]];}
#page-content #region-main-box #region-post-box #region-main-wrap #region-main {margin-left:[[setting:regionwidthdouble]];} #page-content #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-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]];} .side-pre-only #page-content #region-main {margin-left:[[setting:regionwidth]];}
/* #page {width:[[setting:regionwidth]]%;margin:15px (100-[[setting:regionwidth])/2% 0;} */
/* #page {min-width: 934px;} */
/** Custom CSS **/ /** Custom CSS **/
[[setting:customcss]] [[setting:customcss]]

View file

@ -7,10 +7,11 @@
.path-mod-forum .forumheaderlist th {background: url([[pix:theme|gradient-sb]]) repeat-x 0 0} .path-mod-forum .forumheaderlist th {background: url([[pix:theme|gradient-sb]]) repeat-x 0 0}
.path-mod-forum .forumheaderlist .r1 td { background:#f5f5f5; } .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 .subject { font-size:1.25em; }
.forumpost .topic .author { font-style:italic;color:#444;font-size:0.95em; } .forumpost .topic .author { font-style:italic;color:#444;font-size:0.95em; }
.forumpost .content { border-bottom:5px solid #aaa;padding:5px 7px 10px 7px; } .forumpost .content .posting { padding:5px 7px 10px 7px; }
.forumpost .options { border-bottom:5px solid #aaa;}
/* Assignments /* Assignments
--------------------------*/ --------------------------*/

View file

@ -38,8 +38,8 @@ $THEME->name = 'fusion';
$THEME->parents = array( $THEME->parents = array(
'canvas', 'canvas',
'base', 'base',
); );
///////////////////////////////////////////////////// /////////////////////////////////////////////////////
@ -54,10 +54,10 @@ $THEME->parents = array(
$THEME->sheets = array( $THEME->sheets = array(
'core', 'core',
'pagelayout', 'pagelayout',
'menus', 'menus',
'settings', 'settings',
); );
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -66,12 +66,12 @@ $THEME->sheets = array(
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
$THEME->parents_exclude_sheets = array( $THEME->parents_exclude_sheets = array(
'base'=>array( 'base'=>array(
'pagelayout', 'pagelayout',
), ),
'canvas'=>array( 'canvas'=>array(
'pagelayout', 'pagelayout',
), ),
); );
@ -156,7 +156,7 @@ $THEME->layouts = array(
'options' => array('nofooter'=>true, 'nonavbar'=>true), 'options' => array('nofooter'=>true, 'nonavbar'=>true),
), ),
'embedded' => array( 'embedded' => array(
'theme' => 'canvas', 'theme' => 'canvas',
'file' => 'embedded.php', 'file' => 'embedded.php',
'regions' => array(), 'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true), 'options' => array('nofooter'=>true, 'nonavbar'=>true),
@ -167,7 +167,11 @@ $THEME->layouts = array(
'regions' => array(), 'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true), 'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
), ),
'report' => array(
'file' => 'general.php',
'regions' => array('side-post'),
'defaultregion' => 'side-post',
),
); );
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
@ -208,14 +212,14 @@ $THEME->layouts = array(
// As above but will be included in the page footer. // As above but will be included in the page footer.
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
$THEME->larrow = '&lang;'; $THEME->larrow = '&lang;';
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// Overrides the left arrow image used throughout // Overrides the left arrow image used throughout
// Moodle // Moodle
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
$THEME->rarrow = '&rang;'; $THEME->rarrow = '&rang;';
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// Overrides the right arrow image used throughout Moodle // Overrides the right arrow image used throughout Moodle

View file

@ -38,14 +38,14 @@ body {
width: 100%; width: 100%;
} }
#page-content #region-main-box #region-post-box { #page-content #region-post-box {
float: left; float: left;
right: 72%; right: 72%;
position: relative; position: relative;
width: 100%; width: 100%;
} }
#page-content #region-main-box #region-post-box #region-main-wrap #region-main { #page-content #region-main {
float: left; float: left;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
@ -54,7 +54,7 @@ body {
width: 72%; width: 72%;
} }
#page-content #region-main-box #region-post-box #region-post { #page-content #region-post {
float: left; float: left;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
@ -62,12 +62,12 @@ body {
width: 28%; 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; overflow: hidden;
padding: 50px 15px 20px 0; 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; overflow: hidden;
padding: 0 0 0 10px; padding: 0 0 0 10px;
} }
@ -84,19 +84,22 @@ body {
right: 0%; right: 0%;
} }
.content-only #page-content #region-main-box #region-post-box { .content-only #page-content #region-post-box {
right: 100%; 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%; left: 100%;
width: 100%; width: 100%;
} }
.content-only #page-content #region-main-box #region-post-box #region-pre { .content-only #page-content #region-pre {
width: 0%; width: 0%;
} }
.content-only #page-content #region-main-box #region-post-box #region-post { .content-only #page-content #region-post {
width: 0%; width: 0%;
} }
.pagelayout-report #page-content #region-main {overflow:auto;}
.pagelayout-report #page-content #region-main .region-content {overflow:visible;}

Some files were not shown because too many files have changed in this diff Show more