Saving state data with SCORM, to Moodle

194 views
Skip to first unread message

Jonathan Hart

unread,
Jul 15, 2018, 1:56:59 PM7/15/18
to eLearning Technology and Development
Hi,

I'm building a framework for my organisations Captivate SCORM packages in javascript, which adds per slide timings, among some other things we needed.

I am figuring out a way to save current state, so when the user drops back into the tutorial, the timers start where they left off. It works pretty well and I have the timer data, (comprising an array and an object) saving to local browser storage and being passed back in if they don't finish a tutorial.

I'm looking to see if it's possible to get it working via the SCORM (2004) api.

I know that scorm packages on moodle can work out which slide to go back to if unfinished, which is great, but I need to bring back in that time state data from somewhere.

I've found the communication via scorm calls to be a bit spotty and hard to debug. The way I've thought of doing it is to use the 'cmi.comments_from_learner.0.comment' field to save a stringified text to, and pass back in.

Obviously if I could get it to work I'd have to update that db quite often, maybe every five seconds or so.

Just wondering if it's worth trying or if I'm better using an external database to save this data.

-
Jon

Philip Hutchison

unread,
Jul 15, 2018, 2:07:56 PM7/15/18
to elearning-technolo...@googlegroups.com
Hi Jon

For per-slide state data, you should probably use cmi.interactions. Each cmi.interaction object has data fields for these types of data, for example you could probably use cmi.interactions.0.timestamp. Most folks will shoehorn the data into suspend_data, which could work, but it has limited space, and is already being used by Captivate.

Info about the cmi.interactions fields can be found here: https://scorm.com/scorm-explained/technical-scorm/run-time/run-time-reference/

Good luck
- philip



 

--
You received this message because you are subscribed to the Google Groups "eLearning Technology and Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elearning-technology-and-development+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/elearning-technology-and-development.
To view this discussion on the web visit https://groups.google.com/d/msgid/elearning-technology-and-development/d215d063-9add-47a0-8b96-947ab700b37c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ryan Meyer

unread,
Jul 15, 2018, 5:30:52 PM7/15/18
to elearning-technolo...@googlegroups.com
Updating every 5 seconds or so shouldn’t really be an issue, as long as you don’t Commit. That way the data will (most likely) be stored in the local JavaScript data and only sent up to the server when Captivate commits. I believe this only happens on course close rather than per slide, but it’s been a bit since I’ve dove into the guts.
Regardless, relying on Captivate’s built-in commit timing should be sufficient, since that’s what handles other important state data.
One other option would be to use a built-in Captivate variable. That way you don’t have to worry about SCORM interaction at all; you can let Captivate handle it all for you.
-Ryan 
To unsubscribe from this group and stop receiving emails from it, send an email to elearning-technology-and...@googlegroups.com.

Jonathan Hart

unread,
Jul 15, 2018, 5:43:54 PM7/15/18
to eLearning Technology and Development
If I use a captivate variable I can't persist data though, if I understand you correctly? I can persist data through localstorage, but that's limited to the local machine used (our students sometimes won't get the exact same laptop).

I'm still new to scorm and my experiments with the api are very raw- when and where to commit when i'm accessing it directly is still not clear to me. I've tested a few calls in my scripts and have passed in an array as a string to the comments field, set to complete, set raw score etc. Is there a right order to the calls?

-
Jon

Ryan Meyer

unread,
Jul 15, 2018, 7:59:08 PM7/15/18
to elearning-technolo...@googlegroups.com
I believe user-defined Captivate variables are persisted. This page shows how you define them:
https://helpx.adobe.com/captivate/using/create-user-defined-variable.html

And this page shows how you can get/set them in JavaScript:

You can display the variable in your Captivate page by adding a text field and setting the value to $$yourVarName$$

There’s not a lot of required order in SCORM calls. Initialize needs to come first. Then any combination of Gets/Sets/Commits. And ending with a Finish. There could be some trickiness trying to integrate with Captivate’s SCORM calls, since it has its own process and data model values it uses. Relying on their built-in support for user-defined variables should abstract that all away for you. Unless you want to dig in and get more comfortable with SCORM and Captivate’s JS, it might be the path of least resistance.

Hope that helps!
-Ryan 

Sent from my iPhone
To unsubscribe from this group and stop receiving emails from it, send an email to elearning-technology-and...@googlegroups.com.

Philip Hutchison

unread,
Jul 15, 2018, 8:31:18 PM7/15/18
to elearning-technolo...@googlegroups.com
I agree with Ryan, just be aware Captivate tries to persist data via suspend_data, which does not have unlimited space. Be as concise with your variable values as you can. 


Jon

To unsubscribe from this group and stop receiving emails from it, send an email to elearning-technology-and...@googlegroups.com.
Visit this group at https://groups.google.com/group/elearning-technology-and-development.

--
You received this message because you are subscribed to the Google Groups "eLearning Technology and Development" group.

--
You received this message because you are subscribed to the Google Groups "eLearning Technology and Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elearning-technology-and...@googlegroups.com.
Visit this group at https://groups.google.com/group/elearning-technology-and-development.
To view this discussion on the web visit https://groups.google.com/d/msgid/elearning-technology-and-development/bfec1db5-7d80-4b35-922a-08e9425c8c2e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "eLearning Technology and Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elearning-technology-and...@googlegroups.com.
Visit this group at https://groups.google.com/group/elearning-technology-and-development.

Jonathan Hart

unread,
Jul 16, 2018, 1:25:11 AM7/16/18
to eLearning Technology and Development
Interesting, thanks for the info guys!
Jon

To unsubscribe from this group and stop receiving emails from it, send an email to elearning-technology-and-development+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "eLearning Technology and Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elearning-technology-and-development+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "eLearning Technology and Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elearning-technology-and-development+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "eLearning Technology and Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elearning-technology-and-development+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages