Tracking individual responses

For issues related to delivery of content to end-learners e.g. LMS tracking via SCORM and delivery of content offline.

Moderator: Nav

Tracking individual responses

Postby Nav » Thu Sep 02, 2010 3:00 pm

Sometimes you might want to track what a learner has chosen or entered for each question. Using SCORM you can capture this information in the LMS. How that information is reported is entirely up to the LMS, but we'll be covering how it's set up on the SmartBuilder side to send that info.

Due to a semi-recent enhancement, and provided you're using SCORM version 2004, it's easier than ever! All you need to do is use the SCORM / AICC > setInteractionResponse method, and give the interaction an ID and a Value. The ID would be the question number or the question text, and the Value you would pass along what the learner answered, probably gathered from a Radio Button or an Input Text object.

2010-09-02_1221.png (33.81 KiB) Viewed 13471 times

Let's say you have a quiz and you want to collect the data from Question 1 (Q1), a multiple-choice question, and Question 2 (Q2), a fill-in-the-blank question. This is what such an action might look like -

Trigger: Question Set > Q1 > Submit button > onClick
Response: SCORM / AICC > setInteractionResponse > id = "question1" ; value = Function > Question Set > Q1 > RB answers > getSelection

Trigger: Question Set > Q2 > Submit button > onClick
Response: SCORM / AICC > setInteractionResponse > id = "question2" ; value = Function > Question Set > Q1 > Input text > getText

Also, if you want to get really fancy, you can pass more human readable information than just the selection index of a radio button as the answer, and get the full text of the question being asked.

Trigger: Question Set > Q1 > Submit button > onClick
Response: SCORM / AICC > setInteractionResponse > id = Function > Question Set > Q1 > Question text > getText; value = Function > Question Set > Q1 > RB answers > getOptionText > Function > Question Set > Q1 > RB answers > getSelection

Note that we will be adding a getSelectionText method within the next few months, so this solution will become a little simpler.

Also note that this is possible using SCORM 1.2, but it's a little more complicated and done differently. If anyone asks, I can show how that is done.
Posts: 866
Joined: Mon Nov 05, 2007 2:58 pm

Re: Tracking individual responses

Postby Nav » Thu Sep 16, 2010 4:06 pm

Updated 2013/02/07.

Well, someone asked about how to do this in SCORM v1.2, so here's the general idea. Note that it will be a manual process that is more prone to user error than it would be in SCORM v2004.

A Bit of Background

For both SCORM 2004 and SCORM 1.2, three pieces of data need to be sent for each interaction. They are:

  • ID - this is the the human readable component to identify the question. Damian, this is the one that you want. You can call it "question1", "pretestQ1", "PREtest1", "POSTtest10", "What is 2 plus 2", or whatever you want. I would avoid punctuation in this field, and even spaces sometimes cause issues (maybe dependent on the LMS? I have never bothered to find out, and stick with short IDs).
  • Type - this will always be "fill-in". It basically lets the LMS know what kind of data to store for the answer. "fill-in" is the most flexible.
  • student_response - this is what the student answered. You'll usually get this value from the Radio Button, Input Text object, or however you are collecting the student's response

In addition to this, each interaction has an index number. It always starts at zero and counts up. So each one starts off with = something, where # is the index of the interaction, call is the call that is being sent, and something is the data you're trying to record. So to record that the user answered "A" to "question5", you'd have to send several pieces of information. = "question5"
cmi.interactions.4.type = "fill-in"
cmi.interactions.4.student_response = "A"

This is the what is happening on the back end for both SCORM 2004 and SCORM 1.2.

Now, when you use SCORM 2004, we automate as much of this for you as we can. All you have to specify is the ID and the student_response, and we handle the rest. We find out how many interactions have already been recorded, and make sure that index number (4 in the example above) is the next one in the list, and if you try to overwrite one (say you allow the student to go back and change their answer), we handle that as well. We also automatically send "fill-in" for the type.

If you use SCORM 1.2, you have to do this all manually*. I recommend that you send the first two calls as soon as the page loads. You don't have to, but it kind of gets that stuff out of the way. But this is where you declare what the human-readable name associated with this interaction is called (the ID).

