I considered the “set a variable value” method. I would not retain the value across sessions, though. Sometimes students do need to retake the test (after a set period has passed). I would set it only for that session.
I can confirm that a least with Success Factors and AICC packages, resetting the test does let you save your new score and status. The LMS retains both scores, so an audit picks up the problem.