-
Bug
-
Resolution: Fixed
-
Major
-
4.3.5, 4.4, 4.5
Fix instructions:
Inside grade/report/grader/lib.php modify get_grade_table method. Inside the $leftrows for each loop at the end, add unsets for $leftrows and $rightrows
// Extract rows from each side (left and right) and collate them into one row each
|
foreach ($leftrows as $key => $row) { |
$row->cells = array_merge($row->cells, $rightrows[$key]->cells); |
$fulltable->data[] = $row; |
unset($leftrows[$key]); |
unset($rightrows[$key]); |
}
|
By unsetting elements in $leftrows and $rightrows arrays after they have been processed and merged into $fulltable->data, the unset free up memory that is no longer needed. This is particularly beneficial when dealing with large datasets, as it helps to minimize the script's overall memory footprint during execution.