Hidden Courses and Import

Hidden Courses and Import

by Amy Pont -
Number of replies: 1

Hi,

I have a fairly recent problem that I am not sure has always been the case or not, but within our system, we have set hidden courses as completely hidden from teachers and student, but for some reason, when a teacher goes to Import, they are still able to see and even import from the hidden courses they are attached to.

I have tried all the Hidden permissions (not set, prevent and prohibit) and can't work out why this may be happening and can't seem to find any other permission that relates to importing other than turning of the import permission completely.

Has anyone got any suggestions that may help me please.

Amy

Edit: using Moodle 3.3

Average of ratings: -
In reply to Amy Pont

Re: Hidden Courses and Import

by Randy Thornton -
Picture of Documentation writers
Amy,


It looks like the import process is only checking if the user has the capability moodle/backup:backuptargetimport allowed in the target course(s), which of course a user will have by default if they enrolled in it as a Teacher. Import does not know or check if the course is hidden from the user. In fact, it doesn't even bother to check if the user enrollment in the target course is suspended or not sad

A possible workaround is: If you change the enrolment in the target course so the teacher is actually in the non-editing teacher role, this will do what you want.

Or if you don't want to use that non-editing role for some reason, you could clone the Teacher role, remove the import permission from it, and change the user enrolment role from teacher to this new "no-import-from" teacher role in the target course.

In either case, both accomplish the same thing: the course will not show up on the list of courses to import from because the user does not have that capability allowed there anymore. Of course, if you have a lot of courses, this would be a lot of work depending on why you are hiding the courses from the teachers (eg old archives you don't want them to see or use anymore but you need their enrollment still there.)


Randy