Removing a students work on unenrolment

Removing a students work on unenrolment

by Nikki Macfarlane -
Number of replies: 3

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

Average of ratings: -
In reply to Nikki Macfarlane

Re: Removing a students work on unenrolment

by Shirley Gregorczyk -
Picture of Particularly helpful Moodlers
Consider suspending the students from the course. Scroll down to how do I suspend a user from a course?
In reply to Shirley Gregorczyk

Re: Removing a students work on unenrolment

by Nikki Macfarlane -
Thanks Shirley,

Unfortunately this does not remove their uploaded assignments. I am trying to permanently remove student uploaded data when they graduate so they can still access the system, but their assignments will have been removed to prevent the database and moodle files becoming ridiculously large. Unenroling a student or suspending them just removes their access to a course, but leaves their data on the database and files.

Nikki
In reply to Nikki Macfarlane

Re: Removing a students work on unenrolment

by Nikki Macfarlane -
I have moved this question to the general developer forum.

Thanks!