Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'MDL-32214' of git://github.com/mkassaei/moodle into MOO…

…DLE_22_STABLE
  • Loading branch information...
commit 17ee774fdfc4316fb6a11ddce05c7075ce1f55da 2 parents 2de2d0d + 4bc0b06
@danpoltawski danpoltawski authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 mod/quiz/report/overview/report.php
View
8 mod/quiz/report/overview/report.php
@@ -374,6 +374,7 @@ public function display($quiz, $cm, $course) {
*/
protected function regrade_attempt($attempt, $dryrun = false, $slots = null) {
global $DB;
+ set_time_limit(30);
$transaction = $DB->start_delegated_transaction();
@@ -406,6 +407,11 @@ protected function regrade_attempt($attempt, $dryrun = false, $slots = null) {
}
$transaction->allow_commit();
+
+ // Really, PHP should not need this hint, but without this, we just run out of memory.
+ $quba = null;
+ $transaction = null;
+ gc_collect_cycles();
}
/**
@@ -445,7 +451,6 @@ protected function regrade_attempts($quiz, $dryrun = false,
$this->clear_regrade_table($quiz, $groupstudents);
foreach ($attempts as $attempt) {
- set_time_limit(30);
$this->regrade_attempt($attempt, $dryrun);
}
@@ -494,7 +499,6 @@ protected function regrade_attempts_needing_it($quiz, $groupstudents) {
$this->clear_regrade_table($quiz, $groupstudents);
foreach ($attempts as $attempt) {
- set_time_limit(30);
$this->regrade_attempt($attempt, false, $attemptquestions[$attempt->uniqueid]);
}
Please sign in to comment.
Something went wrong with that request. Please try again.