How to keep certain roles from seeing course content or quiz

How to keep certain roles from seeing course content or quiz

by Jackie Toth -
Number of replies: 9

Happy Friday!  We have a custom role that is very similar to the Course Creator role.  We have one course creator that does not want his content or quizzes visible to other Course Creators but would need to be visible to students.  Any ideas?

Average of ratings: -
In reply to Jackie Toth

Re: How to keep certain roles from seeing course content or quiz

by Ravi Murugesan -
Picture of Particularly helpful Moodlers Picture of Testers
Hi Jackie - Do the course creators all have the ability to view hidden sections and activities? If so, I don't think it would be possible to hide a particular resource/activity from them. On the other hand, if course creators do not have that level of permissions (ie, they can't view hidden sections and activities), you could try doing this:

1. Add the 'restrict by role' plugin to your site: https://moodle.org/plugins/availability_role.
2. Set conditional access for the relevant resources and activities: these should be to be restricted to (i) anyone with the student *role*, OR (ii) the *name* of the specific course creator (and it should be hidden otherwise).
In reply to Ravi Murugesan

Re: How to keep certain roles from seeing course content or quiz

by Jackie Toth -
Good Morning Ravi. the course and quiz questions cannot be hidden from students and we cannot add a plugin.
In reply to Ravi Murugesan

Re: How to keep certain roles from seeing course content or quiz

by Jackie Toth -
Ravi. Aren't quiz questions hidden from others by default?
In reply to Ravi Murugesan

Re: How to keep certain roles from seeing course content or quiz

by Jackie Toth -
Hey Ravi, Are you suggesting that the course creator who owns the course hides the activities and ensure that course creators do not have the ability to view hidden resources/activities?
In reply to Jackie Toth

Re: How to keep certain roles from seeing course content or quiz

by Joost Elshoff -
Picture of Particularly helpful Moodlers Picture of Testers
Hi Jackie,
First of all, a few checks:
Your custom Course Creator users have their roles assigned at site or category level?
In the latter case, the best way to solve your design issue would be to assign this Course Creator to a different category the others don't have access to. To achieve this, you'd need all the Course Creators to be assigned at category level rather than at site level, as this determines te scope of their capabilities. If they are assigned as Course Creators in category A, they'd have access to everything in A and subcategories A1, A2 and A3, but not in category B (and subcategories B1, B2, B3).

Does that make sense?

Assigning a Course Creator role at category level rather than at site level makes sense, as this would limit their access to data and information that falls out of scope for their work.
In reply to Joost Elshoff

Re: How to keep certain roles from seeing course content or quiz

by Jackie Toth -
Hi Ravi. Yes, this makes perfect sense. Currently, however, the Course Creator role is at the system level. Any ideas how to address my dilemma knowing that?
In reply to Jackie Toth

Re: How to keep certain roles from seeing course content or quiz

by Jackie Toth -
Also, what effect does hiding the activities have on the learner? I know that, if I hide the course, students cannot see it. I am assuming that hiding an activity acts the same way.
In reply to Jackie Toth

Re: How to keep certain roles from seeing course content or quiz

by Jackie Toth -
Hi Ravi. I do appreciate you sticking with me on this. I just checked our custom role and 'Context types where this role may be assigned' is actually set to 'Course'
In reply to Jackie Toth

Re: How to keep certain roles from seeing course content or quiz

by Jackie Toth -
Sorry. Meant to direct this to Joost.