Forum Discussion
Can I use a Rise Javascript block to send a custom bookmark location to the LMS?
I would like to do a Rise course with 4 separate paths, ending in a Storyline block which sets course completion.
I would use a Button Stack Block to send them down one of the four paths, which would each terminate in a Button Block that would send them to the end location with the Storyline course completion block.
So far, so good. BUT!
The client would like to track which path they chose, and I am hoping to use the "Javascript block" to send a custom bookmark to be recorded in the LMS when they enter the path via something like ("cmi.location", currentLocation).
Is this possible? The course would be output in SCORM 2004. Is it possible to send a message to the LMS out of a Rise javascript block?
***
The other way I could think of doing it would be to have a quiz question at the end of each path, the wording of which would indicate which path they chose; however I would be tracking on the Storyline block, not on quiz completion, so I don't know if the quiz info would get recorded.
Any help greatly appreciated!
3 Replies
- AnnikaDellertCommunity Member
Hi there! I'm curious to ask if you made any progress on this since you posted or if you reached out to Articulate support?
We publish to xAPI, and while I know the ability to report on xAPI data out of Rise is very limited, your post got me thinking if something like this is possible.
- MarkLentzCommunity Member
Well, the only possible way I found to do it was out of a Storyline Block -- someone in this forum worked out code to do it in SCORM 1.2; I wasn't able to find equivalent code to make it work in SCORM 2004 v3 which is what my clients use. If I ever do find a solution I'll post it here.
- SamHillSuper Hero
Hi there, you will need to avoid the cmi.location field as this is used by Rise to store the users current location in the project. If you change it to store your value, it will result in a 404 error when they next attempt to launch the content from the LMS.
What you can do is use something called cmi.interactions if your LMS supports them (most do). I've put together some JavaScript that you can insert as a code block where you want to write the chosen path to the LMS.
I'm using a multiple choice interaction type.
The two variables, DESCRIPTION and PATH, at the top should be edited by you to 1) provide a description of the data you are storing and 2) a value for the description. In the example I provide, the description provides context of the stored value, in this case the students chosen path. You DESCRIPTION should be the same value across all paths, then just update the PATH variable.
<script> /* EDIT START */ var DESCRIPTION = "Are you a remote or office based worker?"; var PATH = "Remote worker" /* EDIT END */ /* DO NOT EDIT BELOW THIS LINE */ var scope = parent.parent.parent; var start = Date.now(); var latency = Date.now() - start; var id = DESCRIPTION.replace(/[^a-zA-Z0-9]+/g, "_").replace(/^_|_$/g, "") + "_" + Math.random().toString(36).slice(2, 10); PATH = scope.CreateResponseIdentifier(PATH.substring(0, 1), PATH); scope.RecordMultipleChoiceInteraction(id, PATH, "NEUTRAL", PATH, DESCRIPTION, 10, latency, DESCRIPTION); </script>As your code block doesn't contain anything, set the padding to zero.