Dear SoSci Support,
Two years ago I programmed a questionnaire flow in which multiple questions with multiple items are evaluated in a loop. However, with recent changes in PHP permissions at your end my flow no longer works.
Here's how the setup looked like:
I would define an array of questions:
$Qests= array('I103', 'I104', 'I105', 'I106', 'I107');
And than loop through each question and each item of the question like this:
foreach($Qests as $curQuest){
$wrong=0;
foreach(${$curQuest} as $curItem){
if (value($curItem) == 1){
$wrong=$wrong+1;
};
};
};
Now this no longer works, as I am not permitted to use ${$curQuest} to loop through the list of items. I get an error:
Warning: The PHP keyword ${ is not allowed within PHP code.
Warning: The PHP code contains functions or PHP elements that you are
not permitted to use in the questionnaire. If you think that the
constructs in question are safe to use, please contact the
administrator!
Could you please let me know how to implement the loop using the new PHP syntax permission rules?
Thank you so much!
Best wishes,
Milan