Course Completion locking/unlocking etc.

Course Completion locking/unlocking etc.

by Tay Moss -
Number of replies: 13

I wonder if someone could explain the reasoning for why course completion status is "locked," and that to undo this action requires resetting the activity/course completion status for a whole class of students? It's a very specific behaviour that appears to be on puprose.  But it is creating a problem for one of our clients who has teachers that make mistakes (gasp).  Would there be a way to reset only a single-student's completion status in a course without having to do the entire class?

Tay Moss
----------
https://churchx.ca
Moodle 4.1 + "Sophia" Catalogue system

Average of ratings: -
In reply to Tay Moss

Re: Course Completion locking/unlocking etc.

by Sandipa Mukherjee -
Picture of Particularly helpful Moodlers

I hope https://moodle.org/mod/forum/discuss.php?d=433276 this link will helps you.

Average of ratings: Useful (1)
In reply to Sandipa Mukherjee

Re: Course Completion locking/unlocking etc.

by Tay Moss -

That was a helpful thread, thanks for  finding it. And gave me a few clues.  So did asking ChatGPT, to be honest.  

So, as I understand it, the reason why you cannot easily undo a course completion status once a student in a course is marked as "complete" for the whole course is because it could create inconsistencies inside a course of HOW course completion was achieved.  But this doesn't entirely make sense to me since it seems like the completion criteria could be "checked" and the course completion status validated via a Chron job. In fact, that's  what I thought was the purpose of "\core\task\completion_regular_task" But I've checked, removing one of the conditions  for course completion does NOT cause the course completion to reset for an individual student.

So I aware of an approach where you hack the database by running an SQL query something like this:

DELETE FROM mdl_course_completions
WHERE userid = 12345
  AND course = 678

My questions might be

  1. Would this work or would the cron job (\core\task\completion_regular_task) reset the course to complete, anyway, if all the activities and creteria are still set to true
  2. Is it a problem that this might create "orphaned criteria" where all the criteria show (to the student/teacher) as completed by the status for the whole course is still "not completed"
  3. Is this likely to create problems with completion reports, progress dashbobards, badges, etc.
  4. is this likely to create problematic inconsistencies with other tables like mdl_logstore_standard_log

So given that there is a high probability that directly editing the table could have bad consequences... I wonder if anyone has any other good ideas for how to reset just one student's course completion status?

This plugin here, incidentally, is CLOSE to what I'm talking about, but actually is somewhat overkill!  https://moodle.org/plugins/local_recompletion  Still, I'm going to reach out to Dan Marsden who maintains that plugin for his thoughts.

Anyway, I'm interested to hear more thoughts about this!

Tay Moss
----------
https://churchx.ca
Moodle 4.1 + "Sophia" Catalogue system

In reply to Tay Moss

Re: Course Completion locking/unlocking etc.

by Tay Moss -
Just to add another question.... I'm drilling into this....

I'm most concerned with the case of teachers accidentally setting the course completion status to complete and not being able to undo it without resetting the whole class. SO... what if I was to delete the record of the manual completion marking from mdl_course_completion_manual table and then reset the value of "reaggregate" field from 0 to 1 in the mdl_course_completion table? Am I correct in thinking that this would then cause the status of course completion to be "reset" when the \core\task\completion_regular_task runs? And would this approach be better than simply removing the course completion record all together?

Thoughts?

Tay Moss
----------
https://churchx.ca
Moodle 4.1 + "Sophia" Catalogue system

In reply to Tay Moss

Re: Course Completion locking/unlocking etc.

by Shirley Gregorczyk -
Picture of Particularly helpful Moodlers
It has been a suggestion for a while that the functionality to reset a single student's course completion is needed. Within Tracker the solution was if we use the Recompletion plugin, we could reset a single student's course completion.
This is true, but the course has to have the recompletion condition. Out of my 370 courses, only 70 have the recompletion condition. The other 300 do not, and occasionally I get a request for Quality or HR that the student (employee) must retake the course due to compliance issues/concerns.
We still do not have the desired functionality to reset a single student's completion. The functionality would need to archive the previous completion (record retention policies) and reset the activities, quiz/quiz attempts, and course completion.
In reply to Shirley Gregorczyk

Re: Course Completion locking/unlocking etc.

by Tay Moss -
Shirley, honestly this seems like a pretty small little plugin project. Like I could probably get my developers to write it create it for less than $1,000. I do like your idea about achiving the previous completion data, which would not be difficult at all. Maybe you could choose to reset the activities as well? or whould it just reset the reset the "course completion table" entry and perhaps the teacher (or manager, tec.) approval condition? Some kind of condition for approval would need to be removed, otherwise you'd have an odd situation where all approval criteria have been met but the course is maked incomplete for that student, and there would be no way to set TO complete at that point, either. But not all courses have "teacher marks as complete" condition set. So the logic of the plugin would probably need to either reset the completion status of ALL activities, or the user would need to select at least one condition to reset. And it wouldn't be able to be something ilke date--it has to be something that either the student can initiate by some action, or the instructor could do it through the "Report > Activity Completion" module.

Shirley, do you have any budget for creating plugins like this? I'd be willing to go halfsies with you? I could get a quote on it?
In reply to Tay Moss

Re: Course Completion locking/unlocking etc.

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
Keep in mind "Dan" feeds his kids (although they usually prefer he doesn't actually cook) by charging for private support and works for the Moodle Partner Catalyst IT.

But - I do engage in public discussion for free smile

The recompletion plugin does have the ability to reset completion for an individual user via a report called the "Completion status report" - but as Shirley mentions it needs to have the recompletion settings enabled for the course -

What Shirley might not have seen is that it now has a type setting called "On demand" which means that it will only reset an individual user when a teacher/person with the capabilities to view the report resets that specific user.

I'm pretty sure the plugin will actually do what you need - you should try it out and first check the site-level default settings for the plugin to make sure you have them set in a way that would make sense to cover your needs and then hopefully it will just do what you will need!
Average of ratings: Useful (1)
In reply to Dan Marsden

Re: Course Completion locking/unlocking etc.

by Tay Moss -
Thanks, Dan, for filling in some detail on the capabilities of the plugin! I will, indeed, check it out. Question, does it interact with "competencies" at all, or just the completions?
In reply to Tay Moss

Re: Course Completion locking/unlocking etc.

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
It only works with course and activity completion. It doesn't reset competencies but if you have internal development capabilities you could extend the plugin to help with this.
In reply to Dan Marsden

Re: Course Completion locking/unlocking etc.

by Shirley Gregorczyk -
Picture of Particularly helpful Moodlers
Hello Dan,
Let's see if I understand this correctly, adding the Recompletion condition to a course and only use the Recompletion type - on demand - will only reset a single student, when I select that student.
Is that correct?
kind Regards,
Shirley
In reply to Shirley Gregorczyk

Re: Course Completion locking/unlocking etc.

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
yes - if you have the recompletion type set to "on demand" it doesn't do anything "automatically" - it allows you to view the course completion report in the plugin, select a user and reset their individual recompletion based on the settings in the plugin.
Average of ratings: Useful (1)
In reply to Dan Marsden

Re: Course Completion locking/unlocking etc.

by Tay Moss -
Hmm. I'm not seeing an "recompletion type" ?
 
In reply to Tay Moss

Re: Course Completion locking/unlocking etc.

by Shirley Gregorczyk -
Picture of Particularly helpful Moodlers
what version of the plugin are you using? I am using 2024090300
image.png
In reply to Shirley Gregorczyk

Re: Course Completion locking/unlocking etc.

by Tay Moss -
Good catch. It was 2023060700 that was installed. I'll try the new one.