accessing theme settings

accessing theme settings

by Sarah Jane -
Number of replies: 8

Can anyone help me please - I have been asked if the manager of a moodle site can access the theme settings. To change logos and color?

I see that as admin I can allow them to select a theme but I need the manager to be able to access the settings of the themes. Is this possible?

I know the admin can and I have searched throughout the forums and docs but I can see if I can give the manager permission to access this area.

Regards

Sarah x

Average of ratings: -
In reply to Sarah Jane

Re: accessing theme settings

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
As with all Roles defined in Moodle, you need to allow only those you feel appropriate. If it is that you are using 'pre-defined' roles for manager then it might be advantageous if you created a new role (Editing manager) and configure it as desired.
In reply to Mary Evans

Re: accessing theme settings - moodle 2.4.4

by Sarah Jane -

Hello Mary

As always thank you. I am happy to create a new role it is the actual configure that I am struggling with.

I can't see the appropriate capability to allow the new role access to the theme settings.

Can you guide me please. Sarah x

In reply to Sarah Jane

Re: accessing theme settings - moodle 2.4.4

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Sarah,

I looked at a few themes and they all have the requirement of '$ADMIN->fulltree' this is set up in 'admin_root' in '/lib/adminlib.php' which in turn is set up by 'admin_get_root' in the same file which is called from all over the place.  I then was not able to determine where it was being specifically called to set up the menu.  But at no time did I find a 'require_capability' type function call, so therefore I think core code needs to be changed to add such a capability.  All this means I think is that only an Administrator can change the settings and there is no capability functionality code in place for this.  It would be a code improvement to do so.

Cheers,

Gareth

Average of ratings: Useful (2)
In reply to Sarah Jane

Re: accessing theme settings - moodle 2.4.4

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Sarah, from what I can gather reading Gareths comments/finding is that you would need to make Editing Manager an Administrator first and then perhaps restrict some of those permissions.  It would be by 'trial' and 'error' I guess.

Hope this helps?

Mary

Average of ratings: Useful (1)
In reply to Mary Evans

Re: accessing theme settings - moodle 2.4.4

by Sarah Jane -

HI Guys

Thank you so very much for your help. I will try your suggestion Mary and see what I can do with limiting the his restrictions.

Many thanks to you both.

Sarah

In reply to Sarah Jane

Re: accessing theme settings - moodle 2.4.4

by Sarah Jane -

Thank you both but having thought about this I am uncomfortable in adding another administrator as I do not see how I can restrict the major roles from this person.

I thought this would have been a usual request for a manager to be able to set the color, logo and links etc., of their sites - I didn't think it would have been important enough for just the site administrator to only have access to this area.    Its a real shame.

Just found this discussion on the same requirement

https://moodle.org/mod/forum/discuss.php?d=221709#p1015454

Sarah x

Average of ratings: Useful (1)
In reply to Sarah Jane

Re: accessing theme settings - moodle 2.4.4

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Sarah,

I've done some digging and there is definitely not a way to just give a user permission to change the theme settings at the moment.  I did a quick look in the tracker - tracker.moodle.org - and could not find anything, so perhaps time to request an improvement.

As a work around, it might be possible for the theme designer to create a custom block that alters the settings via a form etc.  As the settings are stored in the 'config_plugins' table.  Then as with all blocks it could have unique capabilities such that only certain users could access it.  One down side is the fact that not all admin settings have the same code as forms so might not be completely similar.  This is not a trivial task.

Cheers,

Gareth

Average of ratings: Useful (1)