mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-50798 question: Raise time limit when rendering questions
Rendering a large number of questions may be quite slow, so we want to raise the limit. We don’t call raise() in the loop because the quiz buffer captures this function for a AJAX script, and we should only call raise if we expect a corresponding output to the users browser. This helps to prevent unexpected load balancer disconnects. See core_php_time_limit::raise() for more details.
This commit is contained in:
parent
e5eefbbf01
commit
c7092fe489
@ -664,6 +664,11 @@ class view {
|
||||
$showquestiontext = false, $addcontexts = array()) {
|
||||
global $CFG, $DB, $OUTPUT;
|
||||
|
||||
// This function can be moderately slow with large question counts and may time out.
|
||||
// We probably do not want to raise it to unlimited, so randomly picking 5 minutes.
|
||||
// Note: We do not call this in the loop because quiz ob_ captures this function (see raise() PHP doc).
|
||||
\core_php_time_limit::raise(300);
|
||||
|
||||
$category = $this->get_current_category($categoryandcontext);
|
||||
|
||||
$strselectall = get_string('selectall');
|
||||
|
Loading…
x
Reference in New Issue
Block a user