Our session history rebuilds last week's quiz from the pack, and the pack is not where the quiz was recorded
PubTrivia keeps every quiz you have run : the final leaderboard in full, and a question-by-question record of what each table answered, for the landlord who gets a complaint a week later. The data for that is all in the database. The screen that reads it back had a bug I only found by reading two files in the same sitting, and it is the kind that no test failure and no error report will ever hand…
PubTrivia retains every quiz hosted, including the final leaderboard and a detailed record of each question answered by tables. The screen that displays this information has a bug that was only discovered by reading two files simultaneously. This error is not detected by tests or error reports. The bug causes the history screen to display a reconstruction of the questions asked, showing zeros for the number of correct answers, instead of the actual questions and their scores.
This issue occurs in every session run, rendering the history screen inaccurate. To fix the problem, the code should fetch the specific questions asked during the session instead of showing the first N questions from the pack in numerical order.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.