Bonjour,
I am using Moodle 1.8.6. All the users are redirected to their 'my' page (mymoodleredirect = true).
As admin, I have added some fixed blocks to this 'my' page.
I have prevented the users to modify this 'my' page (its blocks) by setting moodle/my:manageblocks capability to 'Prevent' for the "authenticated user" (which is my default role).
OK, they can no more modify this page. However the standard button [Edit this page]/[Normal mode] still appears on this 'my' page and is clickable. How can I hide this button?
Arnaud
Hi Arnaud,
I can't say for sure is this is best practice, but here's what I did:
Go to line 49 (in Moo 1.9) in 'my/pagelib.php'
Replace this line:
print_header($title, $header,$navigation,'','',true, $button, $loggedinas);
With this:
print_header($title, $header,$navigation,'','',true, '', $loggedinas);
So we just send an empty string instead of $button.
Craig
I can't say for sure is this is best practice, but here's what I did:
Go to line 49 (in Moo 1.9) in 'my/pagelib.php'
Replace this line:
print_header($title, $header,$navigation,'','',true, $button, $loggedinas);
With this:
print_header($title, $header,$navigation,'','',true, '', $loggedinas);
So we just send an empty string instead of $button.
Craig
Thank you Craig for your workaround.
In my case, it's works fine
.
However, as you said, it's not an universal solution. Because it doesn't work if some users have the capability to change this 'my' page. In this case they need this button.
If there is no other solution, I will open a new bug in the tracker.
In my case, it's works fine

However, as you said, it's not an universal solution. Because it doesn't work if some users have the capability to change this 'my' page. In this case they need this button.
If there is no other solution, I will open a new bug in the tracker.
For this issue, I have opened a new minor bug in the tracker: http://tracker.moodle.org/browse/MDL-16310