by Nikki Macfarlane.
Thanks for your reply Ken. There seems to be a bit of confusion about how we handle students who have completed their courses. To clarify:
When a student completes the course and gets their certificate, at the moment nothing changes. Their enrolment method is exactly the same as when they first registered. There is nobody using custom script to change their enrolment method. They are moved to a different group but that group can see everything that everyone else can see. When a student completes their course they can still see all the course materials and all the work they submitted. There is nothing hidden. This is how we have always managed graduating students.
What I would like to do is unenrol the student from the course they have completed, but still give them access to their course materials. We are using subcourses, so the student is enrolled in course A as the child course (the course with the assignments and exams), which gives them access to course B (course materials). When they complete the course, I want to unenrol them from course A and enrol them in course B (course materials). This is all fine and works perfectly. But when we unenrol the student, the files they uploaded in course A remain in moodledata/filedir. Which of course means the files and the database just keep getting larger.
There must be a way of removing the data the student has uploaded or the exams they have completed. Otherwise everyone would have the issue of an ever expanding database and file size. The only options I can see to remove data and files for unenrolled students is either a cron that we are not using or the cleanup option but it is not clear having read through the documentation whether that removes students data who are no longer enrolled.
We are using Moodle 4.3.8 at the moment.
Nikki
When a student completes the course and gets their certificate, at the moment nothing changes. Their enrolment method is exactly the same as when they first registered. There is nobody using custom script to change their enrolment method. They are moved to a different group but that group can see everything that everyone else can see. When a student completes their course they can still see all the course materials and all the work they submitted. There is nothing hidden. This is how we have always managed graduating students.
What I would like to do is unenrol the student from the course they have completed, but still give them access to their course materials. We are using subcourses, so the student is enrolled in course A as the child course (the course with the assignments and exams), which gives them access to course B (course materials). When they complete the course, I want to unenrol them from course A and enrol them in course B (course materials). This is all fine and works perfectly. But when we unenrol the student, the files they uploaded in course A remain in moodledata/filedir. Which of course means the files and the database just keep getting larger.
There must be a way of removing the data the student has uploaded or the exams they have completed. Otherwise everyone would have the issue of an ever expanding database and file size. The only options I can see to remove data and files for unenrolled students is either a cron that we are not using or the cleanup option but it is not clear having read through the documentation whether that removes students data who are no longer enrolled.
We are using Moodle 4.3.8 at the moment.
Nikki