File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,23 @@ process_qsf <- function(path_to_qsf,
192
192
map(~ gsubfn(" (QID[0-9]+)" , function (qid ) {items [qids == qid ]}, .x )) %> %
193
193
# Collapse logic into a single string.
194
194
map(~ paste(.x , collapse = " " ))
195
+
196
+ # Handle questions that use a fixed condition ("If False", "If True")
197
+ ii_boolean_displaylogic <- (displayed_questions %> %
198
+ map(~ .x $ Payload $ DisplayLogic ) %> %
199
+ map(~ .x $ `0` ) %> %
200
+ map(~ map(.x , " LogicType" ) %> % unlist()) == " BooleanValue" ) %> %
201
+ which()
202
+
203
+ display_logic [ii_boolean_displaylogic ] <- displayed_questions [ii_boolean_displaylogic ] %> %
204
+ map(~ .x $ Payload $ DisplayLogic ) %> %
205
+ map(~ .x $ `0` ) %> %
206
+ map(~ paste(
207
+ map(.x , " Value" )
208
+ )) %> %
209
+ map(~ gsub(" ?NULL ?" , " " , .x )) %> %
210
+ # Collapse logic into a single string.
211
+ map(~ paste(.x , collapse = " " ))
195
212
196
213
logic_type <- displayed_questions %> %
197
214
map(~ .x $ Payload $ DisplayLogic ) %> %
You can’t perform that action at this time.
0 commit comments