Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-37404 add class 'format-xxx' to the body for the current course f…

…ormat
  • Loading branch information...
commit 27efa6bfac5c891fbc77edca7345d2724599cecd 1 parent 9da506c
Marina Glancy marinaglancy authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/pagelib.php
6 lib/pagelib.php
View
@@ -871,7 +871,11 @@ public function set_course($course) {
// notify course format that this page is set for the course
if ($this->_course->id != $SITE->id) {
require_once($CFG->dirroot.'/course/lib.php');
- course_get_format($this->_course)->page_set_course($this);
+ $courseformat = course_get_format($this->_course);
+ $this->add_body_class('format-'. $courseformat->get_format());
+ $courseformat->page_set_course($this);
+ } else {
+ $this->add_body_class('format-site');
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.