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

@ -845,7 +845,8 @@ function glossary_print_entry_default ($entry, $glossary, $cm) {
$options = new stdClass();
$options->para = false;
$options->trusted = $entry->definitiontrust;
$options->context = $context;
$options->context = $context;
$options->overflowdiv = true;
$definition = format_text($definition, $entry->definitionformat, $options);
echo ($definition);
echo '<br /><br />';
@ -873,22 +874,19 @@ function glossary_print_entry_concept($entry, $return=false) {
/**
*
* @global object
* @global array
* @global moodle_database DB
* @param object $entry
* @param object $glossary
* @param object $cm
*/
function glossary_print_entry_definition($entry, $glossary, $cm) {
global $DB;
global $DB, $GLOSSARY_EXCLUDECONCEPTS;
$definition = $entry->definition;
global $GLOSSARY_EXCLUDECONCEPTS;
//Calculate all the strings to be no-linked
//First, the concept
$GLOSSARY_EXCLUDECONCEPTS=array($entry->concept);
$GLOSSARY_EXCLUDECONCEPTS = array($entry->concept);
//Now the aliases
if ( $aliases = $DB->get_records('glossary_alias', array('entryid'=>$entry->id))) {
foreach ($aliases as $alias) {
@ -902,7 +900,8 @@ function glossary_print_entry_definition($entry, $glossary, $cm) {
$options = new stdClass();
$options->para = false;
$options->trusted = $entry->definitiontrust;
$options->context = $context;
$options->context = $context;
$options->overflowdiv = true;
$text = format_text($definition, $entry->definitionformat, $options);
// 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);
$options->overflowdiv = true;
$output .= format_text($entry->definition, $entry->definitionformat, $options);
if (isset($entry->footer)) {
$output .= $entry->footer;