hide settings block from students

hide settings block from students

Sarah Knight發表於
Number of replies: 6

Hello!!
I'd like to hide the settings block from students (the block with "edit profile settings"). But I want to be able to see the settings block when I am logged in as administrator. Is that possible?
I'd appreciate your help!!

評比平均分數: -
In reply to Sarah Knight

Re: hide settings block from students

Mary Evans發表於

No because the student needs the settings block in other areas of Moodle. If you don't want students to change their profile, then deny them this privilege when you define the STUDENT role.

In reply to Mary Evans

Re: hide settings block from students

Sarah Knight發表於

What about hiding that block only in certain areas?? as in the front page....

In reply to Sarah Knight

Re: hide settings block from students

Itamar Tzadok發表於

Yes.

You can add to your theme's frontpage layout something like

if (!$PAGE->user_allowed_editing()) {
    $bodyclasses[] = 'hide_settings_block';
}

and to the theme's core css something like

body.hide_settings_block .block_settings{
    display:none;
}

This should hide the block from anyone without editing permission on the frontpage. 微笑

In reply to Mary Evans

Re: hide settings block from students

Dave Perry發表於

That is really irritating. We're trying to make a section moodle behave more like a website (it's part of a project we have funding for, but some of the principles could be applied to other parts of the college), and the settings block disappearing just for this set of pages is the last obstacle.

I'm tempted to try and hack the block so if it detects it's in a list of course IDs, and role is student, it doesn't render out.

In reply to Dave Perry

Re: hide settings block from students

Mary Evans發表於

Hi,

What if you create a custom block-region and add your settings block into it in those specific pages, in much the same way I have set custom block regions in my Aardvark Post-IT Moodle Themes.

HTH

Mary