Removing student data to minimise database and file storage

Removing student data to minimise database and file storage

Nikki Macfarlane發表於
Number of replies: 4

Hi there,

I have legacy courses where students work through their course self-paced and have no limitations on how long it takes them to complete the course. Once they finish their course, they still have access to the course materials for as long as they want. This is causing an issue with the size of the database and also the moodle files where students assignments are stored so am trying to find a solution. 

My current working theory is that backup and restore could be a solution. Thinking I could do the following:

  1. Unenrol any student from the course (lets call it course A) after downloading any of the student work I want to keep in an archive.
  2. Enrol the student in course B (basically a copy of course A with course content but no assignments/exams etc)
  3. Backup course A.
  4. Restore course A into course C.
  5. Delete course A.

This is something that could be run each year to clear out all the students who have graduated. My questions are:

  1. If I backup course A without the graduated student enrolled in that course, will the students work (assignments etc) not be in the backup and therefore not be in course C (the restored course) and would reduce database/file load?
  2. When I backup and restore a course, would all the current students work be included in the restored course, so to the student, it looks no different and they just continue working on their course?

Since there does not seem to be a way to archive the work for a specific student, I can't see any other way to solve this, besides deleting the student from Moodle and then adding them again to a new graduates course so they still have access to their course materials.

Any suggestions on whether this is a feasible approach or not gratefully received!

Nikki

評比平均分數: -
In reply to Nikki Macfarlane

Re: Removing student data to minimise database and file storage

Ken Task發表於
Particularly helpful Moodlers的相片

Hi, Nikki!

Am responding not answering questions nor providing suggestions but to ask if your site is still modifying participant records as it did in the past.

In the past, when a participant in a forever course completed the course and got their certificate, another person in a manager role modified via custom script that participants authentication from manual (or whatever) to one of using an external database.   But, in the setup of the external database, that was pointed not to another DB server/external DB but to the same DB server ... and thus same mdl_user table.

Is that still the case?

Also, if I re-call correctly, in the 'forever' courses the participants whose authentication was external DB were moved to a group whose permissions were such where they could see the resources of the course and their certificate, but could not interact with any module like quiz/test/assignments, etc.  Those were hidden to this 'forever student' role.

Is that still the case?

Think that would be a factor in anything anyone would have to suggest ... and would also relate to your other posting which is really an extension of this post. 微笑

'SoS', Ken

In reply to Ken Task

Re: Removing student data to minimise database and file storage

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
In reply to Nikki Macfarlane

Re: Removing student data to minimise database and file storage

Ken Task發表於
Particularly helpful Moodlers的相片

And a follow up question ...

What version of Moodle?   Kinda important as the GUI admin in higher version 4's have placed course backup/reuse in a totally background process with no button to cancel or 'undo'.   If that background process fails one has some work to do to clean up.

Also ... some references to docs .. which I think applies to this thread as well as your other related thread:

https://docs.moodle.org/405/en/Unenrolment
https://docs.moodle.org/405/en/course/delete

'SoS', Ken