diff --git a/admin/tool/uploadcourse/classes/processor.php b/admin/tool/uploadcourse/classes/processor.php index 79b10ed6263..7113deddcf4 100644 --- a/admin/tool/uploadcourse/classes/processor.php +++ b/admin/tool/uploadcourse/classes/processor.php @@ -194,6 +194,10 @@ class tool_uploadcourse_processor { $deleted = 0; $errors = 0; + // We will most certainly need extra time and memory to process big files. + @set_time_limit(0); + raise_memory_limit(MEMORY_EXTRA); + // Loop over the CSV lines. while ($line = $this->cir->next()) { $this->linenb++; @@ -330,6 +334,10 @@ class tool_uploadcourse_processor { } $tracker->start(); + // We might need extra time and memory depending on the number of rows to preview. + @set_time_limit(0); + raise_memory_limit(MEMORY_EXTRA); + // Loop over the CSV lines. $preview = array(); while (($line = $this->cir->next()) && $rows > $this->linenb) {