From d0b4e8226f4ceb405350bedf767d012adc901a55 Mon Sep 17 00:00:00 2001 From: urs_hunkler Date: Fri, 21 Jul 2006 04:49:47 +0000 Subject: [PATCH] corrected a bug with teacher rights --- theme/chameleon/ui/chameleon.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/theme/chameleon/ui/chameleon.php b/theme/chameleon/ui/chameleon.php index e5f26761323..779c0ddc0b3 100644 --- a/theme/chameleon/ui/chameleon.php +++ b/theme/chameleon/ui/chameleon.php @@ -7,13 +7,13 @@ if (isset($THEME->chameleonenabled) && $THEME->chameleonenabled) { if (isset($course->id)) { $chameleon_courseparam = '?id=' . $course->id; if (!$chameleon_isadmin) { - $chameleon_isteacher = (isteacher($course->id) && isset($CFG->coursetheme)); + $chameleon_isteacher = (isteacheredit($course->id) && isset($CFG->coursetheme)); } } else { $chameleon_courseparam = ''; } - - if ($chameleon_isadmin || $chameleon_isteacher) { + + if ($chameleon_isadmin || ($chameleon_isteacher && !empty($CFG->allowcoursethemes) && !empty($THEME->chameleonteachereditenabled))) { // either we're an admin or we're a teacher and this is being used as the course theme // if we're on a page using a course theme edit that, otherwise edit the main chameleon theme // $chameleon_theme = (isset($CFG->coursetheme)) ? $CFG->coursetheme : $CFG->theme;