mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-41230 tool_uploadcourse: Prevent max_execution_time issues
This commit is contained in:
parent
d45e65ccad
commit
97376662df
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user