]> 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:28:06 +0000 (09:28 +0000)
committertjhunt <tjhunt>
Wed, 6 May 2009 09:28:06 +0000 (09:28 +0000)
lib/pagelib.php

index 134d746be022a1a6642e83a50b519894c27da247..3d4c189b2dbbf3f91420397e7a61596d40e84836 100644 (file)
@@ -635,6 +635,12 @@ class moodle_page {
             $this->add_body_class('cmid-' . $this->_cm->id);
         }
 
+        $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) {