Force DownloadRecordingButton

PennController for IBEX Forums Support Force DownloadRecordingButton

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9799
    cslm
    Participant

    Dear Jeremy,

    I’m trying to force my experiment to show the DownloadRecordingButton like you suggest here because I don’t have time to set up a server now, but it seems like SendResults is not failing, even with a dummy URL. Instead the experiment just stays at SendResults indefinitely. Is there another easy way to make it fail?

    Best,
    Emiel

    #9801
    Florian Schwarz
    Moderator

    Hi Emiel,
    (Jeremy is traveling right now and may not be able to answer before a little while, so I’m jumping in though I may not be able to help as much.) Can you share your experiment’s demo-link so we can check out the code ourselves? (you can email to admin@pcibex.net if you don’t want to share it here.)
    Best,
    Florian

    #9813
    Jeremy
    Keymaster

    Hi Emiel,

    If you want to prevent the experiment from sending the results when the recordings fail to upload (even though the two things are separate, and as you found out results can still be saved even though recordings aren’t uploaded) then you can do something like this:

    Sequence(
        "init",
        sepWith("async", rshuffle("letter","picture")),
        "sync",
        "last"
    )
    
    UploadRecordings("sync")
    
    newTrial("last",
        newFunction("check upload", ()=>PennController.UploadRecordingsError)
            .test.is(undefined)
            .failure(
                newText("error", "There was a problem sending the recordings to the server. ")
                    .color("red")
                    .print()
                ,
                newButton().wait()
            )
    )

    The idea is you manually insert a synchronous UploadRecordings in your Sequence and check in the next trial whether PennController.UploadRecordingsError reports an error: if so, then you use newButton().wait() to prevent the trial from completing and proceeding to the end of the experiment (=sending the results)

    Jeremy

    #9838
    cslm
    Participant

    Thanks very much, Jeremy and Florian!

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