Repository navigation
feat(lstsv): fixed choices keep their position in a randomized list (#237) - #238
Merged
Merged
Conversation
…237) A choices column `fixed` (yes) adds a choice's code to keep_codes_order next to the exclusive ones, on a select_one (answer_order) and a select_multiple (subquestion_order). The reverse paths read a keep_codes_order code that is not exclusive back as fixed=yes; DDI carries it as a choice column. The randomize-pinned warning names fixed options too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 4, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #237.
With
parameters: randomize=true, LimeSurvey output pinned only exclusive options throughkeep_codes_order, so a non-exclusive "Sonstiges" was shuffled into the middle. An optionalchoicescolumnfixed(yes,trueor1) now marks options that keep their position. Their codes go intokeep_codes_orderin list order, next to the exclusive ones (once each), on aselect_multiple(subquestion_order) and aselect_one(answer_order), including aselect_onewhosechoice_filterisselected(${q}, name)on the same list.fixedwithoutrandomize=truehas no effect and no warning.lstsv2xlsform, andlstsv2ddivia the instrument): akeep_codes_ordercode that is not inexclude_all_othersreads back asfixed=yes.fixedis an ordinary non-lifted choice column, carried ascdl:choice_column(no new DDI field).randomize-pinnedwarning now says "exclusive or fixed answer(s)".convention:randomOrder(fixedColumn,fixedTrueValues); README, the lstsv2xlsform README and the generated skill syntax reference are updated.Before (choices
m_c3:abwes,sonstwithfixed=yes,keinewithexclusive=yes):After:
Tests
randomOrder.test.ts, 8 new): select_multiple and select_one codes and order, dedupe with exclusive, filtered select_one on the same list, no effect without randomize, value spellings, round trip tofixed=yes,lstsv2ddichoice column.fixedcolumn converts (1 new).npm test: 108 files and 1773 tests pass.npm run validateis clean.🤖 Generated with Claude Code