Repository navigation
Commit eb66419
committed
fix(submission): accept a linear scale answer only as its plain number
The check of a linear scale answer accepted "05" and the JSON number
4.0, as ctype_digit() only looked at the digits of the value cast to a
string. Such an answer was stored as sent, so the results counted "05"
as a value of its own next to "5", and exports showed it as written.
The check now reads the answer with normalizeNumericOptionId(), like
the option ids of choice questions: a number, or a string of exactly
its digits. The submit page restores a scale answer from a draft or
from an edited response as its plain number as well, so an answer
stored as "05" before is sent back as "5" instead of being rejected.
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>1 parent 365deea commit eb66419
4 files changed
Lines changed: 28 additions & 5 deletions
File tree
- docs
- lib/Service
- src/views
- tests/Unit/Service
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
953 | 953 | | |
954 | 954 | | |
955 | 955 | | |
| 956 | + | |
956 | 957 | | |
957 | 958 | | |
958 | 959 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
708 | 708 | | |
709 | 709 | | |
710 | 710 | | |
711 | | - | |
| 711 | + | |
| 712 | + | |
712 | 713 | | |
713 | 714 | | |
714 | 715 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
700 | 700 | | |
701 | 701 | | |
702 | 702 | | |
703 | | - | |
704 | | - | |
705 | | - | |
706 | | - | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
707 | 710 | | |
708 | 711 | | |
709 | 712 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1471 | 1471 | | |
1472 | 1472 | | |
1473 | 1473 | | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
1474 | 1492 | | |
1475 | 1493 | | |
1476 | 1494 | | |
| |||
0 commit comments