PennController for IBEX › Forums › Support › Automatic credit granting, and group assignment › Reply To: Automatic credit granting, and group assignment

Hi Jeremy, I just tested it out as a fake participant and the Participant ID part of the redirect URL works.
However, the redirect link did not contain the set variables for experiment_id and credit_token, for some reason. They were just blank. I am not sure why the variables were not populated in the redirect link?
Example of the generated redirect link (with missing experiment ID and credit token value): https://ucdavis.sona-systems.com/webstudy_credit.aspx?experiment_id=&credit_token=&survey_code=12345
Is there a particular place where I should paste the check value / set variable code ? I had pasted it right after PennController.ResetPrefix(null);
This is the code I am working on (using real values for experimentID and credittoken):
PennController.ResetPrefix(null);
experimentID = "";
switch (GetURLParameter("withsquare")) {
case 0:
experimentID = "blah1";
break;
case 1:
experimentID = "blah2";
break;
case 2:
experimentID = "blah3";
break;
case 3:
experimentID = "blah4";
break;
}
credittoken = "";
switch (GetURLParameter("withsquare")) {
case 0:
credittoken = "hellothere";
break;
case 1:
credittoken = "byenow";
break;
case 2:
credittoken = "salutsalut";
break;
case 3:
credittoken = "bonbahaplus";
break;
}
// ...
newText('<p><a href="https://ucdavis.sona-systems.com/webstudy_credit.aspx?experiment_id='+experimentID+'&credit_token='+credittoken+'&survey_code='+PennController.GetURLParameter('id')+'">Click here to confirm my submission on SONA</a>.</p>')
-
This reply was modified 4 years, 10 months ago by
suphasiree.
-
This reply was modified 4 years, 10 months ago by
suphasiree.