From f70f73517c0a8f8df79cc9d5f2b305396fc5b190 Mon Sep 17 00:00:00 2001 From: Daniel Kosinski Date: Wed, 18 Mar 2015 23:23:16 +0100 Subject: [PATCH] MDL-48456 course: increase timeout when deleting all courses in category --- lib/coursecatlib.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/coursecatlib.php b/lib/coursecatlib.php index 65e3898b2a9..7b334f0840d 100644 --- a/lib/coursecatlib.php +++ b/lib/coursecatlib.php @@ -1562,6 +1562,9 @@ class coursecat implements renderable, cacheable_object, IteratorAggregate { require_once($CFG->libdir.'/questionlib.php'); require_once($CFG->dirroot.'/cohort/lib.php'); + // Make sure we won't timeout when deleting a lot of courses. + $settimeout = core_php_time_limit::raise('0'); + $deletedcourses = array(); // Get children. Note, we don't want to use cache here because it would be rebuilt too often.