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.
Are you allowing the user to resume the course? Are the slides also set to "resume saved state"? What type of variables (text, true/false, numeric) are you using? Is this only happening in HTML5 - what about the Flash version?
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.
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.
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!
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.
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'},
Thanks Kirsten - that file doesn't actually exist in 2.8 but the patch should work in 2.7 and lower versions :-)
We've fixed the issue this week and it should be included in the weekly build that will come out later this week for 2.7 and 2.8 (older versions are no longer supported for bug-fixes)
14 Replies
Hi Something,
Are you allowing the user to resume the course? Are the slides also set to "resume saved state"? What type of variables (text, true/false, numeric) are you using? Is this only happening in HTML5 - what about the Flash version?
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.
Thanks Dan for popping in here - it wasn't one I'd heard before so that's good to see.
yeah - it sounded familiar and I thought we had fixed it already!
I will upload what I am working with. It is pretty simple. In a meeting at present - will do shortly with answers to questions above.
Hi Something,
Since it looks like it's a Moodle issue - no need to answer my questions. You can upload the content on the Moodle tracker as Dan mentioned.
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!
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.
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
Thanks Kirsten for sharing your fix here.
Thanks Kirsten - that file doesn't actually exist in 2.8 but the patch should work in 2.7 and lower versions :-)
We've fixed the issue this week and it should be included in the weekly build that will come out later this week for 2.7 and 2.8 (older versions are no longer supported for bug-fixes)
That fix has now been included in the weekly build released this morning.
Thanks so much to you and the team!!!
Thanks for sharing the update Dan!
This discussion is closed. You can start a new discussion or contact Articulate Support.