SCORM 1.2 set and get student language preferences not persisting in LMS

Feb 25, 2015

My module has radio buttons where the user can select their language for the module.  I am calling SetLanguagePreference on a selection trigger for each of the radio buttons, and calling GetLanguagePreference when the user clicks on a button on the same screen.  The preference stays there for duration of that attempt.  However, the preference is not persisting in the LMS on a second attempt at the module.  I have even tried calling Commit immediately after the selection.  Additionally, I change the manifest so that it defaults to the HTML5 version of the course.

The LMS is Moodle 2.7, and I have Storyline variables set up to hold the values.

14 Replies
Dan Marsden

Hi there, 

Unfortunately this is a bug in Moodle - we did have an open bug that mentioned this as a problem but the bug got hijacked to fix something else that was related but we never actually fixed this sorry.

I've just created a new Moodle tracker issue to fix it:
https://tracker.moodle.org/browse/MDL-49303

It's an easy fix to make in the code, but to get the fix into core we need a SCORM package for the QA team to verify the fix. Any chance you could create a really simple SCORM package that allowed the language to be set and displayed a simple page and on re-entry displayed the right language without needing to set it again? If you could do that and add it to the Tracker issue above I'll try to put together a fix asap.

Ingrid Henkel

I will upload to Moodle tracker - both the package and the source file.  

As an aside, since Flash is pretty much dead (I am a former AS3 developer *sniff*) is there any way to get a checkbox in the publishing dialogue that lets you publish just HTML5 content?  That way, I don't have to debug both Flash and HTML5 AND edit the imsmanifest file to default to HTML5.  If there is already a way to do this, I must have missed it.  Thanks!

Ashley Terwilliger-Pollard

Hi Something,

We don't have any option to publish just for HTML5, although you're welcome to share your thoughts in the form of a feature request here. I'm not sure about the edits you've made in your imsmanifest file, but you could also look at pointing directly to the story_html5.html file to ensure it's going directly to the HTML5 content and then you'll just want to make sure your users are accessing the course through a supported HTML5 browser. 

Kirsten Marx

Hi Something

We were working on something similar and ended up fixing the problem in Moodle as well. The file to be fixed is: mod/scorm/datamodels/scorm_12.js.php

The line of code that needs fixing is below with the fix in bold:
'cmi.student_preference.language':{'defaultvalue':'<?php echo $userdata->language ?>', 'mod':'rw', 'writeerror':'405'},

This fix works in Moodle 2.7 and Moodle 2.8

You can see our demo our blog: http://ilite.wordpress.com

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