I'm trying to allow admins to keep a high-level eye on course completions. We typically have a single scorm package per course, sometimes more.
Our students can complete a scorm package multiple times. What I'm finding is that although I have course completion tracking turned on and I can get a single scorm completion turn into a course completion.
(The timestamp of that seems to become that of the cronjob run instead of the actual scorm completion, though.)
But when the scorm completion gets updated, i.e. if students need to go through a scorm course once a year and they redo it maybe 11 months after the first run, that actually doesn't get updated to the course completion date.
So should I be writing a plugin of some kind to update scorm completion dates to course completion dates continuously, or is there some functionality available in Moodle core that already would keep the timestamps up to date?
Course completion is deliberately written such that once you have completed a course the timestamp is never changed, no matter how many times you meet the criteria again. Once completed, the course is counted as complete.
I've not double-checked, but I think you can use a course reset to clear out all users' progress on a course, which might be one solution.
You could also write a plugin to manually update the completion time directly in the database, but that would be contrary to the intended use for the field.
Maybe it would be better to create a custom report that directly shows the completion time you want, rather than messing around with the course completion time?
Thanks for the explanation.
The thing is, we are using the course recompletion plugin to expire those completions, i.e. once we have a course completion, that plugin can find both the expired course and scorm completions within, and delete both.
The problem is though if the course completion date is not up to date, we will end up expiring scorm completions too that have in fact been updated.
So with this model, I guess we would have to update the course
completion timestamp with a plugin of our own. Do you suppose there are
some kinds of side effects to this?
I have indeed been wondering what's the intended use of these structures, that's why I asked. The documentation appears kind of sparse, or written from a point of view that is hard to apply to all these practical situations that come up.