The student gradebook is taking more than 30 seconds to display. Does anybody have the same problem?
Moodle is running in very fast a dedicated server so it is not due to the server performance.
Analysing MySQL processes it seems that Moodle gradebook queryes the table mdl_scorm_scoes_track once for each student and SCO. Here is a sample taken every 4 seconds:
SELECT *
FROM mdl_scorm_scoes_track
WHERE userid =133
AND scoid =87
ORDER BY element ASCSELECT *
FROM mdl_scorm_scoes_track
WHERE userid =104
AND scoid =428
ORDER BY element ASCSELECT *
FROM mdl_scorm_scoes_track
WHERE userid =91
AND scoid =535
ORDER BY element ASCSELECT *
FROM mdl_scorm_scoes_track
WHERE userid =118
AND scoid =72
ORDER BY element ASC
Having a course with 200 students and 10 SCORM packages with 50 SCO's each, this means 100,000 queries.
Why does the GradeBook analyse every student scoes_track to show a single student grade? Moreover, my SCOES are using SUMgrade so this queries seem irrelevant.
Can anybody give me a clue of what's happening?