mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-07-15 21:28:33 -05:00
[PR #1946] [MERGED] fix(socratiq): correct IndexedDB store name and key in getIncorrectQuestions() #32210
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/harvard-edge/cs249r_book/pull/1946
Author: @farhan523
Created: 7/7/2026
Status: ✅ Merged
Merged: 7/10/2026
Merged by: @profvjreddi
Base:
dev← Head:fix/socratiq-incorrect-questions-store📝 Commits (1)
a979097fix(socratiq): correct IndexedDB store name and key in getIncorrectQuestions()📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
socratiq/src_shadow/js/components/quiz/quiz-storage.js(+1 -1)📄 Description
Problem
getIncorrectQuestions()insocratiq/src_shadow/js/components/quiz/quiz-storage.jsreads from an IndexedDB store that does not exist:db_configs_one.jsisongoingIncorrectQuestions(camelCase). The hyphenated name appears nowhere else in the codebase, so opening a transaction on it throwsNotFoundError.updateIncorrectQuestions()stores the record under the fixed id'current'. Every othergetByKeycall in the codebase passes(storeName, key).Incorrect quiz answers are being recorded on every quiz submission today (
saveQuizResult → updateIncorrectQuestions), but this bug made that data unretrievable.Fix
One line — read from the same store and key the writer uses:
Notes
initiateStudyBtn, currently commented out atindex.js:107/index.js:616) — as written it would have thrown on first click.book/quarto/tools/scripts/socratiQ/bundle.js, so built output is unchanged.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.