Block forum for a single user

Block forum for a single user

by Tiffany Morgan -
Number of replies: 8

Hi all

We are using 1.9.5 and have a need to block an individual student from using the forum activity. Ideas on how I might accomplish this?

Thanks!

Average of ratings: -
In reply to Tiffany Morgan

Re: Block forum for a single user

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Hi Tiffany,

There are a number of things that might be applicable, but I have found it useful to create a series of Roles using Student as the parent Role with different capabilities granted. Trying to work with single students was not easy but when using Roles, it is so much simpler. I keep an extensive description of what Role does what and what students have been assigned to those Roles. They revert to normal Student Role when they no longer need that capabiltiy. I have never considered denying a capability as if anyone had done something to attract my attention, that student is denied access until the matter is sorted. (Usually this has been around harassment issues but very occasonally not.) However, there is no reason to suspect that you could not have a Role that denies capabilities, in this case, the capabiity of replying to a forum, or access to the forum. Create the Role, change the permissions, assign the student to it. That should do the trick.

In reply to Tiffany Morgan

Re: Block forum for a single user

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

This is rather brief, but it is correct: http://docs.moodle.org/19/en/Useful_things_a_teacher_can_do_with_roles#Provide_temporary_read-only_access_to_a_naughty_student

The steps are:

  1. Admin creates a new role called 'Naughy student' (or something more politically correct).
  2. When setting up that role, set the permission for relevant capabilities, like the forum ones, to PROHIBIT.
  3. Assign that role to the student you want to block.
In reply to Tim Hunt

Re: Block forum for a single user

by Tiffany Morgan -

Thanks Tim. I tried that (or at least I think I set it up correctly). I created a new system role that was a duplicate of the student role. I set the "view disucussion" permission to prohibit, and that was the only permission I modified. I assigned a user to that role at the course level which successfully blocked the student from seeing the forums, but now the student was no longer showing up in the gradebook. The user could still take assessments, but when logged in as a teacher I could not see user in the gradebook.

 

Any ideas?

In reply to Tiffany Morgan

Re: Block forum for a single user

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I would not do it like that.

I think that the 'Bad student' role should not be based on any other role. Instead, it should have most permisisons 'Not set', except for the forum permissions that you want to 'Prohibit'.

Then, assign the Bad student role in addtion to the other roles that the user has.

Can you try that?

Average of ratings: Useful (1)
In reply to Tim Hunt

Re: Block forum for a single user

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Tim, interesting point, assigning roles in tandem, but does that not set up a potential for conflicting roles? This is why I have always used a single Role, to avoid just that.

In reply to Colin Fraser

Re: Block forum for a single user

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 is not a problem. Multiple roles combine in well-defined ways precisely so you can do things like what I suggest. Indeed, most of the time people have at least two separate roles, Teacher or Student in addition to Authenticated user.

The exact rules for how roles combine is very complicated in Moodle 1.9. It was simplified in 2.x. Section 13.2 at http://www.aosabook.org/en/moodle.html is my attempt to explain it. (Warning, that is aimed at developers, not end users.)

In reply to Tim Hunt

Re: Block forum for a single user

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Ahhh thanks Tim, it is good to know that, and that it can be applied without developing conflicting situations.  Thanks.