-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
5.0
Resetting courses is performed by a synchronous request upon reset of the Reset Course form. Depending on the size of the course, this may result in a long request lasting several minutes, which may time out on the frontend and/or exceed the PHP time limit.
As we did with MDL-81714 for regrading of large courses, we can resolve this by making the reset process asynchronous.
Steps to reproduce:
1. Create 2 test courses, one extra small and one medium:
- php admin/tool/generator/cli/maketestcourse.php --shortname=XSmall --size=XS
- php admin/tool/generator/cli/maketestcourse.php --shortname=Medium --size=M
2. Login as admin
3. Visit the "Small" course
4. Navigate to More > Course reuse > Reset
5. Select all options and click "Reset course"
6. Confirm that the reset process completes in a few seconds, and the results are displayed.
7. Visit the "Medium" course
8. Navigate to More > Course reuse > Reset
9. Select all options and click "Reset course"
10. Expected: The process completes and the results are displayed.
Actual: The request runs for several minutes, and may time out depending on the server configuration.