Add post-answer review and per-question loading
This commit is contained in:
@@ -246,7 +246,13 @@ func advance_core_question() -> bool:
|
||||
if question.is_empty():
|
||||
core_status_message = "All available questions cleared."
|
||||
return false
|
||||
active_questions.append(question)
|
||||
return append_core_question(question)
|
||||
|
||||
|
||||
func append_core_question(question: Dictionary) -> bool:
|
||||
if question.is_empty():
|
||||
return false
|
||||
active_questions.append(_prepare_question_choices(question.duplicate(true)))
|
||||
answers.append(null)
|
||||
current_index = active_questions.size() - 1
|
||||
current_question_started_at = Time.get_ticks_msec() / 1000.0
|
||||
@@ -257,6 +263,15 @@ func advance_core_question() -> bool:
|
||||
return true
|
||||
|
||||
|
||||
func get_core_excluded_question_ids() -> Array:
|
||||
var excluded: Array = ProfileService.get_profile().get("correct_question_ids", []).duplicate()
|
||||
for question in active_questions:
|
||||
var question_id := str(question.get("id", ""))
|
||||
if question_id != "" and not excluded.has(question_id):
|
||||
excluded.append(question_id)
|
||||
return excluded
|
||||
|
||||
|
||||
func get_current_elapsed_seconds() -> float:
|
||||
if current_question_started_at <= 0.0:
|
||||
return 0.0
|
||||
|
||||
Reference in New Issue
Block a user