Possibility to "reset a course" depending on a certain user?

Possibility to "reset a course" depending on a certain user?

by Alexander Dominicus -
Number of replies: 4
Picture of Testers

Dear moodle community,

we have a moodle course which is created as full online lecture (at the end students will receive a grade without having seen a teacher).

Problem: If students do not pass the exam, they are allowed to redo the course completely. Unfortunately, all activities has saved the "old" data of the students, so they cannot redo the course. Resetting the course is not possible, since all others should not lose their activity data.

So, I've looked up the ../course/reset.php which calls  "reset_course_userdata()" in ../lib/moodlelib.php where all the magic happens.

Question: Is there a possibility of adding user-dependencies in reset_course_userdata() easily? So remove grades etc. only for a single student?

I just do not want to reinvent the wheel smile.


Best,

Alex

Average of ratings: -
In reply to Alexander Dominicus

Re: Possibility to "reset a course" depending on a certain user?

by Michael Hughes -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
I think the short answer is that course reset is just that, it's about resetting the whole course to a clean initial state for all users. And a lot of the code is written that is optimised for this mass action, rather than an individual's data, so it really seems like a separate feature as it has very different objectives.

Another part of the issue with a per-user reset is what to do with their content where it's interleaved and necessary, for instance any posts that have been made by the user in to say a forum and then there have been responses to their post. Should it be excised? should it be simply anonymised? Would it give the same user an advantage seeing their previous response?

So I don't think "easy" is necessarily the case as there would seem to be certain design questions to be answered to make this a coherent function...

You may want to look at https://moodle.org/plugins/block_resetcompletion it covers *some* activities but not everything. (this only supports up to Moodle 3.2, so probably not actually worth it).
In reply to Michael Hughes

Re: Possibility to "reset a course" depending on a certain user?

by Gemma Lesterhuis -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
You maybe find what you are looking for in https://moodle.org/plugins/local_recompletion
Average of ratings: Useful (1)
In reply to Gemma Lesterhuis

Re: Possibility to "reset a course" depending on a certain user?

by Alexander Dominicus -
Picture of Testers
Unfortunately, this plugin is only able to enable course recompletion for all users.
But maybe in this case it is possible to add the possibility of recompletion for a single user....
In reply to Alexander Dominicus

Re: Possibility to "reset a course" depending on a certain user?

by Alexander Dominicus -
Picture of Testers
I have to correct myself:
It seems that local_recompletion does indeed reset a course for a certain user ("course administration"->"Modify course completion dates").
So I just have to check if it works as expected (especially in context with H5P-activities).

Thank you very much for your advice!
Best,
Alex