Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
What modules are copied from what course? (PETEL)
SELECT
cm.course, cm.id, cm.module, m.name
,CASE m.name
WHEN 'quiz' THEN (SELECT m.name FROM mdl_quiz m WHERE m.id = cm.instance)
END AS 'Module name'
,t.courseid, c.fullname, u.firstname, u.lastname
FROM mdl_local_courseduplicate t
JOIN mdl_course_modules cm ON cm.id = t.sourceactivityid
JOIN mdl_modules m ON m.id = cm.module
JOIN mdl_course c ON c.id = t.courseid
JOIN mdl_user u ON u.id = t.userid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment