]> git.mjollnir.org Git - moodle.git/commitdiff
moodle_page: MDL-12212 add a couple more useful classes to body
authortjhunt <tjhunt>
Wed, 6 May 2009 09:27:16 +0000 (09:27 +0000)
committertjhunt <tjhunt>
Wed, 6 May 2009 09:27:16 +0000 (09:27 +0000)
lib/pagelib.php

index dab145d19138998b2c270bbab682c00042b00283..134d746be022a1a6642e83a50b519894c27da247 100644 (file)
@@ -629,6 +629,12 @@ class moodle_page {
 
         $this->add_body_class($this->url_to_class_name($CFG->wwwroot));
 
+        $this->add_body_class('context-' . $this->context->id);
+
+        if (!empty($this->_cm)) {
+            $this->add_body_class('cmid-' . $this->_cm->id);
+        }
+
         if ($CFG->allowcategorythemes) {
             $this->ensure_category_loaded();
             foreach ($this->_categories as $catid => $notused) {