Quiz

Quiz event handling causing group problems

 
 
Picture of Michael Aherne
Quiz event handling causing group problems
Group DevelopersGroup Particularly helpful Moodlers

We upgraded from 2.3.1 to 2.3.4 yesterday and have been seeing a huge degradation of performance when adding people to groups (from < 1s to > 30s per user). This looks like it is probably caused by event handlers that have been added to the quiz which call the quiz_update_open_attempts function.

Does anyone know if it's safe to comment out these calls until we can get a proper fix?

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: Quiz event handling causing group problems
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

Fix is on its way: MDL-37577.

So, if you have the necessary git skills, you could cherry-pick that fix.

Alternatively, as you say, comment out those lines. That will only do harm if you do not use quiz settings overrides.

 
Average of ratings:Useful (1)
Picture of Michael Aherne
Re: Quiz event handling causing group problems
Group DevelopersGroup Particularly helpful Moodlers

Thanks, Tim! I'll try cherry-picking the fix.

We seem to have a few quiz settings overrides, so I may just comment out the lines. What harm would it do if we didn't have any? I'd still like to do this while I sort out the patch (we're using Subversion to manage our builds so I can't just patch it directly with Git sad )

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: Quiz event handling causing group problems
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

If you comment out those lines then it is possible for Moodle to fail to process things when the time limit passes on a student's quiz attempt, and the student is not logged in at the time.

 
Average of ratings: -
Picture of Michael Aherne
Re: Quiz event handling causing group problems
Group DevelopersGroup Particularly helpful Moodlers

Ah, I see. I've patched our core with the fix and the time to add someone to a group has reduced dramatically from 30+ seconds to about 3. It's still a fair bit slower than it was before, but it's probably acceptable for most people. Thanks for your help!

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: Quiz event handling causing group problems
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

Are you able to get the time it takes to execute the quiz_update_open_attempts query on your server with your data? Would be useful to know.

 
Average of ratings: -