fix: index and swl

This commit is contained in:
Matthias Jung
2026-08-26 13:43:16 +02:00
parent 4d9a572cf9
commit 74bb76c6a1
2 changed files with 54 additions and 0 deletions
+10
View File
@@ -657,6 +657,16 @@ class Build:
"editions": [],
},
)
if edition != "SWL" and question_entry["editions"] == ["SWL"]:
# SWL reuses questions from the regular courses, but can place
# them in SWL-specific chapters. The question index exposes a
# single canonical location, so prefer the first regular
# course occurrence. Pure SWL questions keep their location.
question_entry.update(
section=section_ident,
chapter_title=chapter_title,
section_title=section_title,
)
if edition not in question_entry["editions"]:
question_entry["editions"].append(edition)