From b9fdc61f99a319cd028f8bdc35e010ff989d2351 Mon Sep 17 00:00:00 2001 From: Prateek Sachan Date: Mon, 28 Oct 2013 11:03:17 +0800 Subject: [PATCH] MDL-38850: Fixed Horizontal bar issue in lesson --- mod/lesson/locallib.php | 7 +++++-- mod/lesson/renderer.php | 2 ++ mod/lesson/report.php | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/mod/lesson/locallib.php b/mod/lesson/locallib.php index 5213a8e6b2f..7011be6e293 100644 --- a/mod/lesson/locallib.php +++ b/mod/lesson/locallib.php @@ -2383,8 +2383,11 @@ abstract class lesson_page extends lesson_base { $this->properties->contentsformat = FORMAT_HTML; } $context = context_module::instance($PAGE->cm->id); - $contents = file_rewrite_pluginfile_urls($this->properties->contents, 'pluginfile.php', $context->id, 'mod_lesson', 'page_contents', $this->properties->id); // must do this BEFORE format_text()!!!!!! - return format_text($contents, $this->properties->contentsformat, array('context'=>$context, 'noclean'=>true)); // page edit is marked with XSS, we want all content here + $contents = file_rewrite_pluginfile_urls($this->properties->contents, 'pluginfile.php', $context->id, 'mod_lesson', + 'page_contents', $this->properties->id); // Must do this BEFORE format_text()! + return format_text($contents, $this->properties->contentsformat, + array('context' => $context, 'noclean' => true, + 'overflowdiv' => true)); // Page edit is marked with XSS, we want all content here. } else { return ''; } diff --git a/mod/lesson/renderer.php b/mod/lesson/renderer.php index be96ee5da87..ac87ac4e158 100644 --- a/mod/lesson/renderer.php +++ b/mod/lesson/renderer.php @@ -301,7 +301,9 @@ class mod_lesson_renderer extends plugin_renderer_base { $pagetable = $page->display_answers($pagetable); + $content .= html_writer::start_tag('div', array('class' => 'no-overflow')); $content .= html_writer::table($pagetable); + $content .= html_writer::end_tag('div'); if ($canedit) { $content .= $this->add_page_links($lesson, $pageid); diff --git a/mod/lesson/report.php b/mod/lesson/report.php index e48dea9fe51..88a8bb45080 100644 --- a/mod/lesson/report.php +++ b/mod/lesson/report.php @@ -591,7 +591,9 @@ if ($action === 'delete') { } else { $table->data[] = array(get_string('didnotanswerquestion', 'lesson'), " "); } + echo html_writer::start_tag('div', array('class' => 'no-overflow')); echo html_writer::table($table); + echo html_writer::end_tag('div'); } } else { print_error('unknowaction');