From fb0f70908bf0049daeac6264c1ade50f0f88c25f Mon Sep 17 00:00:00 2001 From: michaelpenne Date: Wed, 26 Oct 2005 21:43:48 +0000 Subject: [PATCH] BUG FIX: if one is a teacher, the left menu is always displayed. --- mod/lesson/action/continue.php | 4 +++- mod/lesson/view.php | 11 +++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/mod/lesson/action/continue.php b/mod/lesson/action/continue.php index de85a6f4655..e24ea2de399 100644 --- a/mod/lesson/action/continue.php +++ b/mod/lesson/action/continue.php @@ -5,7 +5,9 @@ // left menu code // check to see if the user can see the left menu - $lesson->displayleft = lesson_displayleftif($lesson); + if (!isteacher($course->id)) { + $lesson->displayleft = lesson_displayleftif($lesson); + } if ($lesson->displayleft) { if($firstpageid = get_field('lesson_pages', 'id', 'lessonid', $lesson->id, 'prevpageid', 0)) { // print the pages diff --git a/mod/lesson/view.php b/mod/lesson/view.php index 5ac668e7658..4ead95aab96 100644 --- a/mod/lesson/view.php +++ b/mod/lesson/view.php @@ -427,7 +427,9 @@ // check to see if the user can see the left menu - $lesson->displayleft = lesson_displayleftif($lesson); + if (!isteacher($course->id)) { + $lesson->displayleft = lesson_displayleftif($lesson); + } // start of left menu if ($lesson->displayleft) { @@ -853,7 +855,8 @@ $width = ' width="100%"'; } - $fullbuttonhtml = '
'."\n"; + //$fullbuttonhtml = '
'."\n"; + $fullbuttonhtml = ''; if ($page->layout) { // tried to do this with CSS, but couldnt get it to work in MacIE browser. Using tables instead :( // don't care if empty or not because we want to keep the table structure @@ -876,7 +879,7 @@ implode("\n", $temparray). "\n"; } - $fullbuttonhtml .= "
\n"; + //$fullbuttonhtml .= "
\n"; if ($lesson->slideshow) { echo '
' . $fullbuttonhtml . '
'; @@ -896,7 +899,7 @@ print_simple_box_start("center"); } - echo $fullbuttonhtml; + echo '
' . $fullbuttonhtml . '
'; echo ''; print_simple_box_end(); } else {