magpie-ea / magpie-modules

the reusable front-end bits in the _magpie modules
MIT License
7 stars 1 forks source link

Include check of DB address and server app status #2

Closed x-ji closed 5 years ago

x-ji commented 5 years ago

See https://github.com/babe-project/BABE/issues/32

When posting experiments online, it CAN happen that the URL for data submission is incorrect. It might even happen that the server app is currently unresponsive (the server down, etc.).

It would be good to check whether everything is setup correctly and working BEFORE participants start working on the experiment. Else, in case of a malfunction or mistake, participants' work is lost, generating extra overhead (time: apologies, setting up reimbursement HITs, rerunning experiment; cost: paying reimbursement HITs).

Ideally, in case of malfunction or mistake, the participants would immediately be told that there was an error (with an alert pop-up or an altert page) from which they cannot proceed. They would be told to return the HIT and contact the email supplied in 'config_deploy.js'. If possible, an automated email would also be good.

This pre-check should be made for any submission method except 'debugMode'. (Not sure about 'localServer'?)

I'll provide an API endpoint on the server side for the client to check whether the experiment with the indicated ID exists. I'll also try to add the check on the frontend afterwards.

x-ji commented 5 years ago

@stelaseldano Could you add me (at hi@xiangji.me) and perhaps also Michael as collaborators of the npm package? This way we can all publish updates of the package. I think it should be possible without having to create a central account.