Unenrolled users still showing up in Quiz reports

Unenrolled users still showing up in Quiz reports

by Edward Hewlett -
Number of replies: 5
Not sure if this is a bug or a feature, but I have one course in which users who were enrolled as students back when we were running Moodle 1.6 are still showing up in the "Show all students" quiz report, despite having been unenrolled from the course. I only became aware of this problem after upgrading to Moodle 1.8, so I don't know if this behaviour was occurring in Moodle 1.6 or not. Any help on resolving this issue - or tips on how to submit it as a bug report if it is a bug - would be much appreciated!
Average of ratings: -
In reply to Edward Hewlett

Re: Unenrolled users still showing up in Quiz reports

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
It is a feature that when you unenrol a student, their quiz attempts are not deleted. Imagine if you deleted the wrong student by accident. You need to be able to immidiately re-enrol them and have all their contributions to the course still present.

Therefore, you need some way of seeing their quiz attempts, so you can delete them manually if you want to.

However, exactly which quiz attempts should be displayed for each option in the quiz report is something I have never entirely got my head round.
In reply to Tim Hunt

Re: Unenrolled users still showing up in Quiz reports

by Jit San Chia -

A real bug in this module I think is that when you reset a course with quiz in it (in preparation for a new class), the quiz attempts records are not erased. And when you enrol a completely new class of students, these remnant will mess up the quiz report, and it's not possible to delete them as the "owners" (the old batch of students) have all been cleared from the course.

Have I missed anything when resetting courses?

I worked around this by adding 2 fucntions to mod/quiz/lib.php: quiz_delete_userdata and quiz_reset_course_form (copied and modified from lib file of forum module)

Not sure if this is the correct way, but it works for me : )

Cheers!

In reply to Jit San Chia

Re: Unenrolled users still showing up in Quiz reports

by Deb Burdick-Hinton -
Hello-
I like having the "old" students data in the quiz report as it provides a larger amount of data for my quiz questions when analyzing the question stats but it would be nice to isolate the quiz reports/stats to current students and all students when you view it.

In reply to Deb Burdick-Hinton

Re: Unenrolled users still showing up in Quiz reports

by Jit San Chia -

Hi

yes, would be really nice if data can be separated that way.

In reply to Edward Hewlett

Re: Unenrolled users still showing up in Quiz reports

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Edward, see this thread. If you want to delete attempts made by students which are no longer enrolled in your course, then click on option #4 Show all attempts select all the unenrolled students and then Delete.
Joseph