html layout/event times/selector vs. scale/ compatibility

PennController for IBEX Forums Support html layout/event times/selector vs. scale/ compatibility

Viewing 15 posts - 16 through 30 (of 48 total)
  • Author
    Posts
  • #7542
    HPI
    Participant

    Dear Jeremy,
    sorry for the multiple posts, I am not sure if it has canceled a reply of mine.

    I have noticed that during the training, when the script has to check for success or failure, now it seems to count everything as failure since it prints the negative feedback also the times when the answer is correct.

    newSelector("smileys_practice")
        .disableClicks()
        .add( getImage("inappropriate"), getImage("infelicitous"), getImage("appropriate"))
        .keys(                 "V"     ,              "B"       ,              "N"     )
        .once()
        .log()
        .wait()
        .test.selected(variable_practice.Right_Key)  // Increment if correct answer
        .success( getVar("practice_score").set(s_p=>s_p+1) )
        .failure(newText("negative feedback", variable_practice.feedback_eng)
                .log()
                .print()
                .center()
                .cssContainer({"font-size": "130%", "color": "red"})
            )
        ,

    This is the column Right_Key in my template

    Right_Key
    N
    N
    N
    N
    B
    B
    B
    B

    So when they press N, no negative feedback should appear in the 4 first trials.

    Nonetheless it prints the feedback all the times.

    It is weird cause yesterday I tried and it was working correctly.

    Do I need to store the pressed key in a variable in order to compared it with what is the column Right Key in the template?

    getKey("response")
        .test.pressed()
        .success( getKey("response").test.pressed(row.answer)
            .failure(newText("negative feedback", "Wrong answer!")

    This is from the documentation, and the selected key is store in variable “response”.

    I tried with test.pressed but it gives me an error within a selector.

    The capslock n vs. N seems not to be the problem.

    Do you know what could be wrong?

    Thanks

    HPI

    #7545
    Jeremy
    Keymaster

    Hi,

    The command selector.test.selected does not take a key as an argument, but a reference to an element in the Selector element. So you could do something like this:

    .test.selected({
      V: getImage("inappropriate"),
      B: getImage("infelicitous"),
      N: getImage("appropriate")
    }[variable_practice.Right_Key])

    There is no test.pressed command for the Selector element: https://doc.pcibex.net/selector/

    Jeremy

    #7562
    HPI
    Participant

    Hi Jeremy,
    Thank you everything seems working.

    So if you remember in one of the first questions I asked about the compatibility between pcibex e ibexfarm, because in my university we have an ibexfarm platform running on our server, and they would like that I run the experiment with real participants from there.

    So I was trying to upload what I have now on ibexfarm.

    It doesn’t look I can modify the css files, and I changed some settings in the layout on pcibex, so I would like to upload my css there. Do you have any idea here?

    Then I added the penncontroller to the js files and I call it within my script.

    If I hit run, I get an error that it doesn’t recognize the function jump (I use it to restart the training if the participant is not good enough)

    Then it doesn’t load anything so I don’t know if this is the only problem I will get, or will I get others, but to begin…should I do change the function jump with another function compatible with ibexfarm?

    Thanks,

    HPI

    #7563
    Jeremy
    Keymaster

    Hi,

    The original Ibex Farm won’t let you edit the files that come by default with new projects. However you can freely edit files you add yourself. You can use PennController.css to target PennController elements, or you can use global_z.css to write your own general CSS rules

    The jump error you encounter most likely means that you are using an old version of PennController.js. Make sure to use the latest version in your project

    Jeremy

    #7570
    HPI
    Participant

    Hi,

    sorry for the probably not-so-smart question.

    If I load in ibexfarm (on our server) https://github.com/PennController/Sync.git in the sync interface on top of the screen, it loads the penncontroller correctly, but it tells me there is a problem with the jump function, that is not recognized.

    If I load in the same interface the address you gave me with the latest release https://github.com/PennController/penncontroller/blob/master/releases/latest/PennController.js it gives me an error “file not found”. If I try to download the script from this address and upload it manually in the js_includes sections, I start getting errors with the server.
    I have to cancel the experiment and make a new one to try again.

    Could you tell me how to declare the “latest release” in a compatible way to use the sync interface? Is the syntax wrong in the address? Is it pointing to a not-correct directory? The one that works ends with Sync.git, the latest release ends with the .js file. Maybe is that the problem?

    HPI

    #7574
    Jeremy
    Keymaster

    Hi,

    I’m sorry, I had forgotten to update the version of PennController at https://github.com/PennController/Sync.git — it should now be 2.0

    Note that you can simply download PennController.js from GitHub and then upload it manually to your project’s js_includes folder

    Jeremy

    #7583
    HPI
    Participant

    Hi, still me,

    thanks! Loading the PennController, works! Check! (at least one thing going :D)

    Still, it doesn’t run on ibex and I am doing debugging.

    If I load only the welcoming HTML files it runs.

    In the code, the experiment loads pictures within the template from csv files. The pictures are stored on our server and loaded with addhost.

    On pcibex I added “3 free” pictures that are loaded in the instructions, in the HTML files.

    The “free pictures” and the csv files on pcibex are loaded in the resource section.

    To transfer them on Ibexfarm:

    1) a. Should I load the “free pictures” in the chunk_includes section?

    b. Should I load the “free pictures” in the data_includes section?

    2) a. Should I load the csv files called by the templates in the code in the chunk_includes section?

    b. Should I load csv files called by the templates in the code in the data_includes section?

    If no to everything how should I load the csvs and pictures so that Ibexfarm can read them?

    Thank you!

    Hopefully it will run 😀

    HPI

    #7584
    Jeremy
    Keymaster

    Hi,

    1) Multimedia files (images, videos, audios) need to go in the “www” folder (which is the exposed folder of the experiment, where experiment.html and server.py live, which need to be publicly accessible to take the experiment)

    2) Text-content files (html, csv) need to go in the “chunk_includes” folder: server.py reads their content and feeds a “CHUNKS_DICT” object with it, so the files don’t need to be publicly accessible

    Jeremy

    #7585
    HPI
    Participant

    So for 1) I am not sure I understand how to load the pics in the www folder.

    I have:

    chunk_includes
    css_includes
    data_includes
    js_includes
    results
    server_state

    is it somewhere else? This is all I have within a single project in ibexfarm

    Thanks!

    #7586
    Jeremy
    Keymaster

    Ah, sorry, I forgot you are using an instance of the original Ibex farm, not a standalone version of the experiment. The original Ibex farm doesn’t readily come with hosting solutions for multimedia resources (which is a feature we added to the PCIbex Farm when we set it up)

    If you want to host any multimedia file on the farm, you will need to upload them to the www subfolder of your project’s folder on the farm’s server. This should be easy if you are the one who set up the farm, otherwise you’ll have to contact whoever is in charge

    Jeremy

    #7588
    HPI
    Participant

    Ok, I solved part of it.

    It doesn’t correctly load the pictures that I call within the instruction in the HTML file.

    I wrote something like this:

    <p>
    First, press the <b>SPACEBAR</b> to load the picture.
    </p>

    Example

    This picture remains blank. The rest that I call within the trials is correctly loaded.

    Should I call them in a specific way within the HTML file?

    THANKS!

    #7589
    HPI
    Participant

    “” img src=”3_granpas.jpg” alt=”Example” width=”500″ height=”333″ class=”center” “”

    sorry I guess I messed up with the HTML syntax

    #7591
    Jeremy
    Keymaster

    Do you mean that you have <img src="3_granpas.jpg" alt="Example" width="500" height="333" class="center"> in one of your HTML files? If so, you need to place an image file named 3_granpas.jpg inwww too

    (note that PennController doesn’t preload images/audios/videos directly referenced in HTML img, audio and video tags)

    Jeremy

    #7592
    HPI
    Participant

    I placed it in the folder, it loads everything, but not the direct file called within the HTML page.

    I solved it anyway (thank god :D), I loaded it somewhere else, and the I call the URL … in this way the HTML pages run correctly.

    Thanks!

    Hopefully, I made it to the end! Thank you!

    HPI

    #7624
    HPI
    Participant

    Hi,

    1.In the csv template commas are used as separators. Nonetheless, we have sentences that require the commas to be read as commas on the screen during the task.
    Is there a way to write the sentences using commas in the csv file and to tell the code that those are not commas to be used as separators? Something like “%,”?

    2.Now the experiment loads the practice before the experiment, if the participant is not good enough, it jumps back to the beginning of the practice.
    Do you know if the function “jump” keeps the same randomized order each time the participant jumps back to the beginning?
    I would like to have each time a different random order of the practice, and right now it seems to keep the first one it has loaded.

    3.If after two times that the participant has loaded the practice and he/she did not pass it, we would like to discard him/her (cause it might be discouraging to start over the practice several times), could I use the same trick with “jump”, create a trial, set a variable to zero, each time the practice ends add + 1, if it’s higher than 2, jump to the end of the experiment?

    Thank you!
    HPI

Viewing 15 posts - 16 through 30 (of 48 total)
  • You must be logged in to reply to this topic.