mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-19010: In developer debug mode, print information about this page in the footer.
This commit is contained in:
parent
cb4f6179d5
commit
2c0901cb5a
3 changed files with 48 additions and 43 deletions
|
@ -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 .= '<div class="performanceinfo">This page is: ' . $this->page->debug_summary() . '</div>';
|
||||
}
|
||||
if (debugging()) {
|
||||
$output .= '<div class="validators"><ul>
|
||||
<li><a href="http://validator.w3.org/check?verbose=1&ss=1&uri=' . urlencode(qualified_me()) . '">Validate HTML</a></li>
|
||||
|
|
|
@ -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 =============================================================
|
||||
|
||||
/**
|
||||
|
|
|
@ -7,60 +7,50 @@
|
|||
?>
|
||||
|
||||
<div id="footer-b" class="clearfix">
|
||||
<div id="footer-l">
|
||||
<div id="footer-r">
|
||||
<div id="footer-m" class="clearfix">
|
||||
|
||||
<div id="footer-logo">
|
||||
<a href="http://moodle.org" target="_blank"><img src="<?php echo $CFG->themewww .'/'. current_theme() ?>/images/logo.jpg" title="Moodle <?php echo $CFG->release ?>" /></a>
|
||||
</div>
|
||||
<div id="footer-l">
|
||||
<div id="footer-r">
|
||||
<div id="footer-m" class="clearfix">
|
||||
|
||||
<div id="footer-logo">
|
||||
<a href="http://moodle.org" target="_blank"><img src="<?php echo $CFG->themewww .'/'. current_theme() ?>/images/logo.jpg" title="Moodle <?php echo $CFG->release ?>" /></a>
|
||||
</div>
|
||||
|
||||
<div id="footer-helplink">
|
||||
<?php echo page_doc_link(get_string('moodledocslink')); ?>
|
||||
</div>
|
||||
<div id="footer-helplink">
|
||||
<?php echo page_doc_link(get_string('moodledocslink')); ?>
|
||||
</div>
|
||||
|
||||
<div id="footer-loggedinas">
|
||||
<?php echo $loggedinas; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
if ($navigation and false) { ?>
|
||||
<div class="navbar clearfix">
|
||||
<div class="breadcrumb"><?php print_navigation($navigation); ?></div>
|
||||
<div class="menu"><?php echo $menu; ?></div>
|
||||
<div id="footer-loggedinas">
|
||||
<?php echo $loggedinas; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
if (!empty($performanceinfo)) {
|
||||
</div>
|
||||
<?php print_container_end(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- end #page -->
|
||||
<?php if (!empty($performanceinfo)) {
|
||||
echo $performanceinfo;
|
||||
}
|
||||
|
||||
if (debugging()) {
|
||||
echo '<div class="performanceinfo">This page is: ' . $this->page->debug_summary() . '</div>';
|
||||
}
|
||||
if (debugging()) { ?>
|
||||
<div class="validators"><ul>
|
||||
<div class="validators"><ul>
|
||||
<li><a href="http://validator.w3.org/check?verbose=1&ss=1&uri=<?php echo urlencode(qualified_me()) ?>">Validate HTML</a></li>
|
||||
<li><a href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=-1&url1=<?php echo urlencode(qualified_me()) ?>">Section 508 Check</a></li>
|
||||
<li><a href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=0&warnp2n3e=1&url1=<?php echo urlencode(qualified_me()) ?>">WCAG 1 (2,3) Check</a></li>
|
||||
</ul></div>
|
||||
<?php }
|
||||
|
||||
print_container_end();
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- end #page -->
|
||||
<?php } ?>
|
||||
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
/* <![CDATA[ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue