Creating a 'Preview' Role and My Courses Problem

Creating a 'Preview' Role and My Courses Problem

by Alison Pope -
Number of replies: 1
I've seen some discussion about this issue including MDL-7764 and Craig launched a discussion on 'hidden roles' but it is not clear whether there is a solution that will fit my scenario.

I am testing this on Moodle version: Moodle 1.8 Beta + (2007021501) (which is a bit out of date for a start!)

Scenario: We want to be able to allow logged in users read access to any course on the system. We want any user in the college to be able to see or preview a course they are not enrolled on. This is to promote transparency and sharing of best practice within the college and also allow students to preview course content whilst making their enrolment selections at the start of term. We want tutors to be able to decide whether to allow guests from outside the college to view their course by using the guest role as previously.

Issue: If I set the default role to authenticateduser for any logged in user and assign the authenticateduser role the view:course permission then all courses appear on the my course list because it is the view:course capability that sees to control the population of this list. We would only want the courses the is explicitly paticipating in as an enrolled student or teacher to appear in the my courses list.

So my question is does anyone know of a good way to create a role that will allow any authenticated user to read but not participate in a course and only list in My Courses the courses they can particpate in not those they can view?

Thanks,
Alison
Average of ratings: -
In reply to Alison Pope

Re: Creating a 'Preview' Role and My Courses Problem

by Alison Pope -
Just replying to myself in case anyone is interest in my current experimental solution. In addition to watching MDL-8902 I've currently changed line 756 in datalib.php so get_my_courses filters on the capability user:viewusergrades instead of course:viewcourse. It seems to fulfill our needs at the mometns but will wait and see if there are any knock on effects in further testing.
Alison
Average of ratings: Useful (2)