Skip to content

Commit

Permalink
corrected a bug with teacher rights
Browse files Browse the repository at this point in the history
  • Loading branch information
urs_hunkler committed Jul 21, 2006
1 parent 889d2b5 commit d0b4e82
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions theme/chameleon/ui/chameleon.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
if (isset($course->id)) { if (isset($course->id)) {
$chameleon_courseparam = '?id=' . $course->id; $chameleon_courseparam = '?id=' . $course->id;
if (!$chameleon_isadmin) { if (!$chameleon_isadmin) {
$chameleon_isteacher = (isteacher($course->id) && isset($CFG->coursetheme)); $chameleon_isteacher = (isteacheredit($course->id) && isset($CFG->coursetheme));
} }
} else { } else {
$chameleon_courseparam = ''; $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 // 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 // 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; // $chameleon_theme = (isset($CFG->coursetheme)) ? $CFG->coursetheme : $CFG->theme;
Expand Down

0 comments on commit d0b4e82

Please sign in to comment.