Picture of edu g
Re: sidebar in frontpage only for admin

well, I'm  a software engineer and, despite the fact that I'm learning Moodle, I have basic skills and it made sense to me. I deleted it because I did not want any block at all in the front page. I tried removing the blocks using the browser but there was no way to get rid of the Settings block.

I just want a list of courses in the front page for all my students. If the admin sees a side bar with all the blocks it won't cause any harm, though.

What should be the correct way to achieve that?

Average of ratings: -
Gareth J Barnard
Re: sidebar in frontpage only for admin
Group DevelopersGroup Particularly helpful Moodlers

Dear edu g,

Mary is correct in saying about deleting code as that will only lead to maintainability issues - there are far better less sledge hammer solutions to this:

1. Use and set the 'My Moodle' page for users - - no code changes needed.

2. There is a function 'is_siteadmin()' with the $USER global - e.g. if (is_siteadmin($USER)) - I believe that it is not totally recommended and may not be supported in future, but it currently exists.  It does have a replacement but I'd have to look that up.  However, this should get you going.



Average of ratings: -