From 496929a2e8fb9e9b49a6b61809d5c6e219a8bc85 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20C=2E=20Dagef=C3=B6rde?= Date: Wed, 9 Mar 2016 16:45:42 +0100 Subject: [PATCH] MDL-53407 themes: Add CSS class `editing` only if appropriate The CSS class `editing` should only be added if the user is in editing mode AND she is allowed to edit the rendered page. `user_is_editing()` achieves exactly this, without changing behaviour for the appropriate pages. --- lib/pagelib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pagelib.php b/lib/pagelib.php index 811234f24cc..6c2cd9ca27f 100644 --- a/lib/pagelib.php +++ b/lib/pagelib.php @@ -1756,7 +1756,7 @@ class moodle_page { $this->add_body_class('notloggedin'); } - if (!empty($USER->editing)) { + if ($this->user_is_editing()) { $this->add_body_class('editing'); if (optional_param('bui_moveid', false, PARAM_INT)) { $this->add_body_class('blocks-moving'); -- 2.43.0