Quiz

 
 
Picture of Conn Warwicker
Bug: Duplicate Users
 

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: -
Picture of Joseph Rézeau
Re: Bug: Duplicate Users
Group DevelopersGroup Particularly helpful MoodlersGroup TestersGroup 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

 
Average of ratings: -
Picture of Conn Warwicker
Re: Bug: Duplicate Users
 

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. 

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: Bug: Duplicate Users
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

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)
First time at the lake. I failed at skurfing
Re: Bug: Duplicate Users
Group Particularly helpful Moodlers

 

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!

 
Average of ratings: -
Picture of Conn Warwicker
Re: Bug: Duplicate Users
 

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. 

 
Average of ratings: -