refactored translation mapping logic to streamline default handling and restricted option assignment based on layout type
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user