Bug: Duplicate Users

Bug: Duplicate Users

by Conn Warwicker -
Number of replies: 5
Picture of Core developers Picture of Plugin developers

Hi,

 

Was wondering if there has been a bug fix for this at all, or if I'm going to have to do it myself.

Basically, if a student does more than 1 attempt on a quiz, it doesn't print their picture or name for any subsequent attempts, in the results page. See example below:

 

I suspect the problem is the same one I've come across myself before, in that when you loop through a list of users and try to print them out, Moodle buggers up if there is a duplicate `id` for the user. So you have to replace the `id` field in the array with a unique one and rename the user table `id` to something like `userid`.

 

Anyway,

Has there been a fix for this at all?

 

Thanks. 

Average of ratings: -
In reply to Conn Warwicker

Re: Bug: Duplicate Users

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

@Conn,

This doesn't look like a bug to me, but a feature. After all, once a student's picture has been displayed, why would you need a repeat?

Joseph

In reply to Joseph Rézeau

Re: Bug: Duplicate Users

by Conn Warwicker -
Picture of Core developers Picture of Plugin developers

Hi,

Well yes it is a bug, it's something which I've found in other area of Moodle.

If a teacher looks at that they are not going to automatically assume that a row without a username or picture is going to be the user above them, they are going to think "why can't I see who made this attempt", as they have been. 

In reply to Conn Warwicker

Re: Bug: Duplicate Users

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 really isn't a bug, but if you don't like it, look in mod/quiz/report/overview, and find all calls to column_suppress and remove them.

Average of ratings: Useful (1)
In reply to Conn Warwicker

Re: Bug: Duplicate Users

by Marty Soupcoff -

 

I have to agree with Joseph on this one. I see it more as a feature. I have a large user base in our Moodle instance; each instructor with varying level of computer savvy. I cannot recall anyone asking why one of them was blank and not realizing it was the student's above additional attempt(s).

In addition, it displays with blanks because of how you currently have it sorted. Say for example Student #1 took quiz at 8am, Student #2 took quiz at 8:15am and Student #1 came in and re-took at 8:30am. If you were to sort by start time, then it would appear as below; with Student #1 name appearing again.

Quiz Results Sort

If Student #1 tried a third attempt at 8:45am with no one attempting between second and third attempt, then again it would not show the student name again as seen below.

 

Quiz Results Sort 2

P.S. If you say something like "...it's something which I've found in other area of Moodle", you may want to give an example.

Happy Moodle Logooodling!

In reply to Marty Soupcoff

Re: Bug: Duplicate Users

by Conn Warwicker -
Picture of Core developers Picture of Plugin developers

Well I disagree with both of you. Perhaps it was intended as a feature in Moodle to do this, but it appears like a bug.