Merge branch 'patch-1' of https://github.com/sk-unikent/moodle
[moodle.git] / lib / coursecatlib.php
index 7dad744..ec59132 100644 (file)
@@ -1563,6 +1563,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();
+
         $deletedcourses = array();
 
         // Get children. Note, we don't want to use cache here because it would be rebuilt too often.