Skip to content

Commit

Permalink
Merge branch 'MDL-46523-master' of git://github.com/jethac/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Sep 22, 2014
2 parents da483a7 + 4662911 commit 4922a1d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/outputrenderers.php
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,13 @@ public function header() {
$this->page->add_body_class('userloggedinas');
}

// If the user is logged in, and we're not in initial install,
// check to see if the user is role-switched and add the appropriate
// CSS class to the body element.
if (!during_initial_install() && isloggedin() && is_role_switched($this->page->course->id)) {
$this->page->add_body_class('userswitchedrole');
}

// Give themes a chance to init/alter the page object.
$this->page->theme->init_page($this->page);

Expand Down

0 comments on commit 4922a1d

Please sign in to comment.