Details
-
Type:
Improvement
-
Status: Reopened
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 2.8.3
-
Fix Version/s: None
-
Component/s: Lesson
-
Labels:
-
Testing Instructions:
-
Affected Branches:MOODLE_28_STABLE
-
Pull from Repository:
-
Pull Master Branch:MDL-49121_master_optimize_lesson_report
-
Pull Master Diff URL:
Description
The lesson report overview would not complete in a course with a large number of users. The problem course has around 14,000 users and 60,000 attempts for the given lesson. The report would complete if given enough time. I removed the limits and had it complete in around 15 minutes. The report winds up outputting around 27,000 rows of user attempts.
With some optimizations I got the report to finish in less than 30 seconds.
I was able to remove the use DISTINCT in the reports SQL. I fetch both the users and attempts at once using a JOIN and a GROUP BY.
The lesson tools data structure is not good but that's a whole other issue.