BUG FIX: if one is a teacher, the left menu is always displayed.

This commit is contained in:
michaelpenne
2005-10-26 21:43:48 +00:00
parent 41f7a86012
commit fb0f70908b
2 changed files with 10 additions and 5 deletions
+3 -1
View File
@@ -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
+7 -4
View File
@@ -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 = '<div class="branchbuttoncontainer">'."\n";
//$fullbuttonhtml = '<div class="branchbuttoncontainer">'."\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("</td></tr>\n<tr><td align=\"center\">", $temparray).
"</td></tr></table>\n";
}
$fullbuttonhtml .= "</div>\n";
//$fullbuttonhtml .= "</div>\n";
if ($lesson->slideshow) {
echo '<div class="branchslidetop">' . $fullbuttonhtml . '</div>';
@@ -896,7 +899,7 @@
print_simple_box_start("center");
}
echo $fullbuttonhtml;
echo '<div class="branchbuttoncontainer">' . $fullbuttonhtml . '</div>';
echo '</table></table>';
print_simple_box_end();
} else {