paco
paco copied to clipboard
web ui: respond to end of day
Create an experiment with two groups, grp1, grp2. Do not set any action triggers. Make grp2 refer to grp1 as an eod group. Join experiment respond for group 1 on phone or web On web, click respond on experiment choose grp 2 from group picker Notice no daily events message. this is ok, there will be another bug to show events when there is no timeout specified. refresh the page. it only shows respond button, no message, it should render in the present state (group 2) chosen which would include the message that there are no events.
If no more events in referred experiment
I could use a little guidance for how to correctly process eod events. The current code does the following to compute the cutoff time:
var timeout = $scope.eodGroup.actionTriggers[0].actions[0].timeout * 60 * 1000; // in millis
var now = new Date().getTime();
var cutoffDateTimeMs = now - timeout;
I wrote this a while ago (stole it from web/eod/eod.js) and now I'm pretty sure it's wrong and should refer to $scope.referredGroup instead of eodGroup. I'm trying this instead and it's not working. It seems a little strange to refer to just the first actionTrigger. Could we simplify it to say the eod is valid before the end of the day (midnight) on the same day as the referred event?