Pass Score and other test variables to PHP page

Apr 25, 2015

Originally I was attempting to send the same var that are sent to the report.html (canned report) to a similar page called report.php. passing variables required moving them to a new field and passing the field content, as well as creating a custon javascript trigger and naming all the fields.

Found a simple solution but looking for a way to move it to the user.js file for a more object oriented approach.

currently the story.js file directs the print page to report.html, by simply changing the default location in the javascript to report.php works fine and passes the necessary variables.

I would like to move this function to the user.js file to override the default behavior to my .php file - I know this is more of a javascript question, but I'm also looking for other approaches to transfer var to php. there are hundreds of responses but they all seem to require what seem to be way more steps that this?

 function onBWEventInterval()
...

case "BW_PrintResults":
g_oPrintOptions.bShowUserScore = (arrArgs[0] == "true");
g_oPrintOptions.bShowPassingScore = (arrArgs[1] == "true");
g_oPrintOptions.bShowShowPassFail = (arrArgs[2] == "true");
g_oPrintOptions.bShowQuizReview = (arrArgs[3] == "true");
g_oPrintOptions.strName = arrArgs[4];
g_oPrintOptions.strMainQuizId = arrArgs[5];
g_oPrintOptions.arrQuizzes = arrArgs[6].split(",");

window.open(GetBasePath() + g_strContentFolder + "/report.php", "Reports")
break;
1 Reply

This discussion is closed. You can start a new discussion or contact Articulate Support.