Creating a xAPI statement so it records a VAR value in a LRS?

I'm trying to figure out how create a xAPI SEND statement using javascript so I can record custom assessment values in an LRS.

I've looked at the multitude of discussions and links available (primarily Melissa Milloway's brilliant posts and videos here: )

but just cannot workout how to get the LRS record to display the VALUE of the score and not simply the name of the VAR I am using to track the score.

The javascript statement I am using is this:

send_statement('', 'scored', ''. '%B1_SCORE%', 'CMCP Foundation Assessment');

But the result is that the LRS literally writes "%B1_SCORE%"  not the value (I have also tried it without the % marks - and I'll get "B1_SCORE".

As you might suspect B1_SCORE is the VAR I have created in Storyline3 to track the B1 SCORE (and for testing I have set this to 80).

So is there is a simple way to create the statement I need so that the LRS records the value of the B1_SCORE (80) and not the name of the VAR?

I'm feeling seriously stupid asking this as although I'm not a programmer it is puzzling why I cannot work out why this is so hard to work out - or am I missing something key about how xAPI works?



4 Replies