refactored translation mapping logic to streamline default handling and restricted option assignment based on layout type

This commit is contained in:
2026-05-27 15:15:39 +02:00
parent e8f92cc6ca
commit 5a2faa3ecc
2 changed files with 8 additions and 22 deletions

View File

@ -339,8 +339,11 @@ if ($qnID) {
$optionsArr[] = $o;
$pointsMap[$opt['defaultText']] = (int)$opt['points'];
}
$q['options'] = $optionsArr;
$q['pointsMap'] = $pointsMap;
// DB answer_option rows are for choice layouts only — do not overwrite string/value spinners.
if (in_array($layout, ['radio_question', 'multi_check_box_question', 'glass_scale_question'], true)) {
$q['options'] = $optionsArr;
$q['pointsMap'] = $pointsMap;
}
}
$questions[] = $q;