Security and privacy

Performance info only for admins?

 
Picture of Christos Savva
Performance info only for admins?
Plugin developers

Hello I was wondering if it is possible to hide Performance info from users and make these information only available to admins.


Is there an option like that or I should mess with the code to achieve this?


Kind regards

Christos

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: Performance info only for admins?
Core developersDocumentation writersParticularly helpful MoodlersPlugin developers

I don't think there is an option for that.

If you want to mess with the code - well, here is how we did it in one OU theme. At the top of the layout file for our theme (theme/ou/layout/general.php - our theme only has one. Other themes might have more, in which case there might be a better place to do this) we added this code.

// Turn perf info on for admins
if (is_siteadmin()) {
$CFG->perfdebug = 8;
}

I *think* that is all that is required.

 
Average of ratings: Useful (3)
Picture of Christos Savva
Re: Performance info only for admins?
Plugin developers

Worked like a charm on a child theme based on boost!


Thank you!

 
Average of ratings: -
Picture of Christos Savva
Re: Performance info only for admins?
Plugin developers

Just one comment,


I put 15 instead of 8


$CFG->perfdebug = 15;

8 was not showing all info dont know how it works, but I enabled Performance and saw that in the DB the value was 15. So I applied it to the code as wellsmile

 
Average of ratings: -