mirror of
https://github.com/deunix-educ/aventuriers-des-mots.git
synced 2026-10-13 02:11:58 +02:00
Show "Exercise N/3" so repeated content doesn't look like a freeze
Manual report: after "Bravo!", clicking Continue seemed to do nothing. An automated test proved the mission does advance (a new exercise instance loads, completed_count increments) -- but mission_02_pont_des_phrases has exactly one sentence_correction exercise in the data right now, so the "next" exercise is the identical sentence the child just solved. Nothing was broken; there was just no visible signal that progress happened. Added a persistent progress label at the top of exercise_host, updated on every exercise load. Doesn't address the underlying content-volume gap (still tracked in decisions.md point 14), but makes the repetition legible instead of indistinguishable from a stall. Rebuilt both exports. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -26,6 +26,7 @@ var _last_exercise_id := ""
|
||||
|
||||
@onready var _exercise_container: Control = %ExerciseContainer
|
||||
@onready var _overlay_container: Control = %OverlayContainer
|
||||
@onready var _progress_label: Label = %ProgressLabel
|
||||
|
||||
|
||||
## Accesseurs reserves aux tests d'integration (scenes/exercises/
|
||||
@@ -67,6 +68,7 @@ func _load_next_exercise() -> void:
|
||||
_mission, _last_exercise_id, _current_difficulty
|
||||
)
|
||||
_attempt_number = 1
|
||||
_update_progress_label()
|
||||
|
||||
if _current_exercise_scene != null:
|
||||
_current_exercise_scene.queue_free()
|
||||
@@ -78,6 +80,15 @@ func _load_next_exercise() -> void:
|
||||
_connect_answer_signal()
|
||||
|
||||
|
||||
## Un contenu encore peu nombreux (voir docs/specs/decisions.md, point 14)
|
||||
## peut faire redonner le meme exercice d'une mission a l'autre tentative :
|
||||
## sans ce repere, ca ressemble a un blocage plutot qu'a une progression.
|
||||
func _update_progress_label() -> void:
|
||||
_progress_label.text = "%s %d/%d" % [
|
||||
UIText.get_text("exercise_host.progress_label"), _completed_count + 1, MISSION_LENGTH
|
||||
]
|
||||
|
||||
|
||||
func _connect_answer_signal() -> void:
|
||||
match _mission["exercise_type"]:
|
||||
"multiple_choice":
|
||||
|
||||
Reference in New Issue
Block a user