Created
September 17, 2019 15:05
-
-
Save nadavkav/c88cad9a166b23f8f64098ffbf2590c7 to your computer and use it in GitHub Desktop.
What modules are copied from what course? (PETEL)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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