Cannot make Alert Box work with Custom Profile Field Restriction work

Cannot make Alert Box work with Custom Profile Field Restriction work

by Peter Diedrichs -
Number of replies: 3
Picture of Particularly helpful Moodlers

Alert boxes directed to all Logged In users works fine, but when I set it for only the role student, it doesn't show up.

I suppose the value in the setting should be the short name of role that should get the alert?

Release 3.9.1.2, version 2020073109 on Moodle 3.9.7 (Build: 20210510)


My settings:




Average of ratings: -
In reply to Peter Diedrichs

Re: Cannot make Alert Box work with Custom Profile Field Restriction work

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

As far as I'm aware, the 'alertkey' field has nothing to do with roles, its just a key pertaining to the alert as a means of telling if it has been dismissed or not. As for 'alertaccess', I've not much of idea how this code works as I didn't write it or was involved in the requirements for the functionality. But as far as I'm aware it's all to do with 'custom user profile fields' and nothing in core as supplied.

Gareth
Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Cannot make Alert Box work with Custom Profile Field Restriction work

by Peter Diedrichs -
Picture of Particularly helpful Moodlers
Ah, I see, thank you Gareth. I mistook "Custom User Profile Feild" for referring to the function's customability, not the extra user profile fields one can add in Moodle.
A great feature to be added would be to be able to direct different alerts/info depending on roles, though.
In fact, we already do so with our guide system (Inline Manual), but it would be a "nice to have" directly in the theme.
In reply to Peter Diedrichs

Re: Cannot make Alert Box work with Custom Profile Field Restriction work

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Interesting Peter, thank you for your reply.