setVariableValue Not Working To Change cpQuizInfoPointsscored ("bonus points" help)
Hi all! Long story short, I'm trying to increase the learner's score without increasing the quiz score maximum. I've tried adding a button with a point value, which increased the score when "Add To Total" was selected, but also increased the point maximum (so reflects poorly on learners who did not click what was supposed to be essentially "bonus" points). I also tried unchecking "Add To Total" like pictured below, but in that case the button doesn't grant any points whatsoever.

It seemed like the best way to accomplish this was with some simple JavaScript, but the script I tried below doesn't work to change the score. It does, however, work to produce the alert message, so I know JavaScript can run.
var oldScore = window.cpAPIInterface.getVariableValue("cpQuizInfoPointsscored");
var newScore = oldScore + 10;
alert("Old score: " + oldScore +"; New score: " + newScore);
window.cpAPIInterface.setVariableValue("cpQuizInfoPointsscored", newScore);
I know generally this variable is probably not meant to be edited manually; however my specific use case here is not even so much to create "bonus points" as to counteract an issue we're having with questions not always loading correctly, which I posted about earlier this month. I wanted to use this as a workaround for learners to be able to say "hey this question didn't load correctly" and to give them points for that question anyway so they're not penalized for it. So if my JavaScript question is a case of the "XY problem" and you have a better solution to report, I'll gladly accept that too.

Thanks in Advance!
