Creating different custom views for different roles

Creating different custom views for different roles

by avinash kamthe -
Number of replies: 3

Is it possible to create different custom views for different user role. Lets say if admin logged in he will have his custom view/dashboard with multiple options like create course, add users, view reports etc. Where as when student logged in he will have his own custom view where he'll be able see course that he is pursuing along with course status.

Is it possible to create role based custom view/dashboard. if so please guide me. Thanks

Average of ratings: -
In reply to avinash kamthe

Re: Creating different custom views for different roles

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers
Roles are usually applied at a course level, rather than across an entire site, so would not necessarily be applied at a dashboard level.
Where site-wide roles are applied, such as site admin, it would be possible to wrap scripts in a conditional statement so one or other is presented depending on that role (or more likely a capability from that role)
isadmin { php to populate renderer for admin }
    else { php to populate renderer for other users }
Average of ratings: Useful (1)
In reply to Richard Oelmann

Re: Creating different custom views for different roles

by Michael Milette -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
That is an excellent suggestion. The FilterCodes plugin has an {ifadmin}{/ifadmin} tag along with a whole bunch of other useful tags to help you out.

Best regards,

Michael Milette
In reply to avinash kamthe

Re: Creating different custom views for different roles

by Michael Milette -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
If you put the links in a block, you can modify its permissions so that the blocks only appear for certain roles. The option is in the same menu as where you would find the link to Edit the block.
Average of ratings: Useful (1)