Changes

Jump to navigation Jump to search
consistency, remove participant_counter2.php, announce new features
Line 23: Line 23:     
Use the participant counter to solve this. Just give the participant counter a nice unique name for our experiment and each time you call it, it will  
 
Use the participant counter to solve this. Just give the participant counter a nice unique name for our experiment and each time you call it, it will  
give you a new number. It has some additional features as well.
+
give you a new counter value. It has some additional features as well.
    
= just count =
 
= just count =
   # curl 'https://www.socsci.ru.nl/wilberth/nocms/radcloud/participant_counter.php?experiment=1'
+
   curl 'https://www.socsci.ru.nl/wilberth/nocms/radcloud/participant_counter.php?experiment=1'
   {"experiment":"1","counter":"0","timeout":""} # first counter value
+
   # {"experiment":"1","counter":"0","timeout":""} # first counter value
   # curl 'https://www.socsci.ru.nl/wilberth/nocms/radcloud/participant_counter.php?experiment=1'
+
   curl 'https://www.socsci.ru.nl/wilberth/nocms/radcloud/participant_counter.php?experiment=1'
   {"experiment":"1","counter":"1","timeout":""} # a new counter value
+
   # {"experiment":"1","counter":"1","timeout":""} # a new counter value
   # curl 'https://www.socsci.ru.nl/wilberth/nocms/radcloud/participant_counter.php?experiment=1'
+
   curl 'https://www.socsci.ru.nl/wilberth/nocms/radcloud/participant_counter.php?experiment=1'
   {"experiment":"1","counter":"2","timeout":""} # and yet another counter value
+
   # {"experiment":"1","counter":"2","timeout":""} # and yet another counter value
    
= count with timeout =
 
= count with timeout =
   # curl 'https://www.socsci.ru.nl/wilberth/nocms/radcloud/participant_counter.php?experiment=1&timeout=10'
+
   curl 'https://www.socsci.ru.nl/wilberth/nocms/radcloud/participant_counter.php?experiment=1&timeout=10'
   {"experiment":"1","counter":"3","timeout":"10"} # ppn is released after ten seconds
+
   # {"experiment":"1","counter":"3","timeout":"10"} # ppn is released after ten seconds
   # sleep 15
+
   sleep 15
   # curl 'https://www.socsci.ru.nl/wilberth/nocms/radcloud/participant_counter.php?experiment=1&timeout=10'
+
   curl 'https://www.socsci.ru.nl/wilberth/nocms/radcloud/participant_counter.php?experiment=1&timeout=10'
   {"experiment":"1","counter":"3","timeout":"10"} # we get the same counter value again
+
   # {"experiment":"1","counter":"3","timeout":"10"} # we get the same counter value again
    
==  finalizing counter at the end of an experiment ==
 
==  finalizing counter at the end of an experiment ==
 
=== experiment finished in time, finalizing successful ===
 
=== experiment finished in time, finalizing successful ===
   # curl 'https://www.socsci.ru.nl/wilberth/nocms/radcloud/participant_counter.php?experiment=1&timeout=10'
+
   curl 'https://www.socsci.ru.nl/wilberth/nocms/radcloud/participant_counter.php?experiment=1&timeout=10'
   {"experiment":"1","counter":"3","timeout":"10"}
+
   # {"experiment":"1","counter":"3","timeout":"10"}
   # curl 'https://www.socsci.ru.nl/wilberth/nocms/radcloud/participant_counter.php?experiment=1&counter=3'
+
   curl 'https://www.socsci.ru.nl/wilberth/nocms/radcloud/participant_counter.php?experiment=1&counter=3'
   {"experiment":"1","counter":"3","timeout":""} # counter value is finalized, no other participant will receive this value in the future
+
   # {"experiment":"1","counter":"3","timeout":""} # counter value is finalized, no other participant will receive this value in the future
    
=== experiment takes too long and finalizing fails ===
 
=== experiment takes too long and finalizing fails ===
   # curl 'https://www.socsci.ru.nl/wilberth/nocms/radcloud/participant_counter.php?experiment=1&timeout=10' # get counter value
