From 57610d2bd9a316633a44c85dab0d13b21f6cbfdb Mon Sep 17 00:00:00 2001 From: Huong Nguyen Date: Fri, 8 Mar 2024 12:14:00 +0700 Subject: [PATCH] MDL-78547 quiz: Remove unnecessary call to clear_regrade_date_cache() This method is designed to clear the values but these values are never set anywhere It's safe to remove it out of the test now --- mod/quiz/report/overview/report.php | 8 -------- mod/quiz/report/overview/tests/report_test.php | 1 - 2 files changed, 9 deletions(-) diff --git a/mod/quiz/report/overview/report.php b/mod/quiz/report/overview/report.php index d9262cd9010..81b2dc2b1cf 100644 --- a/mod/quiz/report/overview/report.php +++ b/mod/quiz/report/overview/report.php @@ -398,14 +398,6 @@ class quiz_overview_report extends attempts_report { } /** - * For use in tests only. Clear the cached regrade data. - */ - public function clear_regrade_date_cache(): void { - $this->structureforregrade = null; - $this->newquestionidsforold = null; - } - - /** * Regrade attempts for this quiz, exactly which attempts are regraded is * controlled by the parameters. * diff --git a/mod/quiz/report/overview/tests/report_test.php b/mod/quiz/report/overview/tests/report_test.php index 0e553df77f4..f7b13bb244e 100644 --- a/mod/quiz/report/overview/tests/report_test.php +++ b/mod/quiz/report/overview/tests/report_test.php @@ -398,7 +398,6 @@ class report_test extends \advanced_testcase { // Now change the quiz back to always latest and regrade again. submit_question_version::execute($slot->slotid, 0); - $report->clear_regrade_date_cache(); $report->regrade_attempt($attempt); // Score should now be 5, because v3 is the latest non-draft version. -- 2.11.4.GIT