Two issues with logging and results

PennController for IBEX Forums Support Two issues with logging and results

Tagged: ,

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #10893
    KateK
    Participant

    We’re running into two possibly unrelated but both equally confusing issues with our experiment. I’ll just go through each individually:

    1) Issue with newHtml and .log()
    We’re trying to record participants metadata (Prolific ID, age, first language, etc.), so we have the following code:

    
    newTrial("metadata2",
        newFunction( ()=>code=undefined ).call(), // Making code inaccessible from javascript console
        
        newHtml("metadataform", "metadata_collection.html")
            .log()
            .print()
            .center()
            .checkboxWarning("It is highly recommended that you check the '%name%' box before continuing")
            .inputWarning("You must complete all input fields.")
            .radioWarning("You must select an option")
        ,
        newButton("Continue")
            .center()
            .print()
            .settings.css('margin-top', '25px')
            .wait(getHtml("metadataform").test.complete()
                .failure(getHtml("metadataform").warn())
            )
        )
    ,
    

    The “metadata_collection.html” file contains various <textarea> and <input type=”text”> fields. As far as I understand from the doc pages (https://doc.pcibex.net/html/html-log/), the .log() command after newHtml(…) should do the trick, and yet nothing is recorded in the csv files. I’m really puzzled as to why, since I can’t see how our code diverges from the one in the doc in any relevant way. Happy to share the link to the demo if that helps.

    2) Missing results
    Yesterday and earlier today we started a preliminary data collection, before we would launch the full thing. We have three codes/projects for the three groups we’re testing, where the code is entirely identical but just differ in the csv files generating the templates and some other materials. However, it seems that some participants’ results are just… missing. Judging by prolific, we should’ve gotten 5 people on each groups, and yet when I try to download the results (from the “published”) pages, in the csv file I can only see 4 participants from one group, 2 from another, and just 1 from the last. I have really no clue why some participants are simply not being recorded. Again, happy to share details and links – we’re all very puzzled!

    • This topic was modified 1 year, 1 month ago by KateK.
    • This topic was modified 1 year, 1 month ago by KateK.
    #10912
    KateK
    Participant

    We have fixed issue 1 somehow, but I think the solution might be of interest to others as well.

    Essentially, it looks like the .log() method works fine, but the .log() command simply doesn’t work. In less opaque terms: when you add .log() at the end of a Trial, outside it, then it actually does have an effect on the results csv file, and it adds what it’s supposed to add. However, at least in our code, whenever .log() is *inside* a Trial (for example, newHtml(… .log()), newTextInput(… .log()), etc.)), it simply just doesn’t do anything at all for some reason. I don’t know if the PennController has a little bug that might be causing this, but by fickling and tinkering it seems like a pretty consistent pattern.

    As for issue 2, the phantom missing results, we’re still fully in the dark – anyone who has had similar problems?

    • This reply was modified 1 year, 1 month ago by KateK.
    • This reply was modified 1 year, 1 month ago by KateK.
    • This reply was modified 1 year, 1 month ago by KateK.
    #10941
    Jeremy
    Keymaster

    Hi,

    1. There is no generic .log command in PennController: it needs to either apply to an element (eg newHtml(...).log()/newTextInput(...).log()) or to a trial (eg newTrial(...).log()). You cannot call .log() inside the parentheses that open/close an element, as in *newHtml(... .log())

    2. If results haven’t appeared in the meantime, there are two main possibilities: (a) some participants found a way to validate their submission without actually submitting results, or (b) there was an issue with the PCIbex Farm servers causing some data loss. Unfortunately the latter is not uncommon, this is an issue that I haven’t been able to solve so far despite putting many safeguards in place. Apologies for the inconvience

    Jeremy

    #10943
    JunLyu
    Participant

    Hi,

    I have the same issue. This is what I have:

    newTrial(“subject_info”,
    newHtml(“subject_info”, “info.html”)
    .log()
    .cssContainer({“width”:”720px”})
    .checkboxWarning(“I consent to participate”)
    .center()
    .print()
    ,
    newButton(“continue”, “Click to continue”)
    .center()
    .print()
    .wait(getHtml(“subject_info”).test.complete()
    .failure(getHtml(“subject_info”).warn())
    )
    )

    But it doesn’t seem to work. The results file did not show subjects’ meta data. I also tried putting .log() at the end of the newTrial, but it doesn’t seem to work for me either.

    newTrial(“subject_info”,
    newHtml(“subject_info”, “info.html”)
    .cssContainer({“width”:”720px”})
    .checkboxWarning(“I consent to participate”)
    .center()
    .print()
    ,
    newButton(“continue”, “Click to continue”)
    .center()
    .print()
    .wait(getHtml(“subject_info”).test.complete()
    .failure(getHtml(“subject_info”).warn())
    )
    ).log()

    Am I missing something?

    Best,

    #10950
    PriRoNika
    Participant

    Hi! I also had an issue with getting data from the html form. I found out that the form works in my older experiments (2022), but not in the new experiments with the same resources and scripts. I don’t know java script, but I noticed the difference in Modules -> PennController.js. When I substituted this file with an older version, everything started working! Although I needed to change the html layout a bit, so that everything is in the center of the screen).

    Here is my experiment: https://farm.pcibex.net/r/Ndwmfl/

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.