LafColITS / moodle-tool_deletecourses

Moodle plugin which allows managers to delete all courses in a category (including subcategories).
7 stars 6 forks source link

Possible timeout with large number of courses #10

Closed monnardj closed 6 years ago

monnardj commented 6 years ago

If there is a large of number of courses to delete, the maximum execution time defined in php.ini (e.g. 300 seconds) might be exceeded. What would happen in such a case ? Background : we would be interested in using this plugin, but we would delete several hundreds of courses at once (a whole academic year), which might be a problem.

kwiliarty commented 6 years ago

I recently used this on our production Moodle to delete a couple thousand courses. The plugin breaks the job into batches to be removed in the background precisely so that it doesn't blow up. Speaking only as a consumer of the plugin, my experience was very satisfactory.

mackensen commented 6 years ago

As @kwiliarty said, this plugin uses Moodle's Task API, so you shouldn't encounter any browser timeouts.