Add post-answer review and per-question loading
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user