Alternativ Uses Task in Inquisit 4


Author
Message
Djo
Djo
Associate Member (92 reputation)Associate Member (92 reputation)Associate Member (92 reputation)Associate Member (92 reputation)Associate Member (92 reputation)Associate Member (92 reputation)Associate Member (92 reputation)Associate Member (92 reputation)Associate Member (92 reputation)
Group: Forum Members
Posts: 5, Visits: 35
Hello,
while converting the script of the Alternativ Uses Task from Inquisit 5 into Inquisit 4 I have created an error which I can't find.

When entering the Ratingnumber of the best use creation, I get an error message although I haven't entered anything yet. Also when saving the summery data the entries which had to be corrected are not shown, although they are included in the whole data.

Thank you in advance for your efforts,
Djo
Attachments
Dave
Dave
Supreme Being (817K reputation)Supreme Being (817K reputation)Supreme Being (817K reputation)Supreme Being (817K reputation)Supreme Being (817K reputation)Supreme Being (817K reputation)Supreme Being (817K reputation)Supreme Being (817K reputation)Supreme Being (817K reputation)
Group: Administrators
Posts: 10K, Visits: 56K
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.

Edited 3 Months Ago by Dave
Djo
Djo
Associate Member (92 reputation)Associate Member (92 reputation)Associate Member (92 reputation)Associate Member (92 reputation)Associate Member (92 reputation)Associate Member (92 reputation)Associate Member (92 reputation)Associate Member (92 reputation)Associate Member (92 reputation)
Group: Forum Members
Posts: 5, Visits: 35
Dear Dave, 

thank you very much for your quick and detailed reply!

Kind regards,
Djo
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search