Version 2.0 deletes all grades information for students unenrolled from a course. This is opposite from previous behavior and IMO very undesireable. A moderate number of times each term a student will get accidentally unenrolled from a course. Retention of grades information permits them to be re-enrolled without issue. I've created a tracker item on this (MDL-25718) hoping like-minded folks will vote.
I STRONGLY encourage everyone who is subscribed to this forum to vote on this ticket.
note: Looks like grades in activities are preserved, so such unenrolled/re-enrolled student will see the grade for the quiz in the quiz, but gradebook will remain empty.
We're getting quite a bit of discussion in the Tracker on this but not much out in this forum so I wanted to bring some of the things out from the Tracker so they're accessible to those not wishing to discuss from the Tracker.
The issue has been upgraded to critical and is being looked at seriously by numerous core developers. Thank you Moodle Community and Moodle HQ.
Petr indicates this behavior is intentional and necessary for performance reasons. With the new enrollment plugins you could specify how you wish to handle instances where a course participant is removed from the enrollment authority. Tim has an idea for attributing a age range of the purge to decide what to do.
Here's one scenario we see take place:
- we currently use external database enrollment plugin
- syncing enrollments once or more a day is necessary so students are available to instructors of the course prior to the student's logging in after an update (enrollments are fairly fluid for at least a couple weeks of each term). if syncing were not performed an instructor could not send forum postings, quickmails, etc to students who've not yet logged in since a change in the enrollment authority.
- we disable the code in the plugin that purges enrollments when there are no records for the course because we want to remove past-term external database records so we don't have to sync all of them but still want to maintain those enrollments in Moodle so students and instructors can review past work and scores. If we did not disable this code once all the students have been removed from the external authority they have no more access to the course
Looking over this scenario (which I'd doubt is uncommon) I don't see any of the proposed solutions working adequately. The enrollment plugin framework in 2.0 allows "blanket decisions" to be made upon unenrollment. However, in real life, there are several different scenarios where unenrollments take place that would require different decisions on how those unenrollments are handled. What worked best for ALL scenarios is not to ever purge the data upon unenrollment and allow schools to scale their hardware implementations or scale back their retention of past terms' data to accommodate their own particular data throughput needs.
the enrol/db is not designed for this type of enrolment workflow you are describing, I know it because I wrote the current code, sorry. You would need to implement custom plugin for that, you would probably design some new rules when to disable the enrolment and when to do full unenrolment. The enrolment subsystem is a lot more flexible in 2.0, but the standard plugins are never going to be suitable for all workflows - luckily it is a lot easier now to create new enrol plugin that fits your institution needs 100%.
Moodle courses are not designed to be reused for each new year while keeping all the old history in there. It may work in some cases but it is recommended to create a fresh copy of the course each year and at the end either hide the course are disable all enrolments.
The keeping of all course info after full unenrolment is not a real solution because it causes problems in other scenarios. IMHO it is better to improve the documentation and tweak the current user interface instead.
Thank you Petr for bringing this out into the forum discussion. Just to clarify, we don't re-use courses and store last term's grades with the intent of reloading them if needed. The scenario described is real, all involving the same term and doesn't involve extraordinary changes to the external database enrol plugin -- it involves commenting out the single block of code that purges all enrollments for a course once the course no longer exists anywhere in the external database authority. This doesn't involve a complicated workflow but does undo a negative result of the external database enrol plugin design in that, in lieu of commenting out this block, the only other options are:
- Maintain no enrollments for past term courses, losing all the data with the unenrolled students... or
- Maintain all enrollments in the external authority for however long you wish to keep enrollments for past terms (frequently two years or more having talked with other schools) and synch that massive amount of data when you need really only be synching the current term's enrollments to update them for changes not yet reflected by a new student logging into Moodle.
The question has been posed in the Tracker "under what circumstances do unintentional unenrollments take place". I've noted one Use-Case above and would invite any other community members to share additional experiences regarding this issue and why a single setting in the Enrollment Plugin doesn't satisfy the need.