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

@ -2020,6 +2020,7 @@ abstract class lesson_page extends lesson_base {
$options = new stdClass;
$options->noclean = true;
$options->para = true;
$options->overflowdiv = true;
$result->feedback = $OUTPUT->box(format_text($this->get_contents(), $this->properties->contentsformat, $options), 'generalbox boxaligncenter');
$result->feedback .= '<div class="correctanswer generalbox"><em>'.get_string("youranswer", "lesson").'</em> : '.$result->studentanswer; // already in clean html
$result->feedback .= $OUTPUT->box($result->response, $class); // already conerted to HTML

View file

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

View file

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