MDL-64889 completion: Fix performance of get_course_progress_percentage

This commit is contained in:
Mark Johnson
2019-02-18 14:07:37 +00:00
parent 22430761b1
commit 0c81fe1f2e
+1 -1
View File
@@ -75,7 +75,7 @@ class progress {
// Get the number of modules that have been completed.
$completed = 0;
foreach ($modules as $module) {
$data = $completion->get_data($module, false, $userid);
$data = $completion->get_data($module, true, $userid);
$completed += $data->completionstate == COMPLETION_INCOMPLETE ? 0 : 1;
}