+
   curl 'https://www.socsci.ru.nl/wilberth/nocms/radcloud/participant_counter.php?experiment=1&timeout=10' # get counter value
   {"experiment":"1","counter":"3","timeout":"10"}
+
   # {"experiment":"1","counter":"3","timeout":"10"}
   # sleep 15 # wait too long
+
   sleep 15 # wait too long
 
   curl 'https://www.socsci.ru.nl/wilberth/nocms/radcloud/participant_counter.php?experiment=1&counter=3' # attempt to finalize counter
 
   curl 'https://www.socsci.ru.nl/wilberth/nocms/radcloud/participant_counter.php?experiment=1&counter=3' # attempt to finalize counter
   {"experiment":"1","counter":"","timeout":""} # attempt fails, your were late (counter is not returned)
+
   # {"experiment":"1","counter":"","timeout":""} # attempt fails, your were late (counter is not returned)
    
= Automatic forwarding to experiment =
 
= Automatic forwarding to experiment =
''This feature only works in the experimental version participant_counter2.php''
  −
   
You need not read the result as JSON. In order to get a 302 temprary redirect to https://www.nu.nl/?experiment=1&counter=8&timeout=10 use:
 
You need not read the result as JSON. In order to get a 302 temprary redirect to https://www.nu.nl/?experiment=1&counter=8&timeout=10 use:
   −
   https://www.socsci.ru.nl/wilberth/nocms/radcloud/participant_counter2.php?experiment=1&timeout=10&url=http://www.nu.nl
+
   firefox https://www.socsci.ru.nl/wilberth/nocms/radcloud/participant_counter.php?experiment=1&timeout=10&url=http://www.nu.nl
    
All the other features work in combination with the ''url'' parameter as well.
 
All the other features work in combination with the ''url'' parameter as well.
    
= Adding a participant identifier from the panel system =
 
= Adding a participant identifier from the panel system =
''This feature only works in the experimental version participant_counter2.php''
+
You can add the participant value that you received from the panel system. This way, if the participant returns to your page (or for instances presses F5) he will receive the same counter value and hence the same version of the experiment.
   −
You can add the participant value that you received from the panel system. This way, if the participant returns (for instances presses f5) he will receive the same counter value and hence the same version of the experiment.
+
curl 'https://www.socsci.ru.nl/wilberth/nocms/radcloud/participant_counter.php?experiment=1&participant=john'
 +
# {"experiment":"1","counter":"0","timeout":"","participant:"john"} # first counter value
 +
curl 'https://www.socsci.ru.nl/wilberth/nocms/radcloud/participant_counter.php?experiment=1&participant=john'
 +
# {"experiment":"1","counter":"0","timeout":"","participant:"john"} # The same counter value that john received last time.
   −
# curl 'https://www.socsci.ru.nl/wilberth/nocms/radcloud/participant_counter.php?experiment=1&participant=john'
+
If you combine a ''participant'' value with a ''timeout'', the ''timeout'' will be reset to the new value, giving the participant more time to complete the experiment. Setting timeout on a finalized experiment will not result in an error, but will not reset the ''timeout'' value.
{"experiment":"1","counter":"0","timeout":"","participant:"john"} # first counter value
  −
# curl 'https://www.socsci.ru.nl/wilberth/nocms/radcloud/participant_counter.php?experiment=1&participant=john'
  −
{"experiment":"1","counter":"0","timeout":"","participant:"john"} # The same counter value that john received last time.
     −
If you combine a ''participant'' value with a ''timeout'', the ''timeout'' will be reset to the new value, giving the participant more time to complete the experiment. Setting timeout on a finalized experiment will not result in an error, but will not reset the ''timeout'' value.
+
= Maximum counter value =
 +
''This feature has not yet been implemented''
 +
= Set of counter values =
 +
''This feature has not yet been implemented''
 +
= Random order of counter values =
 +
''This feature has not yet been implemented''

Navigation menu