* Why do you have to do this manually? Because SCORM 1.2 doesn't allow the Lesson to read back what has already been recorded. Without that ability, we're unable to automate anything for you, and you have to micromanage this tedious process. Use SCORM 2004 if you can!

On To the Example

Please see the example lesson that we have in the Shared Library > SmartBuilder Examples folder, called "SCORM Interactions Example (v1.2 only)". You can always Save a Copy of our examples. In the lesson, you'll see an action that looks like the following:

2010-09-16_1513.png (9.47 KiB) Viewed 13467 times

Basically, you need to always send that name/value pair to the LMS using the SCORM / AICC > LMSSetValue response. However, you have to manage the number in the big-long-name section. In example in the screengrab the number is 3, and you'll need to pick a unique one for each value that you intend to send. As for the value, you'll probably want to pass along some sort of learner input. In this case, it's the text from an Input Text object, but it could also be the selection from a Radio Button, Check Box group, Drop Down List, etc...

Note that before you do that, you also have to initialize each "slot" in the LMS with that first action in the Action List. You'll need one response for each answer, but note also that the list must start at 0. If you use SCORM 2004, all of this is automated by SmartBuilder, and you can just set a name/value, such as "answer1" = "B". You may want to inquire about or test this. I have heard of LMSs allowing v2004 calls even if they don't claim to be fully compliant. You can use the example lessons in the SmartBuilder Examples folder as tests if you'd like.

Typically what I do is declare all the values at the beginning of the lesson, or when the quiz starts.

Trigger: Page Controller > onPageLoad
Response: SCORM/AICC > LMSSetValue > name( ; value(question1) // Call the first interaction "question1". I don't think you can use spaces or punctuation, but LMSs may vary.
Response: SCORM/AICC > LMSSetValue > name(cmi.interactions.0.type) ; value(fill-in) // Set the type to "fill-in". This needs to be done so you can store whatever you want as the student response later (numbers, text, long answer).
Response: SCORM/AICC > LMSSetValue > name( ; value(question2) // Repeat for each of them.
Response: SCORM/AICC > LMSSetValue > name(cmi.interactions.1.type) ; value(fill-in)
Response: SCORM/AICC > LMSSetValue > name( ; value(question3)
Response: SCORM/AICC > LMSSetValue > name(cmi.interactions.2.type) ; value(fill-in)
Response: SCORM/AICC > LMSSetValue > name( ; value(question4)
Response: SCORM/AICC > LMSSetValue > name(cmi.interactions.3.type) ; value(fill-in)

Then, when you get to a particular question, you set up the action to send the student's response (you'll create one action for each response).

Trigger: Submit 4 > onClick (or Question Set > onComplete - whatever makes more sense for your lesson)
Response: SCORM/AICC > LMSSetValue > name(cmi.interactions.3.student_response) ; value(Function > Question Set > Question 4 > Input Text > getValue)

Again, check out the example first, it will help. Let me know if anyone has any questions.

- Nav
Posts: 866
Joined: Mon Nov 05, 2007 2:58 pm

Re: Tracking individual responses

Postby Nav » Mon Oct 04, 2010 3:59 pm

If you are not using an LMS, then you can use the Server Communication object. However, you need a server with it to communicate with. Flash and SmartBuilder cannot send emails or communicate with a database directly.

There has to be a server-side script that SmartBuilder can communicate with, which will then store that data in a database, and/or email the information to a manager.

Usually the hardest part is getting someone that knows php or another similar language to write the scerver-side script, and set up the communication to the database. Once that is working properly, setting up the actions in SmartBuilder are no harder than the instructions on the forum post, though they are a little different. Here are two posts on the forum on how to do this:

The LMS way is usually easier overall, but if you know how to program in php, or can get someone to do it and set up a database for you, then this is certainly a possibility.

Another option might be to use Google Analytics, but this is better for seeing trends, not so much what each person answered.

- Nav
Posts: 866
Joined: Mon Nov 05, 2007 2:58 pm

Return to Delivery (LMS Tracking / SCORM / Offline Delivery)

Who is online

Users browsing this forum: No registered users and 1 guest

Not able to open ./cache/data_global.php