mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
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:
parent
2412f8b882
commit
367a75fae4
125 changed files with 3366 additions and 2062 deletions
|
@ -196,6 +196,7 @@
|
|||
$options = new stdClass;
|
||||
$options->noclean = true;
|
||||
$options->para = false;
|
||||
$options->overflowdiv = true;
|
||||
if (!isset($category->descriptionformat)) {
|
||||
$category->descriptionformat = FORMAT_MOODLE;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
$summaryformatoptions = new stdClass();
|
||||
$summaryformatoptions->noclean = true;
|
||||
$summaryformatoptions->overflowdiv = true;
|
||||
echo format_text($summarytext, $thissection->summaryformat, $summaryformatoptions);
|
||||
|
||||
if ($PAGE->user_is_editing() && has_capability('moodle/course:update', $coursecontext)) {
|
||||
|
@ -229,6 +230,7 @@ while ($section <= $course->numsections) {
|
|||
$summarytext = file_rewrite_pluginfile_urls($thissection->summary, 'pluginfile.php', $coursecontext->id, 'course', 'section', $thissection->id);
|
||||
$summaryformatoptions = new stdClass();
|
||||
$summaryformatoptions->noclean = true;
|
||||
$summaryformatoptions->overflowdiv = true;
|
||||
echo format_text($summarytext, $thissection->summaryformat, $summaryformatoptions);
|
||||
} else {
|
||||
echo ' ';
|
||||
|
|
|
@ -99,8 +99,9 @@ defined('MOODLE_INTERNAL') || die();
|
|||
|
||||
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
|
||||
$summarytext = file_rewrite_pluginfile_urls($thissection->summary, 'pluginfile.php', $coursecontext->id, 'course', 'section', $thissection->id);
|
||||
$summaryformatoptions = new stdClass();
|
||||
$summaryformatoptions = new stdClass;
|
||||
$summaryformatoptions->noclean = true;
|
||||
$summaryformatoptions->overflowdiv = true;
|
||||
echo format_text($summarytext, $thissection->summaryformat, $summaryformatoptions);
|
||||
|
||||
if ($PAGE->user_is_editing() && has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) {
|
||||
|
@ -230,8 +231,9 @@ defined('MOODLE_INTERNAL') || die();
|
|||
echo '<div class="summary">';
|
||||
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
|
||||
$summarytext = file_rewrite_pluginfile_urls($thissection->summary, 'pluginfile.php', $coursecontext->id, 'course', 'section', $thissection->id);
|
||||
$summaryformatoptions = new stdClass();
|
||||
$summaryformatoptions = new stdClass;
|
||||
$summaryformatoptions->noclean = true;
|
||||
$summaryformatoptions->overflowdiv = true;
|
||||
echo format_text($summarytext, $thissection->summaryformat, $summaryformatoptions);
|
||||
|
||||
if ($PAGE->user_is_editing() && has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) {
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
echo $OUTPUT->box_start('generalbox info');
|
||||
|
||||
$course->summary = file_rewrite_pluginfile_urls($course->summary, 'pluginfile.php', $context->id, 'course', 'summary', NULL);
|
||||
echo format_text($course->summary, $course->summaryformat, NULL, $course->id);
|
||||
echo format_text($course->summary, $course->summaryformat, array('overflowdiv'=>true), $course->id);
|
||||
|
||||
if (!empty($CFG->coursecontact)) {
|
||||
$coursecontactroles = explode(',', $CFG->coursecontact);
|
||||
|
|
|
@ -1272,6 +1272,7 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
|
|||
|
||||
$labelformatoptions = new stdClass();
|
||||
$labelformatoptions->noclean = true;
|
||||
$labelformatoptions->overflowdiv = true;
|
||||
|
||||
/// Casting $course->modinfo to string prevents one notice when the field is null
|
||||
$modinfo = get_fast_modinfo($course);
|
||||
|
@ -2322,6 +2323,7 @@ function print_course($course, $highlightterms = '') {
|
|||
$options = NULL;
|
||||
$options->noclean = true;
|
||||
$options->para = false;
|
||||
$options->overflowdiv = true;
|
||||
if (!isset($course->summaryformat)) {
|
||||
$course->summaryformat = FORMAT_MOODLE;
|
||||
}
|
||||
|
@ -2468,6 +2470,7 @@ function print_remote_course($course, $width="100%") {
|
|||
$options = NULL;
|
||||
$options->noclean = true;
|
||||
$options->para = false;
|
||||
$options->overflowdiv = true;
|
||||
echo format_text($course->summary, $course->summaryformat, $options);
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
}
|
||||
|
||||
$PAGE->set_url('/course/report/outline/index.php', array('id'=>$id));
|
||||
$PAGE->set_pagelayout('admin');
|
||||
$PAGE->set_pagelayout('report');
|
||||
|
||||
require_login($course);
|
||||
$context = get_context_instance(CONTEXT_COURSE, $course->id);
|
||||
|
@ -47,6 +47,7 @@
|
|||
|
||||
$outlinetable = new html_table();
|
||||
$outlinetable->attributes['class'] = 'generaltable boxaligncenter';
|
||||
$outlinetable->attributes['style'] = 'width:2000px;';
|
||||
$outlinetable->cellpadding = 5;
|
||||
$outlinetable->id = 'outlinetable';
|
||||
$outlinetable->head = array($stractivity, $strviews);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue