Articulate/Storyline exam result update in SQL database
Dec 11, 2014
Hi All,
I have an exam designed by Storyline and published into Articulate online. Users logged into my web portal and load Articulate online (restricted to Content tab only based on the user) which can be seen the exam designed by Storyline. Assume user completed the exam at the end and click the finish button. I was able to get the result (by editing user.js) once clicked on the finish button and pass into SQL database.
- Is there a way to identify who takes (UserID/Email) the exam after click on Finished button?
- Or Is there a way (API or Web Service) to pass the exam result and UserID/Email by Articulate online (similar result when we export to CSV file)?
Appreciate your help.
Thanks,
Harsha
6 Replies
Hi Harsha,
I was stuck with a similar problem. The only difference is that my storyline exam was not published into Articulate Online. Anyhow, I also wanted to know the UserId of the person who logged into my portal and was taking the exam on storyline. A workaround I did was passing the userid as a query parameter to the story.html and then extracting it in User.js while reporting the result back to my portal using AJAX. Some people had suggested using the PutVar() method in player I guess. I never tried that :)
Thank you Basit. Yes, your approach sounds good!
But situation is in really trouble when Storyline exam published into Articulate Online. What my approach is, once user clicked on Finished button, popup window will request UserID/Email and validate it and pass it to SQL side. I doubt client accepts with this as I'm preparing a POC using this approach for them.
Always appreciate your suggestions here.
BTW Basit, Articulate Online does not support web service or any other mechanism to send results along with UserID/Email?
Thanks,
Harsha
Sorry that I haven't worked on Articulate online. You are right, asking the user for userid and email in a pop-up does not look good.
How are you posting the results to SQL right now? I would love to look into this.
Basit
Please find the attached document and there is no way to get the user id as per the Storyline. Also there is option to print the result after completed the exam. To print the result Storyline pops-up a window to enter the userid/email. This print result method can be found in Story.js -> case "BW_PrintResults":
Below is the way I'm setting the result and there is several ways to send to SQL. I hosted the site and pass the following values.
var player = GetPlayer();
var val = player.GetVar("myVariable");
alert("score is, " + val + ".");
var player = GetPlayer();
var score = player.GetVar("myVariable");
var obj = { courseID: "15-931", marks: score, userName: "harshab@XXXX.com" };
$.ajax({
type: "POST",
url: "https://XXXX.com/Articulate/q_process.aspx/SubmitResult",
data: JSON.stringify(obj),
//string courseID, int marks, string userName
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
alert("Is submitted Success? " + data);
},
error: function(jqXHR, textStatus) {
debugger;
//alert(jqXHR);
if (jqXHR.status === 0) alert('Not connect.\n Verify Network.');
else if (jqXHR.status == 404) alert('Requested page not found. [404]');
else if (jqXHR.status == 500) alert('Internal Server Error [500].');
else if (textStatus === 'parsererror') alert('Requested JSON parse failed.');
else if (textStatus === 'timeout') alert('Time out error.');
else if (textStatus === 'abort') alert('Ajax request aborted.');
else alert('Uncaught Error.\n' + jqXHR.responseText);
//return false;
}
});
Hi Harsha,
I am very new to articulate,. I have gone through your document attached. Is there a way to send the response for each question to SQL?
Hey Sreelatha!
This thread is a little older so I'm not sure if Harsha is still subscribed. You may want to try reaching out to him directly using the "Contact Me" button in his profile 😊
This discussion is closed. You can start a new discussion or contact Articulate Support.