alopezlago / MODAQ

Web application for assisting moderators with reading and scorekeeping quiz bowl matches.
https://www.quizbowlreader.com/demo.html
MIT License
14 stars 5 forks source link

Changing powermark symbol retroactively changes data in .qbj exports but not .json exports #302

Closed g3ner1c closed 3 months ago

g3ner1c commented 4 months ago

If the powermark symbol is changed mid-game, the points shown in the ui will update accordingly, as well as the data in exported .qbj files. However, .json exports do not update.

Along with #255, a fix to this would be very helpful for tournaments that are using sets with nonstandard formatting.

example

files before powermark change

files after powermark change

note: the set used in these files uses [*] as the powermark (it's also cleared so dw)

alopezlago commented 3 months ago

The exact value in points isn't really used in GameState (which is what is serialized into the JSON file), we derive all the points from it. Right now it's used to check if something is correct or not (i.e. to make decisions if points > 0). See the comment in IBuzzMarker, which suggests changing the name to something like isCorrect:

https://github.com/alopezlago/MODAQ/blob/e0acfcc3645e966809490332380f1c28f98c6363/src/state/IBuzzMarker.ts#L8C1-L11C20

The one place I see it possibly affecting things is in Cycle.orderedBuzzes, but that's only if you change the neg value, and changing the ordering here shouldn't affect anything:

https://github.com/alopezlago/MODAQ/blob/e0acfcc3645e966809490332380f1c28f98c6363/src/state/Cycle.ts#L168

I'm going to close this as Won't Fix for now. Tools should rely on the QBJ export, which is standardized and can be imported into other tools like Yellowfruit.