Are roles suitable to allow/block access to activities?

Are roles suitable to allow/block access to activities?

by stefano federici -
Number of replies: 4

I would like to be able to create resources/activities (quizzies, assignments, files, etc) that are only accessible/visible to several of my students (I have a mixed classroom-online course and I would like to be able to show exam materials only to the students that are present in the classroom). Is that possible by means of Moodle's Roles/Capabilities?

Thanks

Stefano

Average of ratings: -
In reply to stefano federici

Re: Are roles suitable to allow/block access to activities?

by Fred Quay -
Hi Stefano,

I guess no in that case. What makes your group identity is location.

So use the Quizz IP range restriction when you create the activity to make it visible only to the students presents in your classroom.
What for other activities which do not control IP ?

If you would create a start quizz which tests student presence and link assignment, files, any resources inside the quiz...

I think about a problem : how to hide linked activities to absent students ?
If you hide them, I fear they won't be accessible to any students (test that case),
Or create them in a hidden theme of your course, but some clever students could access them through ressource interface.

Or create them in another course with key access : forget all and dedicate a course with key access to your classroom session...

I hope it helps.

Your problem is mine, since yesterday I thought about activity access througn a key, which could answer the problem...

In reply to Fred Quay

Re: Are roles suitable to allow/block access to activities?

by stefano federici -

Hi Fred,

I installed version 1.7 of Moodle (I've been using 1.5 until now) to test roles and capabilities. I made some tests and I realized that I can:

  1. create a new role (or several new roles) that will inherit from the "student" role
  2. go to the activity to which I'm interested at controlling the access.
  3. add to the new role those students that are allowed to access the activity
  4. add all remaining students to the standard "student" account
  5. remove the regular access permissions from the "student" role

By doing this, all students that are not in the new role won't be allowed to access the activity. I should be able to even create several different roles so that I can quickly switch the group of students (I need it when doing exams in the classroom to several consecutive groups of students), and this without having to change the role assignments.

What do you think? Do you see problems in using this strategy?

Thanks for your help

Stefano

In reply to stefano federici

Re: Are roles suitable to allow/block access to activities?

by John Isner -
I do see a problem with this strategy. If you assign the restricted role inside a particular activity context (say a quiz), you do not prevent any students from entering the quiz, since everyone is a Student in the course context and has mod/quiz:attempt = Allow. Once inside the quiz, the restricted role's restrictions may be irrelevant, since the student has already gained access, and the activity may no longer check the capability.

If you assign the restricted roles in the course context, then you will prevent a given student from taking ALL instances of the activity, not just a particular instance. I don't think this is what you want.
In reply to John Isner

Re: Are roles suitable to allow/block access to activities?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
It think you are wrong here John.

The quiz (and everything else) checks capabilities on every page load, so if you don't have mod/quiz:attempt in the context of that module, you really can't attempt the quiz. So assigning a restricted role in the quiz context will work to restrict access.


Average of ratings: Useful (1)