CONFIGURABLE REPORT

CONFIGURABLE REPORT

od Yamil Hc -
Število odgovorov: 2

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?

Povprečje ocenitev: -
V odgovor na Yamil Hc

Re: CONFIGURABLE REPORT

od AL Rachels -
Slika Core developers Slika Particularly helpful Moodlers Slika Plugin developers Slika Testers

In Moodle, file information is usually in the mdl_files table.

V odgovor na AL Rachels

Re: CONFIGURABLE REPORT

od Yamil Hc -
Hi, thanks for you answer.
I was looking at the tables and the information I needed is in the "mdl_resource" table and the query was as follows:

SELECT c.shortname, c.fullname, r.id, r.name, r.intro

FROM mdl_course AS c
JOIN mdl_resource AS r ON c.id = r.course
JOIN mdl_groups AS g ON c.id = g.courseid

WHERE g.name LIKE 'VIRT'
OR g.name LIKE 'VIRT1'
OR g.name LIKE 'VIRT2'
OR g.name LIKE 'VIRT3'
OR g.name LIKE 'VIRT4'

#in my case I needed to filter by especific groups of the courses

And it's succefull