exporting variables to be read in a Google docs spreadsheet

I've seen Tom's helpful screencast on how to embed a Google docs form into a Storyline project. However, what I want to do is a little different. I'd like to be able to export the values of about a dozen variables from Storyline so I could see them in a spreadsheet the way I would if students entered those values into a Google docs form.

I've got a grammar assessment, and I want to export a student's name and either OK/NEED TO REVIEW/MIGHT WANT TO REVIEW for each of a dozen or so topics. Now, I could just use a final page screen in Storyline showing a student her status on these dozen topics and ask her to fill out an embedded Google docs form in which she basically copies the results manually. These are just initial assessment scores, and I'm not worried about honesty issues. However, this seems like a pretty klutzy way to do things. Would anyone be able to help me out with a suggestion for a better method? I don't know any JavaScript, and my familiarity with Storyline is fairly low.

Thanks!

Dorothy

142 Replies
Tracy Parish

Brilliant!  Mike, you just solved this issue for me.

This was a posting I found for why this works....I have no idea what he is talking about, I'm just glad it does what I need it to.

"It returns your JSON data wrapped in a function name. jQuery handles the function name behind the scenes and passes the data into your success handler. The data is loaded by dynamically creating a script element with the src attribute pointing to the service being called and then attached to the browser's DOM. Then the browser makes a request to the resource and the web service responds with the callback function and data."

Jane James

Hi all -

First of all - thanks for the discussion! Like many others, I'm not a coder so it is inspiring to see how many people are working together to build a solution to this problem.

I've had a lot of help from Tracy - her tutorial is amazing! - but am still having trouble implementing a solution.... I'd really appreciate any advice that could be given for my 1 variable, test Articulate course...

Thanks again!

Jane James

 

Link to hosted articulate course

https://googledrive.com/host/0B82TWSb7pI3wQ2dkWlMyT2lBSGs

Link to survey form

- https://docs.google.com/forms/d/1c9OZMa1hFuM39FqwU7dz-1GzSXrcdbjCD59Ldnbcx4o/viewform?usp=send_form

Link to articulate course

https://drive.google.com/open?id=0B82TWSb7pI3wSkZTVEhpcTlLR2M

Text of the javascript program

var player = GetPlayer();

$.ajax({

url: “https://docs.google.com/forms/d/1c9OZMa1hFuM39FqwU7dz-1GzSXrcdbjCD59Ldnbcx4o/formResponse”,

type: “POST”,

dataType: “jsonp”,

data: {“entry.1796023489” :player.GetVar(“Hi“)},

success: function(data)

{

alert(data);

}

});

return false;

 

Jane James

Figured it out... being a newbie, I didn't realize I was using the wrong quotation marks. After re-typing everything that was going into javascript and the story file, it works! (minus the jsonp... that's a problem for later)

Lessons learned

- try jsfiddle to see if your quotations and brackets are matching

- although I didn't use it (I'm on a hospital computer), notepad++ is apparently good for catching freaky Unicode that doesn't show up on notepad or on the input section of articulate

- if you are stuck, definitely try running CTRL-Shift-J on chrome to see what exact errors you are getting from javascript

- yodeling "never quit" is surprisingly effective (not recommended until desperate)

Ashley Terwilliger-Pollard

Hi Toby,

I'm not certain if Patrick is still subscribed, but you may want to message him directly using the "contact me" button on his profile to see if he's able to share additional information with you. I suspect that is what he meant - but I can't say for certain as modifications to the published output is not something we support, and therefore something I've never done. :) 

Daniel Dyer

Why is this such a fiddly and confusing thing to achieve.  Sorry AS staff, the lack of simple non LMS functionality to track learner data is pathetic.  It feels more like a tactic to force users to consider Articulate Online.  This is really starting to alter my opinion of the software and company and making me very reluctant to confidently recommend to other professionals in the industry.

Very dissapointed customer ):

Ashley Terwilliger-Pollard

Hi Daniel,

This thread is a bit older and references folks who were looking to report to something outside of an LMS such as a web site or spreadsheet for tracking. The LMS reporting capabilities if publishing with SCORM or Tin Can API are what you would want to look into further for your LMS. Have you run into a particular issue with reporting data to your LMS? What publish options are you using? What LMS are you hosting within? Have you reviewed this troubleshooting article on testing content at SCORM cloud? 

Jane James

Hi -

I wanted to update on a wierd quirk I found in the system. I setup the variable reporting to send very long strings of information to google forms (I have been grouping multiple variables into a single string, and then separating them in excel). While variables were being reported to Google forms appropriately, it stopped sending at variable 17. I was concerned that it was a problem in terms of coding, or even google forms, but it turned out to be a problem with the volume and length of variables being reported. When I broke it up so that storyline was separately sending out half the variables at a time (as supposed to all the variables at once) it worked. Hope this helps someone...

Thanks again for all the support - I wouldn't have been able to get my project past our IRB if it wasn't for this selective reporting of variables...

Matt Lynch

I am having trouble finding the entry code for each input section.

When I inspect the google forms code I get this...

<input type="text" class="quantumWizTextinputPaperinputInput exportInput" jsname="YPqjbf" autocomplete="off" tabindex="0" aria-label="Full Name" aria-describedby="i.desc.2101111227 i.err.2101111227" name="Sydney Collective Fire Training User data" value="" required="" dir="auto" data-initial-dir="auto" data-initial-value="">

There doesn't seem to have the entry code in there at all.

Any ideas? Has google changed the code for forms?

Steve Flowers

Hi, Matt - 

On your form, while editing, try to generate a pre-filled link:

It will provide you with a URL like this:

https://docs.google.com/a/forms/d/18rlUiMXHUfebyWeOKJSXGeGJHNnrLW6iFF_v2Xdg9Iw/viewform?entry.1813808438=Option+1&entry.1973654167=Option+1&entry.1879837238=Option+1

Jason Nagels

Hi All - 

I'm not sure how many people monitor this post anymore, but I thought I would give it a shot.

I had this working a few years ago, and unfortunatly I had my hard drive fail and lost my source files that worked. Now I'm trying to recreate the ability to post to a google form with not a lot of success. 

I have created a test training:http://nagelsconsulting.com/Lockout/story.html
The idea is to have the firstname, lastname and score output to the google form.

I can see now that after completing the course the timestamp is entered, but none of the values are passing to the google form. Here is my spreadsheet results:
https://docs.google.com/spreadsheets/d/1MTo41Vb8Vkfd6jaCPRzkdGg0LSHLUxk7GtRvBBrhvso/edit#gid=361735704

The javascript I have entered is as follows:

var player = GetPlayer();
$.ajax({
url: "https://docs.google.com/forms/d/1eshntCAnj-xod2Ql-R2VBUx0lnMCQ-wrd_y9DfaMZok/formResponse",
type: "POST",
dataType: "jsonp",
data: {"entry.1307427408":player.GetVar("FirstName"), "entry.1400570972":player.GetVar("LastName"), "entry.1439160339":player.GetVar("Score")},
success: function (data) {
alert(data);
}
});
return false;

----

I have also made sure to edit the published story.html with the following code:

<script
src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>

any help that can be provided would be very much appreciated!

just in case anyone wants to take a look at the source file, I have attached the storyline test file.