Skip to content

fix(progress): light a quiz milestone on the progress bar only when the quiz is submitted - #11

Open
RichardoC wants to merge 2 commits into
mainfrom
claude/festive-noether-o06qq7
Open

RichardoC wants to merge 2 commits into
mainfrom
claude/festive-noether-o06qq7

Conversation

@RichardoC

Copy link
Copy Markdown
Owner

Problem

Follow-up to #10. The circles on the header progress bar are Xerte milestone markers, and the engine marks a milestone complete as soon as its page has been viewed. So each quiz circle lit up on opening the quiz, which contradicted the contents-page tick that now means "submitted".

Change

XENITH.PROGRESSBAR.update is wrapped so that after every engine update a quiz milestone is lit only when that quiz has reported its score (the same persisted flag the tick uses). Its label reads Milestone: <quiz>: Complete or Milestone: <quiz> (Quiz not yet submitted). Marker i is the i-th non-menu, non-standalone page with milestone="true", the order the engine builds them in. The correction also runs from the same hooks as the tick (page load, menu tick, page exit, quiz score), so it updates on submission and after a resume.

The bar itself and its percentage are unchanged: they still count pages viewed and are labelled that way. Only the quiz circles change meaning.

Welcome page wording ("the circles on it light up as you submit each quiz") and docs updated.

Tests

test_header_progress_bar_counts_viewed_pages now checks that opening Theme 1 Quiz does not light its marker, submitting it lights only that marker, and the titles read as above. The resumed session in test_quiz_tick_means_submitted_not_opened checks the marker is restored from the persisted flag. 22/22 pass locally against the v0.0.7 release package with the new data.xml; CI builds through a real XOT container.

After submitting Theme 1 Quiz and only opening Theme 2 Quiz: the first circle is lit, the second stays hollow even though its bar segment shows the page was viewed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MfWFRfRw3sR98Vq48EKEYa


Generated by Claude Code

…he quiz is submitted

Xerte marks a progress-bar milestone complete as soon as its page has been
viewed, so the circle for each quiz lit up on opening the quiz, which
contradicted the contents-page tick that now means "submitted".

XENITH.PROGRESSBAR.update is wrapped so that after every engine update a
quiz milestone is lit only when that quiz has reported its score (the same
persisted flag the tick uses), and its label reads
"Milestone: <quiz>: Complete" or "Milestone: <quiz> (Quiz not yet
submitted)". Marker i is the i-th non-menu, non-standalone page with
milestone="true", the order the engine builds them in. Also refreshed from
the same hooks as the tick (page load, menu tick, page exit, quiz score),
so it updates on submission and after a resume.

Welcome page wording and docs updated; the header progress bar test now
checks that opening a quiz does not light its marker, submitting it does,
and the resumed session in the tick test checks the marker is restored.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MfWFRfRw3sR98Vq48EKEYa
@github-actions

github-actions Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

📖 Course content preview

Download the course-preview artifact from the workflow run and open index.html to read the full course (pages + quizzes, correct answers marked ✓):

This preview is generated from source/data.xml by tools/render_preview.py. It is for review only — the playable SCORM package is built by the release workflow.

Resolves the conflict on the learningObject root line, where both sides
recompiled the script attribute: kept this branch's root attributes (they
are identical apart from the script) and regenerated the attribute from the
merged source/scorm_progress.js with tools/sync_root_script.py.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MfWFRfRw3sR98Vq48EKEYa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants