Group: Administrators
Posts: 13K,
Visits: 104K
|
In <block solutionRatingsIntro>, change
<block solutionRatingsIntro> / skip = [ values.responseRating == false; ] / onblockbegin = [ values.countTargets += 1; if (values.countTargets == 1) { values.target = values.target1; values.solutions = values.solutions1; values.countSolutions = values.countSolutions1; } else if (values.countTargets == 2) { values.target = values.target2; values.solutions = values.solutions2; values.countSolutions = values.countSolutions2; } else if (values.countTargets == 3) { values.target = values.target3; values.solutions = values.solutions3; values.countSolutions = values.countSolutions3 } else { values.solutions = "Ich benötige hier mehr Informationen" }; values.validRatings = ""; values.selectInstructions = 4; ] / trials = [1 = instructions] / branch = [ block.solutionRatings; ] </block>
to
<block solutionRatingsIntro> / skip = [ values.responseRating == false; ] / onblockbegin = [ values.countTargets += 1; if (values.countTargets == 1) { values.target = values.target1; values.solutions = values.solutions1; values.countSolutions = values.countSolutions1; } else if (values.countTargets == 2) { values.target = values.target2; values.solutions = values.solutions2; values.countSolutions = values.countSolutions2; } else if (values.countTargets == 3) { values.target = values.target3; values.solutions = values.solutions3; values.countSolutions = values.countSolutions3 } else { values.solutions = "Ich benötige hier mehr Informationen" }; values.validRatings = -1; values.selectInstructions = 4; ] / trials = [1 = instructions] / branch = [ block.solutionRatings; ] </block>
Problem 2 comes down to nesting of conditionals, which Inquisit 4 does not support. Changing the logic in <block solutionRatings> to
<block solutionRatings> / trials = [1 = solutionRating] / onblockend = [ if (values.countTargets == 1 && item.solution1.itemcount == 1) { values.best1_target1 = item.solution1.item(1); } else if (values.countTargets == 1 && item.solution1.itemcount > 1){ values.best1_target1 = item.solution1.item(textbox.bestSolution1.response); values.best2_target1 = item.solution1.item(textbox.bestSolution2.response); }; if (values.countTargets == 2 && item.solution2.itemcount == 1) { values.best1_target2 = item.solution2.item(1); } else if (values.countTargets == 2 &&item.solution2.itemcount > 1){ values.best1_target2 = item.solution2.item(textbox.bestSolution1.response); values.best2_target2 = item.solution2.item(textbox.bestSolution2.response); }; if (values.countTargets == 3 && item.solution3.itemcount == 1) { values.best1_target3 = item.solution3.item(1); } else if (values.countTargets == 3 && item.solution3.itemcount > 1){ values.best1_target3 = item.solution3.item(textbox.bestSolution1.response); values.best2_target3 = item.solution3.item(textbox.bestSolution2.response); }; ] / branch = [ if (values.countTargets < item.targets.itemcount) { block.solutionRatingsIntro; } ] </block>
might do the trick.
|