Is there a way to configure a report to show which courses have guest access enabled?
If you install the Configurable Reports plugin, you can do a report for this. https://moodle.org/plugins/view.php?plugin=block_configurable_reports
Here's code I use to do this (for 2.5) - very basic, but shows you all courses with Guest enrolment whether it has been turned on or not.
SELECT c.shortname, c.fullname,
CASE
WHEN c.visible = 0 THEN 'Hidden'
WHEN c.visible =1 THEN 'Available'
END AS Course_status,
CASE
WHEN e.status = 0 THEN 'On'
WHEN e.status = 1 THEN 'Off but present'
END AS Guest_enabled
FROM prefix_course AS c
JOIN prefix_enrol AS e ON c.id = e.courseid
WHERE e.enrol = 'guest'
Beat me to it Randy !
We had a similar query on www.FreeMoodle.org because we needed to check which Courses had Guest access enabled, and which Teachers had changed it!
My query just showed Courses that did not have Guest access enabled, but Randy's version is nicer I think
Stu
I hope you borrow it
I used to be really paranoid about courses where Guest access might be present but not enabled, in case a Teacher just went clicking around and turned it on by mistake. So the last column in the report is useful for alerting you to that situation.