forum only role creation

Easier method

by Bob H. -
Number of replies: 0
Anthony:

Thank you for your kind message! I'm always happy to contribute! I've seen your webpage, estás invitado a México de nuevo, asi que ya sabes, cuando quieras volver sólo avísame!

By the way, in a further moodle tweaking I found an EASIER way to achieve what Ryan was looking for:

1. Create a duplicate of the "student" role. Rename it "Forum-only-teacher" or whatever you want to name it.

2. Now you're going to edit the original "student" role. Set the following abilities to ALLOW:
moodle/course:viewhiddenactivities
moodle/course:viewhiddencourses
moodle/course:viewhiddensections

3. Now you need to edit your new "Forum-only-teacher". Set the following abilities to PROHIBIT:
moodle/course:viewhiddenactivities
moodle/course:viewhiddencourses
moodle/course:viewhiddensections

4. Go to any course, activate edition mode and click on the little eye below the light bulb in every section, except the section where the forum is (if your forum is sharing other activities or resources in the same section, you will need to put the forum in a different section - otherwise use the more complex method I described on October 23rd in this same thread). Once the eyes below the light bulbs are "closed", those sections will be hidden for the Forum-only-teachers but visible for the students.

As I mentioned before, the drawback is that (depending on the theme you're using) the hidden sections will be marked with a gray background. You will need to edit the "styles_color.css" file in your theme. Look for the following code lines:

#course-view .weekscss .hidden,
#course-view .hidden td.side {
background: #CCCCCC;
}

#course-view .hidden td.content {
background: #CCCCCC;

You only need to replace the background hex color codes with the color of the background in a visible section (normally white, or #FFFFFF). Now your students will see no difference in the background color of all sections!

Now this seems to be easier, isn't it? big grin