Moodle & Storyline
Oct 08, 2014
By
Abhishek Roy
Is there anyway i can pass the score of a quiz to Moodle LMS other than adding storyline's inbuilt result slide?
I have created a custom quiz with blank slides (without converting it into a free form quiz or graded quiz).Assigned a number variable GrandTotal to keep track of learners score.can i use this variable (grand total) to pass the score to Moodle LMS ?
I don't want to use inbuilt result slide.
i have also attached my story file.
51 Replies
I think maybe I am misunderstanding because I created a second text variable but I am not able to tie any other variable to it but the other text variable still.
Hi Melissa,
Sure - I just made a really quick example. If you take a look it's three slides, and the second slide is the short answer which I'm setting to the value of the previous text entry.
To show how it's changing and being set, I included a variable reference on the final results slide so that you could see that it's being adjusted.
Thank youuuu!!! I am not having users enter any text at all. Is this possible to do without that? I just want to pull a number score and that is it.
Hi Melissa,
You won't be able to use that method with a numeric entry as the variable types are different. I'm not aware of another method to report a user entered number to an LMS, but I hope the community can help.
I am trying to get TextEntry1 = cases (cases is a number variable that will change depending on what the user clicks). I want to report the cases number to the LMS. I want it to show only completion if cases = 4.
Ah, ok. I will see if anyone has any work arounds.
Thank you for responding so quickly and helping out. I am sure this will help others. I actually am going to try it with numeric entry instead. I thought the text entry would also accept numbers.
No problem Melissa - and sorry it took us a bit to figure out. I don't know that the numeric entry will allow you to do the same thing with a numeric question type...
You may want to follow along in this thread, as a few other users were asking a similar question or here is another thread.
Hi Melissa,
I *think* know what you're trying to do. Remember, the "TextEntry1" variable was created by default when the Data Entry Text Entry object was inserted.
If you're not having users enter any text, the challenge you're facing is wanting to combine two different variable types (number and text) - which we can't do.
What if you changed your cases variable to a text variable. When the user clicks, adjust that variable with a number value. Remember, a number variable can only hold numeric integers whereas a text variable can hold alphanumeric values and special characters.
Now, you can pass the value that was added to one text variable (user clicks) into the final text variable (pass to LMS).
The reason I was doing it that way was because I was following this post: http://www.articulate.com/support/storyline/how-to-send-the-value-of-a-variable-to-an-lms
I was assuming that I could pass my number variable into the actual text box and then it would report that to the LMS, however I did not realize that I could not adjust a text variable to equal a numeric variable.
Right, that tutorial David Fair shows should work.
First, understanding how variables behave is key to less consumption of asprin and prevents over indulgence in alcohol beverages. :) One cna only pass a variable to another variable of the same type. Here's the preso I did last week at DevLearn - see #2 > http://www.slideshare.net/NuggetHead/articulate-storyline-fundamentals-of-variables
Now, for your setup create a text variable with a name of "varCase".
Insert the Survey Short Answer per David's Screenr and follow the steps. Notice how his selection of radio buttons adds a text value to his variable for the personality type chosen. Create a similar trigger for your buttons, but add (set) the respective number to your varCase variable.
The hard part is getting your brain to understand the differences between a Number variable vs. a numeric text value.
Hope this helps.
That's an awesome deck. Thank you for sharing.
I'm not using any buttons, will this work with shapes? I wish he had included the file with the tutorial. It's hard for me to understand without deconstructing something.
It would be great if there were a tutorial out there with a file that shows how to pass numeric variables to the LMS.
Won't this work the same way if I used a "How Many" survey instead of the "Short Answer" survey? Since "How Many" is numeric?
If you want to get super-tricky, you could do this in a single JavaScript trigger. This would record a new interaction with a custom label every time you hit the trigger event. In this case, it doesn't matter what your variable type is. Advantage here is it's pretty easy and doesn't rely on acrobatics in a question. Doesn't even require a question to trigger the interaction capture. Also lets you call the interaction whatever you want instead of the built-in ID.
var lmsAPI = parent;
var player=GetPlayer();
var customString=player.GetVar("myCustomSLVar");
var date = new Date();
//this calls the SCORM API to record a custom interaction
lmsAPI.SCORM_RecordInteraction("call-it-what-I-want-darnit",customString ,true ,"" ,"" ,"" ,"" ,"" ,date , "fill-in");
Would it be this below if the variable I want to report is called "cases" ?
var lmsAPI = parent;
var player=GetPlayer();
var customString=player.GetVar("cases");
var date = new Date();
//this calls the SCORM API to record a custom interaction
lmsAPI.SCORM_RecordInteraction("cases",customString ,true ,"" ,"" ,"" ,"" ,"" ,date , "fill-in");
I'm not sure what the "fill-in" and all the "" "" are? And then I would just add it to the main slide?
This is why I need to learn more about JS. LOL.
Yep. That would grab your "cases" variable contents. The blanks are unnecessary parameters for this use case. Those would need to be there to provide placeholders so the other stuff can go into the function. Fill-in tells the LMS it's a text entry interaction.
Here's the part of the data model with different types that shows the options. Storyline usually handles this automatically. In the code above, we're just hijacking the same function Storyline uses to submit interaction data to the LMS to do our bidding.
cmi.interactions.n.type (“true-false”, “choice”, “fill-in”, “long-fill-in”, “matching”, “performance”, “sequencing”, “likert”, “numeric” or “other”, RW) Which type of interaction is recorded
http://scorm.com/scorm-explained/technical-scorm/run-time/run-time-reference/
You'd trigger that on submission or after the entry has been made. Good to put on something that requires a click.
Sweet! So I can just get rid of all the extra "" in this instance? Thank you so much again and Kevin too for all the input.
Here's the start of the function we're calling with lmsAPI.SCORM_RecordInteraction:
function SCORM_RecordInteraction(strID, strResponse, blnCorrect, strCorrectResponse, strDescription, intWeighting, intLatency, strLearningObjectiveID, dtmTime, scormInteractionType, strAlternateResponse, strAlternateCorrectResponse){
Since we only care about setting the ID string, response string, whether the response is correct or not (just works out better as true in my testing), date, and interaction type, the parameters in between blnCorrect and dtmTime are left blank with "". The parameters at the end don't matter. We just needed to leave spaces to make sure date and type are passed. LMS call will fail without those.
No. You really need those "" to make sure the date and type are passed in properly.
Oh gosh, I have to add all of this that is bolded too? I just want it to pass the numeric varible "cases". :(
function SCORM_RecordInteraction(strID, strResponse, blnCorrect, strCorrectResponse, strDescription, intWeighting, intLatency, strLearningObjectiveID, dtmTime, scormInteractionType, strAlternateResponse, strAlternateCorrectResponse){
No! That was an illustration of why you need the "". :)
var lmsAPI = parent;
var player=GetPlayer();
var customString=player.GetVar("cases");
var date = new Date();
//this calls the SCORM API to record a custom interaction
lmsAPI.SCORM_RecordInteraction("cases",customString ,true ,"" ,"" ,"" ,"" ,"" ,date , "fill-in");
That right there will pass to the LMS an interaction with the name cases along with whatever is currently in your cases variable in Storyline. You could attach it to a button. Hit the button 5 times and the interaction will be recorded 5 times with a new interaction increment.
This post was removed by the author
Yes!
And that's why we call them super heroes...thanks Steve and Kevin. :-)
This discussion is closed. You can start a new discussion or contact Articulate Support.