This process essentialy involves unenrolling all students from the course and removing all their data.
Now many will syat the best way to do this is to backup, delete and then restore the course.
For many schools though this is hugely time consuming. I have 420 courses to do. This process..including testing that it worked will takje a huge amount of time.
So I am starting this thread to gt some ideas on how else this oucl possibly be handled.
A few core assumptions:
1. The course structure and content will remain unchanged
2. All students will be unenrolled and all their data removed
I would like to see some kind of script that could be executed from the admin screen that would allow you to "nuke" all or selected courses in this fashion.
So to you moodle exerts? Could this be done? if so..could someone do it? :D
If not, what other ideas along these lines could be possible?
Look forward to reading the reponses.
I have made this in another post but never got a response.
Currently in courses we set an enrolment period and duration. For many schools with set calnedars it would be more appropriate for the duration to be replaced by a "enrol to" date. This way we could specify a date that all students are unenrolled.
Issue with durations is that students who should have enrolled in the first week may not have (for whatever reason) and this throws off a duration counter.
Also, students may join mid way through term, or move classes. And again duration based enrollment fails.
which I think that may be the cause of students being unexpectedly unenrolled from courses. Perhaps if it the wording were
Enrol to [date setting] or for [days setting] days
Then the ambiguity might disappear? I think that even with the above wording people may still thing that this means "Allow new students to sign up for / join / enrol themselves on the course until, or for the first x days"
There will always be instances I am sure where for some reason you will want to keep a certain peice of data. And for that you can do the old backup/delete/restore.
But at end of year when all students are starting again, I am trying to organise an almighty "nuke" that would wipe courses clean.
Blocks I suppose bring a new element to this. Where traditionally blocks never stored User data, now blocks like MyFiles have crossed that boundary. Not sure how to address that one.
Attached is a script you can upload and put in your root moodle directory to trigger this user data "nuke" in a 1.6 installation
This script comes untried, untested and with no guarrantees. Absolutely none!
I will be testing this over the next week on my own testing site and will post what feedback I have.
Many thanks to Martin for posting this code for very early beta testing.
a quick glance at your script:
Is this $removeevents=true a kind of trigger for really removing all related info, or is it only disconnecting links to data which stays in the database?
Or do we need some sort of whitelist to prevent a student been unenrolled?
Thoughts? Am I just narrow minded?
Hope you will remember this very wanted feature in your 1.6.
On the happy behalf of administrators.