LDAP enrol autocreate hidden course

LDAP enrol autocreate hidden course

by joe vieira -
Number of replies: 1
Hi,

What I am attempting to accomplish is to have courses which get autocreated to be hidden (not available to users) We've set up a template course that is hidden, however it doesn't seem to propagate those settings over...ideas?

Thanks,

Joe
Average of ratings: -
In reply to joe vieira

Re: LDAP enrol autocreate hidden course

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

The current code just copies the most basic settings from the template course, which doesn't include the visibility setting. If you want to copy that setting from the template, edit create_course() in .../enrol/ldap/enrol.php and search for the line that reads:

$course->visible = 1;

and comment it out. That should do it.

Saludos. Iñaki.