Add post-answer review and per-question loading

This commit is contained in:
hz
2026-07-14 15:34:38 -05:00
parent abbe6cf9f8
commit 7529ed5863
9 changed files with 265 additions and 42 deletions
+3 -9
View File
@@ -184,15 +184,9 @@ func _show_stage(stage_name: String) -> void:
func _select_question_bank() -> void:
if QuestionBankService.has_questions() and QuestionBankService.load_state == "ready":
_start_question_bank()
return
pending_question_bank_launch = true
if QuestionBankService.load_state == "idle":
QuestionBankService.load_questions_from_api()
elif QuestionBankService.load_state == "failed":
QuestionBankService.retry_now()
var excluded_ids: Array = ProfileService.get_profile().get("correct_question_ids", []).duplicate()
QuestionBankService.load_next_random_question(excluded_ids)
_refresh_bank_state()
@@ -227,7 +221,7 @@ func _refresh_bank_state() -> void:
elif state == "retrying":
bank_status_label.text = "Question bank unavailable. Retrying in %d seconds." % QuestionBankService.next_retry_seconds
elif state == "ready":
bank_status_label.text = "%d questions ready" % QuestionBankService.get_all_questions().size()
bank_status_label.text = "Question bank ready"
elif state == "failed":
bank_status_label.text = "The question bank could not be loaded."
else: