Getting Storyline variables out of an LMS

Jun 16, 2015

I'm working on a collection of courses where I believe it would be helpful to use variables that the user assigned values to in one course so the contents of those variables could be re-used in subsequent courses in the curriculum. Think of these courses as an extended case study.

Obviously, the easiest thing to do would be make it all one long course, but the organization I work for will want to confirm that specific courses have been completed as learners make their way through the curriculum.

Currently, I'm working in Storyline 1, but am pushing the business to get me the update to Storyline 2.

I discovered that I can write a collection of variables to an LMS by making that collection of variables emulate a quiz (http://www.articulate.com/support/storyline/reporting-storyline-variables-to-an-lms). Great, I thought. I can extract my variables, but how can I, once I have them in the LMS, absorb them into the next course?

We use Ancile for our LMS if that helps you shape your response.

Thanks in advance!

14 Replies
Steve Flowers

Hey Chris -

No can do with SCORM content. The problem is SCORM is sandboxed by design. Each module launches and contains the data model specific to that course. You can't really communicate between SCO's.

There might be other ways to do this. The Experience API (xAPI), AKA Tin Can API is built to allow this type of communication. You'd need to custom build your queries for that.

Another option is using LMS functions. On our LMS, for example, you can feed data into custom fields. This data could be extracted and updated by a course. It's fragile and not what this feature was built for.

Lastly, you could use a custom built web service to send the userID and course series to an external database and retrieve the stored values from within other SCO's.

Andrew Downes

I'm actually working on a blog that describes how to do just this (not specific to Storyline, but for any authoring tool with execute javascript and advanced actions). This blog will be published on tincanapi.com once it's ready. 

Note that this particular blog uses Tin Can's Statement API and is designed for a scenario where you want a user's actions in one course to effect another. For things like settings and preferences, the State API would be more appropriate. 

I also very much recommend upgrading to Storyline 2 (and the latest update) if you'll be using Tin Can.

Here's an extract from the work in progress blog. I hope it's helpful:

Incorporating TinCanJS

In order to send or retrieve any Tin Can data, you’ll need to include TinCanJS in your published packages. You can download the latest version of TinCanJS from Github and drop tincan-min.js from the build folder into the publish package. You’ll also need to link to TinCanJS from the published html file (this might be called something like index.html or story.html) by adding the following code:

<script src ="tincan-min.js"></script>

With TinCanJS included, you’re now ready to send and receive statements.

Sending Statements from Course 1

Within the first course, you’ll need to use your authoring tool’s actions features to trigger some JavaScript at the point you want to send the statement. Actions features for different authoring tools work in different ways, so see your authoring tool vendor if you need help with this part.

You’ll then use code that looks a bit like this:

var tincan = new TinCan ({url: window.location.href});
tincan.sendStatement(
   {
       verb: {
           id: "http://example.com/verbs/some-verb"
       },
       object: {
           id: "http://your-organizations.website/tincanapi/activities/unique-id-for-action"
       }
   }
);

This code sets up TinCanJS to get it’s LRS and learner details from the query string passed to your e-learning content when it’s launch from your LMS or TDS. This will be the same data used by the authoring tool to send its own default Tin Can statements.

Next, it sends a Tin Can statement to the LRS, with the current learner as the actor. The statement is very basic for the purposes of the example and as a minimum you’ll want to replace the verb and object ids. Each action you track (e.g. clicking a button) should have a unique object id. See our blog series on statements for more on how to craft statements.

Retrieving Statements in Course 2

With the statements stored in the LRS, we now need to get the data into the second e-learning course. In this case we just want to know ‘Does a statement matching a certain verb and object and the currently learner exist in the LRS?’ or to put it another way, ‘did the learner do the thing?’.

Again, use your authoring tool’s actions features to trigger some JavaScript:

var tincan = new TinCan ({url: window.location.href});
var statementFound = false;
var result = tincan.getStatements({
   sendActor: true,
   params: {
       verb: {
           id: "http://example.com/verbs/some-verb"
       },
       activity: {
           id: "http://your-organizations.website/tincanapi/activities/unique-id-for-action"
       }
   },
   callback: function (err, result) {
       if (result.statements.length > 0) {
           statementFound = true;
  //Insert authoring tool specific code here.
       }
   }
});


The code here fetches matching statements from the LRS and, when it gets the data back, counts those statements. If there’s 1 or more statement returned, it sets the variable statementFound to true.

From here, you’ll need to trigger an action in your authoring tool if statementFound is true. Again, the specifics of how to achieve this will vary from authoring tool to authoring tool, so discuss this with your authoring tool vendor. In most authoring tools you’ll use the JavaScript to change a variable within the authoring tool and then adapt the learner’s experience based on the value of that variable.

 

Chris Wall

Wow!!! That's awesome!! Thanks Andrew!

That's exactly what my goal is: I have a sales scenario set up where, based on the learner's actions, questions, and responses to questions from a prospect, the learner gets more or less information from the virtual prospect. Sprinkled throughout I'll have a series of more direct training interactions.

This scenario is part, obviously, of a sales curriculum, and I'll have live classroom interactions that the eLearning reinforces, supports, or lays the foundation for.

Andrew Downes

That sounds great Chris. I'd love to see the end product. Feel free to mail me at andrew.downes@tincanapi.com if you have anything you're willing to share but don't want to publish publicly. 

Maybe this is a phase 2, but have you also considered tracking the live classroom interactions with Tin Can and feeding that into the online simulation too (or vice versa)? 

Steve Flowers

Good info, Russ. It's worth trying. This could take a bit of trial and error and detective work and could end up not working at all:( Most LMS I've used implemented SCORM 2004 data elements a little bit differently based on interpretation. Goes back to the way the spec was written. This bit seems to indicate "you can do it, but how you do it is up to you."

"However, it does not specify how to manage sets of Objective Progress Information or how resolution of local and shared global objective IDs is performed. "

Rustici has an example here that might be worth tearing into if you'd like to see one way to implement Global objectives. This also provides a pretty good way to see if your LMS will choke on it or deliver the goods.

 

 

 

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