Problem Description
i am trying to write a query to get the name and path of files of a course in Moodle but it seems like i am never be able to do it. Here is what i have done uptill now , any help with this is highly appreciated :)
SELECT SOURCE file,
course,
contenthash path
FROM mdl_files
INNER JOIN mdl_context ON mdl_files.contextid = mdl_context.id
JOIN mdl_resource ON instanceid = mdl_resource.id
WHERE course=
(SELECT id
FROM mdl_course
WHERE fullname="XXXX")
AI-Generated Solution
Powered by LMSouq AI · GPT-4.1-mini
Analyzing problem and generating solution…
Was this solution helpful?