Reset just 1 student in a course - is it possible

Reset just 1 student in a course - is it possible

by Shelby Foster -
Number of replies: 4

Need the ability to reset a student on a course and not all students currently enrolled.  Is this possible?

Ie:  50 students in a course student # 2 needs to start over with all assessments and assignments - student #2 ALL data needs to be removed while other 49 student data is maintained.



Average of ratings: -
In reply to Shelby Foster

Re: Reset just 1 student in a course - is it possible

by John Provasnik -
Picture of Particularly helpful Moodlers Picture of Testers

I believe you just need to remove the student from the course and then re-enroll the student. When you re-enroll, you have to make sure the Enrollments option pane is expanded and that the 'Recover old Grades' is not checked off.

This would allow the user to 'start over' however logs are not tied to the course so the 'old' logs would remain intact. 



Average of ratings: Useful (1)
In reply to John Provasnik

Re: Reset just 1 student in a course - is it possible

by Shelby Foster -

Good day, 

Thank you for your response.  That did remove the grades but the activity report did not clear. 

I am looking for remediation allowing one student to start fresh with the course, including activities and lessons.



In reply to Shelby Foster

Re: Reset just 1 student in a course - is it possible

by Alex Pruneau -

Im trying to find this solution too. Do you have some feedback for this ? 

In reply to Alex Pruneau

Re: Reset just 1 student in a course - is it possible

by Melanie Scott -
Picture of Particularly helpful Moodlers

This is not a pretty fix or a fast fix...but it works.  It is also pretty dangerous, data wise, so take this with a big dose of caution.

Many activities allow you to delete attempts (like quiz), so delete all activity attempts first.

Then go to the gradebook.  Overwrite their scores for all the activities to 0, don't forget to save.  Edit each overwritten grade to remove the overwrite check mark...the gradebook should no longer show the grades are overwritten AND they should not have a grade.

That is the easy/safe part.  Make sure you know the id # for the user, course and for all the activities.


If you have access to the data (Adminer or something), go directly to the tables.  If you do not, you will have to rely on someone who does. Be VERY CAREFUL.

Start with mdl_course_completion_crit_compl. Search using the course and userid fields (use your course ID and user ID).  This table holds the data for completion criteria. Delete any that you find (this is removing data directly from the database, so be sure...you cannot fix this if you delete the wrong stuff).

Next, go to mdl_course_completions (only if the user completed the course...if they did not...you will not need to set this). Again, search using the course  and userid fields. delete the entry you find.  There should be only 1.

This should clear the course for the single user.  On very rare occasions, I have gone to mdl_course_modules_completion and had to clear these.  These require the search on the userid field and the module or activity id.

I cannot stress strongly enough that caution and attention to detail are critical when you do this.  It is never a good idea to start poking at data in the database...but sometimes it is necessary. I am not recommending this, just describing how it can be done.