Closed danmarsden closed 7 years ago
Thanks Dan for reporting this, and sorry for the troubles this causes with the SCORM on that site.
It really seems to be the case. The subcourse_grades_update()
could accept the userid parameter. On the other hand, it could then lead to a situation when some users have their grades up-to-date and some do not. I guess that is something I wanted to avoid.
This is not the first time I hear about performance issues with the plugin though. I'll try to look at it as soon as possible.
Hi Dan and David, thank you for looking into this. David - please keep this issue updated, as it is a very important fix for one of the biggest clients of ours. They use subcourses heavily and have about 100K users and the freezeouts are causing a lot of slowness. Mariya @ Lambda
Hi David, Is there any update on the fix yet? Ping @ Lambda
@lambdasolutions any chance you could test the latest master version to see if it helps? I would prefer to have it confirmed prior to releasing it as a new version. Thanks.
Fixed in 5.0.0
a user graded event triggers subcourse_grades_update() for each subcourse linked and gradeitemonly is excluded so it is set to false.
subcourse_fetch_refgrades() is then called which then gets grades for all users in the course and then triggers grade_update for every user within every subcourse linked.
https://github.com/mudrd8mz/moodle-mod_subcourse/blob/master/classes/observers.php#L44
this makes the grade update by an activity really slow - and is probably the cause behind: https://tracker.moodle.org/browse/MDL-55291