diff --git a/lib/outputlib.php b/lib/outputlib.php
index 30626b8ed19..eb6c0497718 100644
--- a/lib/outputlib.php
+++ b/lib/outputlib.php
@@ -1718,6 +1718,9 @@ class moodle_core_renderer extends moodle_renderer_base {
// but some of the content won't be known until later, so we return a placeholder
// for now. This will be replaced with the real content in {@link footer()}.
$output = self::PERFORMANCE_INFO_TOKEN;
+ if (debugging('', DEBUG_DEVELOPER)) {
+ $output .= '
This page is: ' . $this->page->debug_summary() . '
';
+ }
if (debugging()) {
$output .= '
- Validate HTML
diff --git a/lib/pagelib.php b/lib/pagelib.php
index 4e001861610..1d63fee10e0 100644
--- a/lib/pagelib.php
+++ b/lib/pagelib.php
@@ -482,6 +482,18 @@ class moodle_page {
return has_any_capability($this->all_editing_caps(), $this->context);
}
+ /**
+ * @return string a description of this page (context, page-type and sub-page.
+ */
+ public function debug_summary() {
+ $summary = 'Context ' . print_context_name($this->context) . ' (context id ' . $this->context->id . '). ';
+ $summary .= 'Page type ' . $this->pagetype . '. ';
+ if ($this->subpage) {
+ 'Sub-page ' . $this->subpage . '. ';
+ }
+ return $summary;
+ }
+
/// Setter methods =============================================================
/**
diff --git a/theme/anomaly/footer.html b/theme/anomaly/footer.html
index c3a1a6b97b0..94b10ed34ef 100644
--- a/theme/anomaly/footer.html
+++ b/theme/anomaly/footer.html
@@ -7,60 +7,50 @@
?>
+
+
+
+
+
+
+
+
+
+
+This page is: ' . $this->page->debug_summary() . '';
+ }
if (debugging()) { ?>
-
-
-
-
-
-
-
-
-
+