uploadRecordingsError not working?

PennController for IBEX Forums Support uploadRecordingsError not working?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #6267
    masato
    Participant

    Hi!

    I am posting this because I wasn’t able to find a relevant existing post but sorry if there actually is!

    I am trying to do a production experiment and want to make it so that participants can download the recordings and send it to us when there was a problem in the uploading process. I adopted the script in PennController.DownloadRecordingButton page in the documentation, but received the following error:

    Unknown global PennController command: ‘uploadRecordingsError’ (PennController: 1)

    The download button appears, but the message is different from the one defined in the script. I actually need to edit the message because my participants may not speak English.

    I also tried the testing script in the same page of the documentation but it also failed, and the error message did not follow the script. Could you let me know how to solve this issue?

    Thank you so much!

    Masato

    #6270
    Jeremy
    Keymaster

    Hi Masato,

    Recent versions of PennController automatically insert a page inviting to download an archive containing the MediaRecorder samples in case the upload failed. It could explain why the message you see is different from what you expect; it also makes the use of DownloadRecordingButton redundant in this case

    As with other texts in PennController, I have not yet implemented a standard method to edit the messages printed on that page, so you’ll need to use this hack:

    const replaceUploadingErrorMessage = ()=>{
        const uploadingErrorMessage = $(".PennController-PennController p:nth-child(2)");
        if (uploadingErrorMessage.length > 0 && uploadingErrorMessage[0].innerHTML.match(/^There was an error uploading the recordings:/))
            uploadingErrorMessage.html("Une erreur s'est produite lors du transfert :")
                .siblings(".Message-continue-link").html("Cliquez ici pour télécharger l'archive de vos enregistrements et les envoyer manuellement.");
        else
            window.requestAnimationFrame( replaceUploadingErrorMessage );
    };
    replaceUploadingErrorMessage();

    Let me know if you have questions

    Jeremy

    #6273
    masato
    Participant

    Hi Jeremy,

    Thank you so much for your help! This does what I wanted to do!
    Just one small thing: I guess $gt; here is actually >, right?

    Masato

    #6275
    Jeremy
    Keymaster

    Hi Masato,

    You’re right, of course. I edited my message, it should now display > instead of $gt;

    Jeremy

    #6278
    masato
    Participant

    Cool! Thank you again for your help!

    Masato

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