From 60f5321891515d908c5331bbb97725b0d3e3afa8 Mon Sep 17 00:00:00 2001 From: Paul McKeown Date: Fri, 8 Mar 2024 15:36:21 +1300 Subject: [PATCH] Updated grade caching so that questions with different question text still use the cached outcome. That is, something has to change in the actual job being run to force a real regrade. --- classes/jobrunner.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/jobrunner.php b/classes/jobrunner.php index d6ee0995..713e116a 100644 --- a/classes/jobrunner.php +++ b/classes/jobrunner.php @@ -167,7 +167,7 @@ private function run_combinator($isprecheck) { // affect caching. For example the questionid will change each time // the question is saved thanks to question versioning - urgh! foreach ($this->testcases as $tc) { - // unset($tc->id); May be ok to leave in there???? + unset($tc->id); unset($tc->questionid); } $numtests = count($this->testcases); @@ -248,7 +248,7 @@ private function run_tests_singly($isprecheck) { // affect caching. For example the questionid will change each time // the question is saved thanks to question versioning - urgh! foreach ($this->testcases as $tc) { - // unset($tc->id); May be Ok to leave there? + unset($tc->id); unset($tc->questionid); } $numtests = count($this->testcases);