Guest access

Guest access

de către Martin LaGrow-
Număr de răspunsuri: 3

Is there a way to configure a report to show which courses have guest access enabled?

Media notelor: -
Ca răspuns la Martin LaGrow

Re: Guest access

de către Randy Thornton-
Imaginea Documentation writers

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'
 
Ca răspuns la Randy Thornton

Re: Guest access

de către Stuart Mealor-

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! supărat

My query just showed Courses that did not have Guest access enabled, but Randy's version is nicer I think surâs

Stu

Ca răspuns la Stuart Mealor

Re: Guest access

de către Randy Thornton-
Imaginea Documentation writers

I hope you borrow it surâs

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.