Saving quiz question to variable
Aug 22, 2014
By
David S
Hello,
TLDR:
How do I save the current slides question and answers (can be seperately) into a variable (or access a hidden variable) so that I can export it from Storyline to javascript?
Using the quiz maker to make a question bank, then creating a quiz slide from that question bank. The slide master shows that the question is a text field and the answers are text fields.
Is there a hidden variable I can access that will grab that slides question and answers, or a way to save it out to a variable.
I need to grab the question/answer and be able to send it out using javascript FROM storyline TO an html page.
Thanks.
13 Replies
Hoping anyone can help me out here?
Hi David,
I wanted to point out that Storyline is designed primarily as an elearning development tool to be used in conjunction with Articulate Online or your own Learning Management System (LMS). If you'll be publishing for LMS, any LMS that is compliant with SCORM, AICC, or Tin Can API will also provide accurate tracking capabilities and likely be able to capture all this data you need.
Tracking results in a text file or database is not supported, so if you need to use the Javascript set up to report to a database, I'll defer to the community on that set up and ideas.
Trying to develop a feedback system for reviewing the course. The LMS data cannot be used in this scenario. I need realtime on the page access to questions/answers that are on the quiz page.
Thanks.
Hello,
I would also need to be able to get in a var the answer selected in a multiple choice question. Is there any trick to do this ?
I have a solution that should work, with putting the answers on button and adding triggers on the button sot the var, but I would be able to use SL Quiz tool.
Hi Ludo,
If you're using the Storyline quizzing tool, that will also record what the user has selected in terms of a multiple choice or other question type answer. Typically the LMS handles reading this data and providing you a report - but if you're looking to capture that information in a variable and use it within an excel or database, I'll defer to the community on how to set that up.
Thank you for your answer,
I'm in the 2nd case (out of a LMS), so I need to capture the data with javascript and send it to a database with PHP.
Hi Ludo,
I am new to articulate and I am trying to achieve what you mentioned. Record the user answer and question in variable and with JavaScript send it to a page and database.
Did you find any solution for this?
Appreciate your help.
Hi Sreelatha,
I'm not sure if Ludo is still subscribed here, as the post is a bit older - but you could always use the "contact me" button on a ELH users' profile to reach out to them directly!
It's not a set up that we can support, but you could get started by reviewing the best practices of Javascript here.
Best of luck with your project!
Also trying a similar thing. Want to save (a lot of) variables into a JavaScript array and then recall these later. Would save on a lot of typing.
Thus far all the advice about how to use JavaScript involves passing a variable into JavaScript, but can't find a good example on the text to use to recall these in a different trigger at a later point.
Hi Allan,
It's a bit outside my wheelhouse, as Javascript isn't something we support. Have you look on the Building Better Courses side of ELH ? That side tends to focus more on how to, design, etc.
Hi,
I am doing something similar.
Create a variable and on button click, execute JavaScript. In javascript, call the variable as below:
var score = p.GetVar("score");
Push this to array.
var sb = new Array;
sb.push(score);
Thanks,
Sree.
Hi Sree,
Looks like just finding your feedback from 3 years ago! If you are still remembering, will you be able to elaborate more?
'Create a variable' means creating user-defined variable in Storyline 360, right? How are you assigning the quiz score in Storyline 360 and what do you have in your 'Execute JavaScript' command?
Thanks!
Hi Ayumi!
I'm not sure if Sreelatha is still subscribed to this discussion! Feel free to use the Contact Me button in their ELH profile to reach out privately.
I found a few resources that should help in the meantime:
Javascript and Storyline
Storyline 360 Javascript Best Practices
This discussion is closed. You can start a new discussion or contact Articulate Support.