Hi, I'm trying make a reports about, What course have files or informations upload by teachers or what course doesn't have information upload by your teacher?
I make this query:
SELECT cs.id, cs.course, cs.section, cs.name AS 'Contenido',
c.shortname, c.fullname, g.name AS 'Grupo'
FROM mdl_course AS c
JOIN mdl_course_sections AS cs ON cs.course = c.id
JOIN mdl_groups AS g ON g.courseid = c.id
JOIN mdl_groups_members AS gm ON gm.groupid = g.id
WHERE cs.name = null
AND g.name LIKE '%VIRT'
OR g.name LIKE '%VIRT1'
OR g.name LIKE '%VIRT2'
OR g.name LIKE '%VIRT3'
OR g.name LIKE '%VIRT4'
But this query doesn't have the correct result, I want to know what's the table have information about the files of a course o what is the correct method to know what course have files or information upload or what not?