MDL-33884 question export: raise memory limit

Question exports can be quite big, just like imports can. Therefore, we
should raise memory limits in the same way.

(Of course, eventually we should change the API, so that it writes one
questoin at a time, rather than building the whole export file contents
in RAM first, but that would be a much bigger change, and we need a
quick fix now.)
This commit is contained in:
Tim Hunt 2019-07-31 16:18:16 +01:00
parent f622ee97e3
commit b65db96d8c

View File

@ -860,6 +860,10 @@ class qformat_default {
public function exportprocess($checkcapabilities = true) {
global $CFG, $DB;
// Raise time and memory, as exporting can be quite intensive.
core_php_time_limit::raise();
raise_memory_limit(MEMORY_EXTRA);
// Get the parents (from database) for this category.
$parents = [];
if ($this->category) {