I have two courses, A & B, where students are enrolled through a metacourse into course A (which has course materials), and manually enrolled into course B (which has assignments). When they finish their course, I want to unenrol them from course B, but keep them in course A so they still have access to their course materials.
This is all fine, but when I unenrol them from course B, they can't access the course, but the work they submitted remains in the database and the moodle user files. The only way I can find to remove their work is to delete them, then manually add them back as a user.
Is there any way to remove the students work when they are unenroled from course B? At the moment, the database and files are becoming huge because students have legacy access to course A. I am using Moodle 4.3.8 at the moment.
Thanks,
Nikki