Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[solved] Problems with logger: it's not logging my multiple choice responses

edited April 2015 in OpenSesame

Hello, I've been programming an experiment for my Bachelor thesis with Open Sesame and so far it's been running wonderfully!

However, I've encountered a problem; namely that it's not logging my responses for the multiple choice items. It does log the time and count but both of those are not variables I need for my experiment.

I looked at the script and everything seems to be in order, it simply doesn't seem to put the variables (form_var) into the logger, despite me explicitly putting them in at the top bar on the normal screen, the answers I've also inserted normally. I've been trying to fix it but I'm new to this program and to Python so I've not gotten very far.

What I've tried so far:
1) Changing the variable names - didn't work, in fact it had been logging the responses to the first multiple choice item in the experiment until I changed its name so that just made it worse - haha.
2) Deleting all the loggers and putting new ones in - didn't do anything as far as I can tell.

This is pretty much all I've been able to do so far because the script looks synonymous to the standard script (except for a different text input, of course) so really I'm lost.

Also I've found that the logger sometimes does log variables that I cannot find in the logger when trying to manually select them but that's less of a problem since I can just tell it to log everything for now.

Either way since I was planning to start the testing phase this wednesday I figured I would ask all of you wonderful people if you could help me out!

Felix

PS - Here's an image of one of the items it won't log.

http://img.cogsci.nl/?q=5533ef5686095

Comments

  • I'm sort of embarrassed but by now I've managed to fix it myself by simply adding custom variables. Yup, it's kind of solved every single problem I had.

  • edited 1:44PM

    Good to hear you figured it out!

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • Hi,

    I have the same problem with logging the answer of multiplechoice questions. Can anybody helps to solve this problem? Thank you!

    Renske

  • HEy renske,

    You could do that for example:

    # init a form
    gender_check = Form(exp, cols = 1, rows = 6, spacing = 10, margins = (100,100,100,100), theme = u'gray')
    # create the objects
    label = Label(text = "blabla")
    
    checkbox1 = Checkbox(text = "check1",  var='my_response_var')
    checkbox2 = Checkbox(text = "check2",  var='my_response_var')
    checkbox3 = Checkbox(text = "check3",  var='my_response_var')
    checkbox4 = Checkbox(text = "check4",  var='my_response_var')
    
    button_next = Button(text = "Next")
    
    gender_check.set_widget(label, (0,0))
    gender_check.set_widget(checkbox1, (1,0))
    gender_check.set_widget(checkbox2, (2,0))
    gender_check.set_widget(checkbox3, (3,0))
    gender_check.set_widget(checkbox4, (4,0))
    gender_check.set_widget(button_next, (5,0))
    
    
    while var.my_response_var =='no':
        gender_check._exec()
    

    Here the variable "my_response_var" is associated to the checkboxes (they do not beong to a same, so multiples answers are possible). What will happen is that my_response_var will return a list of name of boxes that have been checked.
    If checkbox2 is clicked, then checkbox4, you would get my_response_var = [check2;check4], so the name you enter when you define the checkbox are logged.
    See here:
    http://osdoc.cogsci.nl/3.2/manual/forms/variables/

    Best,

    Sylvain

    Thanked by 1renske
  • I think that's not quite what I mean. I only want to log if somebody gave the correct response, I don't want to log all the responses they gave.
    The solution is probably very easy but I still can't make it work, which is kind of frustrating.

    I attached my experiment, maybe if you see it it will become more clear what I mean.

    Anyway thanks for your response!

    Renske

    m1.osexp 214.8K
  • Hey Renske,

    I am not sure if I understand it clearly but look.

    At the end of your sequence just enter an inline:

    with:

    # keep the response entered if it is equal to the target
    # otherwise set it at 'incorrect'
    if var.response != var.target:
        var.response = 'Incorrect'
    
    # enter the accuracy of the trial in another variable (1 if correct 0 if incorrect)
    if var.response == var.target:
        var.accuracy_trial = 1
    else:
        var.accuracy_trial = 0
    

    I hope it is what you want find also the script. Tell me if it was something else you wanted.

    Best,

    Sylvain

    m2.osexp 215.2K
  • Sorry I'm confused. I just used the regular multiple choice items and set my options as opensesame allows you to do but like "Felixthealleycat" it only logs count and time (though actually it gives NA) I'm confused as to why this is not logging the response. It doesnt even show up in the "response" variable. and I did set the variable name in the click menu.

    Though I understand "Syklvains" answer in that I could manually program a form I would assume that it would be possible to simply log the already existing form??

  • Ok solved it too; as Felix said: custom variables.

    Note that what he's referring to is adding a custom variable to the logger

    I assumed he meant some inline script which would create a variable hence my initial confusion.

Sign In or Register to comment.