Concatenation, Javascript, and general bafflement :)
Sep 04, 2012
Hi!
I'm new to storyline and have been furiously googling to put together a quiz. At this point, it's a bit of a monster, with ~ 30 user defined variables that need to be sent back to the LMS. There are ways to send individual variables to a short answer slide, which then could be reported to the LMS server, but I would rather not make 30 short answer slides.
My current plan is to concatenate my variables into a single text string in javascript, with that single text string reported to a LMS. I'm basing this setup on several user discussions, including the following:
http://www.articulate.com/support/kb_article.php?product=st1&id=llwes8cn32vg
http://community.articulate.com/forums/p/12464/74682.aspx
http://www.articulate.com/support/kb_article.php?product=st1&id=7la24ugs1lcn
(if I missed your discussion, please let me know )
I've attached a copy of two question sets in the attached file. I decided to make my question slides, with variables indicating the first answer choice (A03Local, A06Map) and the number of tries (A03Interact, A06Interact). Ideally, I want this to be concatenated in a single variable (final) which is then fired off to the LMS under the radar. I'm kinda baffled at this point :)
Thanks!
2 Replies
Hi, Jane -
What SCORM data are you looking to use to catch the variable? Are you looking to send this back within a single interaction variable?
Steve
Hi -
When I first started using storyline, it made sense to make my own question slides with user defined variables - and storyline was powerful enough to let me initially get away with it I didn't want a visible focus on quiz elements (submit, correct, incorrect) on the user side, but I did want to track the initial answer and the number of tries to get the correct answer. Unfortunately, I'm just past the halfway point of my 30 day trial - I'm not sure if I have time to rewrite all the slides...
As you said, I'm trying to send all my user defined variables in a single interaction. I've had some trouble running past examples of storyline with javascript (ie did_it.story @ http://community.articulate.com/forums/p/12464/74682.aspx) on my computer, so I'm wondering if it's a broader problem or my programming specifically. I also haven't plugged this into a SCORM yet - I'll be using blackboard, but may test drive it in articulate online.
The javascript that I'm using reads as follows:
var player = GetPlayer();
var a= player.GetVar("A03Interact");
var b= player.GetVar("A03Local");
var c = player.GetVar("A06Interact");
var d = player.GetVar("A06Map");
var e = "Question A03 answer: " + b + "~Question A03 tries: " + a + "~Question A06 answer: " + d + "~Question A06 tries: " + c;
player.SetVar("final",e);
Thanks! JJ
This discussion is closed. You can start a new discussion or contact Articulate Support.