You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds a new 'ranking' question type that allows respondents to
drag-and-drop predefined options into their preferred order.
Based on refactor/vue3 branch, using vue-draggable-plus.
Signed-off-by: paul bochtler <65470117+datapumpernickel@users.noreply.github.com>
fix linting and static check
Signed-off-by: paul bochtler <65470117+datapumpernickel@users.noreply.github.com>
fix: return default ranking when unchanged, disable required
Signed-off-by: paul bochtler <65470117+datapumpernickel@users.noreply.github.com>
change to tap-and-drag logic for possibility to leave blank - add unittest for blank answer
Signed-off-by: paul bochtler <65470117+datapumpernickel@users.noreply.github.com>
fix: realign drag layout to be consistent with create view and include keyboard menu
Signed-off-by: paul bochtler <65470117+datapumpernickel@users.noreply.github.com>
fix: apply review suggestions
- merge ranking into grid condition in ApiController
- swap icon to IconSwapVertical
- fix copyright year to 2026
- use v-else for ranked list header
- simplify sort comparison in validation
Signed-off-by: paul bochtler <65470117+datapumpernickel@users.noreply.github.com>
fix: redesign ranking submit layout to two columns
Signed-off-by: paul bochtler <65470117+datapumpernickel@users.noreply.github.com>
fix: revert to single column layout including review suggestions to keep unranked options area visible
Signed-off-by: paul bochtler <65470117+datapumpernickel@users.noreply.github.com>
fix: phpunit test with sort()
Signed-off-by: paul bochtler <65470117+datapumpernickel@users.noreply.github.com>
fix: linting fail because of additional tab
Signed-off-by: paul bochtler <65470117+datapumpernickel@users.noreply.github.com>
remove tap to rank hint and implement draggable ranking
Signed-off-by: paul bochtler <65470117+datapumpernickel@users.noreply.github.com>
move handlebar to front
Signed-off-by: paul bochtler <65470117+datapumpernickel@users.noreply.github.com>
fix: remove radio button and put drag-icon in edit mode
Signed-off-by: paul bochtler <65470117+datapumpernickel@users.noreply.github.com>
implement tertiary hover styling on ranked options
Signed-off-by: paul bochtler <65470117+datapumpernickel@users.noreply.github.com>
fix(ranking): restore local state, clear form sync and submit validation
Signed-off-by: paul bochtler <65470117+datapumpernickel@users.noreply.github.com>
test(ranking): add e2e coverage for restore, clear form and required behavior
Signed-off-by: paul bochtler <65470117+datapumpernickel@users.noreply.github.com>
fix(ranking): harmonize validation error wording
Signed-off-by: paul bochtler <65470117+datapumpernickel@users.noreply.github.com>
fix(ranking): use unique drag groups and v-if for empty states, add ranking question type to docs/DataStructure.md
Signed-off-by: paul bochtler <65470117+datapumpernickel@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/DataStructure.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -235,6 +235,7 @@ Currently supported Question-Types are:
235
235
|`file`| One or multiple files. It is possible to specify which mime types are allowed |
236
236
|`linearscale`| A linear or Likert scale question where you choose an option that best fits your opinion |
237
237
|`color`| A color answer, hex string representation (e. g. `#123456`) |
238
+
|`ranking`| Using pre-defined options, the user ranks them from most to least preferred. Needs at least one option available. Answers are stored in ranked order (one answer row per option). |
238
239
239
240
## Extra Settings
240
241
@@ -243,7 +244,7 @@ Optional extra settings for some [Question Types](#question-types)
243
244
| Extra Setting | Question Type | Type | Values | Description |
function (array$carry, Answer$answer) use ($questionPerQuestionId, $gridRowsPerQuestionId, $gridColumnsPerQuestionId, $optionPerOptionId) {
325
+
function (array$carry, Answer$answer) use ($questionPerQuestionId, $gridRowsPerQuestionId, $gridColumnsPerQuestionId, $rankingOptionsPerQuestionId, $optionPerOptionId) {
0 commit comments