diff --git a/lib/weblib.php b/lib/weblib.php
index <HASH>..<HASH> 100644
--- a/lib/weblib.php
+++ b/lib/weblib.php
@@ -1663,6 +1663,10 @@ function print_header ($title='', $heading='', $navigation='', $focus='', $meta=
         $pageclass .= ' course-'.SITEID;
     }
 
+    if (!empty($USER->editing)) {
+        $pageclass .= ' editing';
+    }
+
     $bodytags .= ' class="'.$pageclass.'" id="'.$pageid.'"';
 
     include ($CFG->themedir. $CFG->theme .'/header.html');
When in editing mode, add "editing" class to the body.   bug <I>