My Moodle: How do I block the editing button on my Moodle page?

Re: My Moodle: How do I block the editing button on my Moodle page?

by Divya muvvala -
Number of replies: 4
I removed the edit function from my/pagelib.php. So now the edit block on MyMoodle page does not work but the button still appears.
In reply to Divya muvvala

Re: My Moodle: How do I block the editing button on my Moodle page?

by Ger Tielemans -
the edit button is created by the function print_header in pagelib.php, so add there your hide button condition?
In reply to Ger Tielemans

Re: My Moodle: How do I block the editing button on my Moodle page?

by Divya muvvala -
Hi Ger, thanks for ur reply. Can you show me the code and where to place it pl.
In reply to Ger Tielemans

Re: My Moodle: How do I block the editing button on my Moodle page?

by Phil Coultier -
Hi Ger, it would be great if you could post the line of code for this.

Thanks,

Phil
In reply to Phil Coultier

Re: My Moodle: How do I block the editing button on my Moodle page?

by John St -
Find this line in my/pagelib.php

print_header($title, $header,$navigation,'','',true, $button, $loggedinas.$langmenu);

You can edit the above to remove the button. This is what I did to remove the button:

print_header($title, $header,$navigation,'','',true);

I would have preferred hiding the button with css, and not touching core code, but there are no selectors applied to it that make it different from the normal turn editing on button...