Skip to content

Commit

Permalink
MDL-38850: Fixed Horizontal bar issue in lesson
Browse files Browse the repository at this point in the history
  • Loading branch information
prateeksachan authored and rwijaya committed Oct 28, 2013
1 parent 67d4599 commit b9fdc61
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mod/lesson/locallib.php
Expand Up @@ -2383,8 +2383,11 @@ public function get_contents() {
$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 '';
}
Expand Down
2 changes: 2 additions & 0 deletions mod/lesson/renderer.php
Expand Up @@ -301,7 +301,9 @@ public function display_edit_full(lesson $lesson, $pageid, $prevpageid, $single=

$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);
Expand Down
2 changes: 2 additions & 0 deletions mod/lesson/report.php
Expand Up @@ -591,7 +591,9 @@
} 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');
Expand Down

0 comments on commit b9fdc61

Please sign in to comment.