fix(quizzes): remove chapter numbering from HTML quiz callouts via JavaScript

- Add JavaScript function to transform 'Self-Check: Question 1.3' to 'Self-Check: Question 3'
- Uses regex to extract question number after dot, keeping the individual question count
- Runs with multiple timing strategies and MutationObserver for robustness
- HTML-only solution: PDF retains chapter numbering, no quiz system changes
- Added to existing sidebar-auto-collapse.js to avoid additional script files
This commit is contained in:
Vijay Janapa Reddi
2025-08-04 00:27:06 -04:00
parent a8d8f4ccc4
commit 87337c3efb
2 changed files with 34 additions and 2 deletions

View File

@@ -512,11 +512,9 @@ custom-numbered-blocks:
quiz-question:
colors: ["E6F4F7", "119EC7"] # Updated to refined teal palette
collapse: true
numbered: false # Drop chapter numbering for HTML (PDF will keep it)
quiz-answer:
colors: ["E8F2EA", "4a7c59"] # Updated to muted forest green
collapse: true
numbered: false # Drop chapter numbering for HTML (PDF will keep it)
resource-slides:
colors: ["E9F3E3", "55984D"]
collapse: true