JunLyu

Forum Replies Created

Viewing 4 posts - 16 through 19 (of 19 total)
  • Author
    Posts
  • in reply to: Comprehension question and rshuffle in self-paced reading #7614
    JunLyu
    Participant

    Thank you Jeremy! I tried the code below. I assume that although “global” in name, it still needs to be embedded within the “local” environment of newTrial? Is that correct? (I was thinking maybe a “global” variable should stand on its own, on a par with newTrial).

    Template("demo.csv", row =>
        newTrial("experimental-trial",
        newController("DashedSentence",{s: row.Sentence})
            .cssContainer({"margin-top":"2em", "margin-bottom":"2em"})
            .print()
            .center()
            .log()      
            .wait()
            .remove()
        ,
        newText("CompQuestion", row.Question)
            .center()
            .print()
        ,
        newVar("isCorrect").global()
        ,
        newScale("answer",...[row.Answer1,row.Answer2].sort(v=>0.5-Math.random()))
            .labelsPosition("right")
            .center()
            .log()
            .print()
            .wait()
            .test.selected( row.Answer1 )
            .success( getVar("isCorrect").set(true) )  
            .failure( getVar("isCorrect").set(false) )
            .log("isCorrect", getVar("isCorrect"))
            )
        )

    Jun

    in reply to: Comprehension question and rshuffle in self-paced reading #7604
    JunLyu
    Participant

    Thank you Jeremy! The code for answer choice randomization works! However, I have one more question:

    Do we need to specify in the csv file which answer is the correct one? We want to know if the participant has answered correctly or not and have the program assign a value to the participants’ responses (e.g., 1 as “hit”, 0 as “miss”). In the old Ibex, I only need to make the correct answer stay on the left position with the code as["Correct answer", "Wrong answer"], hasCorrect: true, randomOrder: true. How does that work in PC Ibex?

    Thank you!
    Jun

    in reply to: How to present two lines on one page? #5001
    JunLyu
    Participant

    I see! This really helps! Thanks so much!

    Best,
    Jun

    in reply to: How to present two lines on one page? #4995
    JunLyu
    Participant

    Thanks so much Jeremy! If I understand correctly, in PCIbex, I don’t need to specify the size of the word or phrase by including them in “”. So in your code with “DashedSentence” command, each word in “Today is a very nice day!” will be presented based on space, correct? Also, by adding a new controller, the two sentences can be presented on the same page now, yes? If so, then how do I, say, present the first sentence in its entirety? So, basically, a participant sees the whole chunk “Today is a very nice day!”, followed on the second line by “So”,”I”,”went” … in a word-by-word fashion?

    Jun

Viewing 4 posts - 16 through 19 (of 19 total)