From 4627726954c8665bb2a986e5cedb00adcd940b51 Mon Sep 17 00:00:00 2001 From: Joseph Rezeau Date: Fri, 5 Dec 2014 17:36:41 +0100 Subject: [PATCH] MDL-36673 mod_lesson: slideshow mode not working --- mod/lesson/renderer.php | 5 ++++- mod/lesson/view.php | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mod/lesson/renderer.php b/mod/lesson/renderer.php index 872e598420b..6c6496b7899 100644 --- a/mod/lesson/renderer.php +++ b/mod/lesson/renderer.php @@ -560,14 +560,17 @@ class mod_lesson_renderer extends plugin_renderer_base { public function slideshow_start(lesson $lesson) { $attributes = array(); $attributes['class'] = 'slideshow'; - $attributes['style'] = 'background-color:'.$lesson->bgcolor.';height:'.$lesson->height.'px;width:'.$lesson->width.'px;'; + $attributes['style'] = 'background-color:'.$lesson->properties()->bgcolor.';height:'. + $lesson->properties()->height.'px;width:'.$lesson->properties()->width.'px;'; $output = html_writer::start_tag('div', $attributes); + return $output; } /** * Returns HTML to show the end of a slideshow */ public function slideshow_end() { $output = html_writer::end_tag('div'); + return $output; } /** * Returns a P tag containing contents diff --git a/mod/lesson/view.php b/mod/lesson/view.php index 4b6824a6f5c..097a93cdb11 100644 --- a/mod/lesson/view.php +++ b/mod/lesson/view.php @@ -410,7 +410,6 @@ if ($pageid != LESSON_EOL) { echo ''; } echo $lessoncontent; - echo $lessonoutput->slideshow_end(); echo $lessonoutput->progress_bar($lesson); echo $lessonoutput->footer();