node/%node/results page shows the results of quiz attendees with filters where one of the columns/ filters is username. The output table includes deleted users results as well with empty username (because it doesn't exists in {users} table) as in attachment.

I propose the following suggestion to handle this case
1. To hide the results of deleted users from this page (with/ without error message based on user accessing the page).
2. To show the results of deleted users with username column value set to "ORPHAN #UID".
3. Add another filter to hide/show deleted users results.

#1 is the Simple and desirable approach required for my client at the moment, I would like to know fellow developers approach on this.

btw: Issue components field can be changed to match the current code base. For instance Import/export is not a part of quiz anymore.

Comments

simon georges’s picture

In theory, when deleting an account, every linked content is affected to anonymous. It makes sense, not to apply this behaviour to quiz results, for a purpose of admin statistics. But I don't think it makes a great functionnal sense to display them on this screen.

#3 would be the more versatile option, but I agree #1 is the simplest and probably a proper one in most of the cases.

My 2 cents,

borgewarvik’s picture

I'm working on the quiz_stats module and this is an issue that also concerns statistics. At the moment I do not consider if the user has been deleted. I believe that for statistics the users are not that important. It's all about what they answered and how they did it.

Wouldn't the same argument apply here? If so, option #2 would be best in my opinion.

Option #1 will leave the admin/owner of the quiz without knowledge of the take.
Option #3 would be a good addition as it will give the viewer the option to filter out takes with deleted users.

falcon’s picture

I agree with comment #2. Option #3 would also make it easier to delete results for deleted users. We could also consider adding a global setting for this. There are use-cases where you would want the results to be deleted automatically when a user is deleted.

falcon’s picture

option 2 has been commited. Option 3 should go into a feature request.

falcon’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.