Hi i´m from brazil, and i work with a desktop course, now we use toolbook to create our courses, but it is very poor tool, so i would like to know if i can create our courses in storyline and connect it with any database.
You can build your own JavaScript triggers so it's possible to connect your Storyline outputs to a database using a variety of methods. There aren't any built-in publishing options to connect to a database other than SCORM / AICC. If you know your way around JavaScript and a server side language you should be golden.
Steve thanks for your answer, let me explain, i need to make course of computer like windows 7, microsoft word for example, but this course will work on desktop computer, and our software is im mysql, we need to save all data of all students, but do you recomend me any elearning plataform tha can work off line and after synchronize online?
I would like to save my results via php to a mysql database also. I would like to save pretty much everything: user, score, storybook title, score on each question, etc. Has anyone made this available as of yet? It would be a game changer and very much appreciated.
Hi is it possible that my elearning app creates a variable (depending on the student's accnt) and save it online thru mysql (via ftp) and call that variable online whenever the student progresses in the elearning app
I think what you can do is use PHP to get the user account info, then send the user account to a JavaScript script in storyline. This way storyline has your variable. Then, as you probably want, use some kind of JavaScript to php script to store the progress of that user in mysql. I am also looking for help with this situation, with a little more data being sent to mysql.
thanks @dave - for the info. I'm sure could use a sample as I am not really a programmer. For anybody that could help, thanks a lot, it means so much if you could.
I'm actually working on this problem, and here is my today result. it's working for writing in db
1. the user must connect on web site, so php authorization process get an user id from db.
2. this user id is integrated as a javascript variable by php process in the web page wich start SL player
3. This process use jquery framework, so it must be loaded by the calling web page : <script src="story_content/jquery.min.js" type="text/javascript"></script>
4. i update the onBWEvent function in story.js. I include the following lines in the "case "BW_StoreQuestionResult":" switch before the break line :
strId, strQuizId, strQuizname.... are SL javascript variables defined some lines before in story.js
data are transmit by ajax process to the destination page defined in url parameter. This is an url transmission, destination page (tes.php) collect data with a GET process and then integrated them in db
2. I have a php process wich builds the page where the storyline flash module is inserted. This page is "story.html" page based with modifications for integration in our graphic template. At the end of the page, the process inject an hidden DIV tag wiich contains user_id. Example :
12345
So user_id is always available in the web page. In the nBWEvent function in story.js ( "case "BW_StoreQuestionResult") before ajax code, i call a custom JS function (stored in user.js) wich read the previous DIV value en store it in a JS variable
We're looking to do something similar. Just wondering if there are any updates from those of you that have been working on this? Or any other resources you can point us to?
I'm using Parse.com to store user names and quiz scores. You can create Parse objects in JS and perform basic inserting, updating and retrieving stuff.
Would you be so kind as to post a zip file of your work? I am coming from the captivate community and I did the exact same thing by hijacking their "email" function in javascript to send results and submit directly to a mysql database. I'm also using php and I totally understand the jist of what you are doing but I think I could save myself a few hours with a zipfile of a sample project.
@Kenneth: using parse you can both get and put info. Parse acts as your database. If you're using some other database the protocol will probably be different but you'd still be using javascript.
@ David: I posted the zip. After modifying and publishing the storyline file make sure you copy the (altered) files in post-publish to your published output. the story.html i've used in this example might be outdated. You can update a recent story.html with a reference to the javascript file.
and lets them go through and take the course and submit the results to the database via ajax while displaying a custom certificate for them to print (fantastic very happy!)
Here is my only problem which is mobile/html5 in nature.
story.hml detects html5 compliance and redirects to story_html5.html
Of course on the redirect my parameter string doesn't follow it so I went in and hacked story.html javascript to be:
var g_parms = window.location.search;
Then on all the redirects to story_html5.html:
var strLocation = "story_html5.html";
location.replace(strLocation + g_parms);
problem is this doesn't work on android browser, my chrome browser or some tablets.
When it does work I have a further problem. I take variables from the articulate player and put them on the certificate. Well in HTML5 its not a flash player how do i get at the system variables of articulate in pure html5?
I know this thread is old - but working on something similar - I have not tested it but wouldnt this work.
If you have a php login page that does authentication - assuming the user authenticates ok - you set some data in a session variable. Couldnt you use an ajax call to php to grab that session data at a later time vs worry about having to pass it in?
65 Replies
You can build your own JavaScript triggers so it's possible to connect your Storyline outputs to a database using a variety of methods. There aren't any built-in publishing options to connect to a database other than SCORM / AICC. If you know your way around JavaScript and a server side language you should be golden.
thanks for your answer, but is there any exmple?
What kind of db connection are you looking for? What kinds of things would you like to do with that connection?
Steve thanks for your answer, let me explain, i need to make course of computer like windows 7, microsoft word for example, but this course will work on desktop computer, and our software is im mysql, we need to save all data of all students, but do you recomend me any elearning plataform tha can work off line and after synchronize online?
thanks
Hi Steve,
I would like to save my results via php to a mysql database also. I would like to save pretty much everything: user, score, storybook title, score on each question, etc. Has anyone made this available as of yet? It would be a game changer and very much appreciated.
Thanks,
Dave
Hi is it possible that my elearning app creates a variable (depending on the student's accnt) and save it online thru mysql (via ftp) and call that variable online whenever the student progresses in the elearning app
Hi RS,
I think what you can do is use PHP to get the user account info, then send the user account to a JavaScript script in storyline. This way storyline has your variable. Then, as you probably want, use some kind of JavaScript to php script to store the progress of that user in mysql. I am also looking for help with this situation, with a little more data being sent to mysql.
Dave
thanks @dave - for the info. I'm sure could use a sample as I am not really a programmer. For anybody that could help, thanks a lot, it means so much if you could.
Hi
I'm actually working on this problem, and here is my today result. it's working for writing in db
1. the user must connect on web site, so php authorization process get an user id from db.
2. this user id is integrated as a javascript variable by php process in the web page wich start SL player
3. This process use jquery framework, so it must be loaded by the calling web page : <script src="story_content/jquery.min.js" type="text/javascript"></script>
4. i update the onBWEvent function in story.js. I include the following lines in the "case "BW_StoreQuestionResult":" switch before the break line :
$.ajax(
{
url:"http://localhost/test/quiz/test.php",
data:{unUser:user_id, unId:strId, unQuizId:strQuizId, unQuizName:strQuizName, unType:strType, uneReponseCorrecte: strCorrectResponse, unStatut:strStatus, unPoint:nPoints, unPoids:nWeight, uneDescription:strDescription, uneReponse:strUserResponse, unNumeroQuestion:nQuestionNumber},
type: 'GET',
async:false
}
})
user_id is the javascript variable integrate in 2
strId, strQuizId, strQuizname.... are SL javascript variables defined some lines before in story.js
data are transmit by ajax process to the destination page defined in url parameter. This is an url transmission, destination page (tes.php) collect data with a GET process and then integrated them in db
This way has been inspired by the code provided by Michiel Van Der Bronk in : http://community.articulate.com/forums/p/11060/66190.aspx#66190
jl
hmmmm that sounds complicated.... i'll ask some of IT staff here to help me with the answer and thanks again @jean at least we have some basis point
Hi JL,
I was wondering if there was any more development on this? How do you do step 2 and step 5 (tes.php)?
Step 2, getting the php session into javascript variable in storyline
Step 5, iterating through the data in a php file. What does the data look like, etc?
Thanks for any help,
Dave
Oups sorry for delay !
2. I have a php process wich builds the page where the storyline flash module is inserted. This page is "story.html" page based with modifications for integration in our graphic template. At the end of the page, the process inject an hidden DIV tag wiich contains user_id. Example :
So user_id is always available in the web page. In the nBWEvent function in story.js ( "case "BW_StoreQuestionResult") before ajax code, i call a custom JS function (stored in user.js) wich read the previous DIV value en store it in a JS variable
in user.js :
function GetUserId()
{
var user_id = null;
user_id = document.getElementById("div_user");
return user_id.innerHTML;
}
in story.js :
var idUser = GetUserId;
$.ajax(
{
url:"http://localhost/test/_process_ajax/test.php",
data:{unUser:idUser, unId:strId, unQuizId:strQuizId, unType:strType, uneReponseCorrecte: strCorrectResponse, unStatut:strStatus, unPoint:nPoints, unPoids:nWeight, uneDescription:strDescription, uneReponse:strUserResponse, unNumeroQuestion:nQuestionNumber},
type: 'GET',
async:false,
success: function(data) {alert('Load was performed.');}
}
)
With this code, i can send all data i need to my db via ajax process : user id + quizz data
5. the test.php page on web server looks like this :
mysql_select_db($base, $db_link);
$user = $_GET['unUser'];
$id = $_GET['unId'];
$type = $_GET['unType'];
$reponse = $_GET['uneReponse'];
$reponse_correcte = $_GET['uneReponseCorrecte'];
$numero = $_GET['unNumeroQuestion'];
$statut = $_GET['unStatut'];
$points = $_GET['unPoint'];
$poids = $_GET['unPoids'];
$description = $_GET['uneDescription'];
$quiz_id = $_GET['unQuizId'];
$quiz_name = $_GET['unQuizName'];
$sql = "INSERT INTO test (id, quiz_id, quiz_name,type, reponse, numero, reponse_correcte, statut, points, poids, description, user_id) VALUES ('$id','$quiz_id','$quiz_name','$type','$reponse','$numero','$reponse_correcte','$statut','$points','$poids','$description','$user')";
$req = mysql_query($sql);
?>
may complicated but it work's
jl
We're looking to do something similar. Just wondering if there are any updates from those of you that have been working on this? Or any other resources you can point us to?
I'm using Parse.com to store user names and quiz scores. You can create Parse objects in JS and perform basic inserting, updating and retrieving stuff.
Parse is on my short list of things to try. Running into any hitches or gotchas or is it pretty smooth sailing?
I´m using borland Delphi, to control desktop user....
Steve,
Parse is great! I've been looking at the Amazon and Google stuff but this much more comprehensible for me.
They have a Javascript SDK which I use to store user names and scores for the movie quiz I'm working on.
The only thing is that some of the access keys are exposed in the JS.
You can control access on object / operation level but still.
For the time being this is of no concern as I'm still in prototype stage.
This discussion is only focused on saving information to a dbase. how do I manage to push info from the dbase to storyline...
Would you be so kind as to post a zip file of your work? I am coming from the captivate community and I did the exact same thing by hijacking their "email" function in javascript to send results and submit directly to a mysql database. I'm also using php and I totally understand the jist of what you are doing but I think I could save myself a few hours with a zipfile of a sample project.
Thank you very much!
David
@Kenneth: using parse you can both get and put info. Parse acts as your database. If you're using some other database the protocol will probably be different but you'd still be using javascript.
@ David: I posted the zip. After modifying and publishing the storyline file make sure you copy the (altered) files in post-publish to your published output. the story.html i've used in this example might be outdated. You can update a recent story.html with a reference to the javascript file.
good luck!
Thanks to all for this post, I have now created a 100% home grown LMS which takes a url and parameter string like:
myproject.com/mydir/story.html?studentid=34&courseid=3
and lets them go through and take the course and submit the results to the database via ajax while displaying a custom certificate for them to print (fantastic very happy!)
Here is my only problem which is mobile/html5 in nature.
story.hml detects html5 compliance and redirects to story_html5.html
Of course on the redirect my parameter string doesn't follow it so I went in and hacked story.html javascript to be:
var g_parms = window.location.search;
Then on all the redirects to story_html5.html:
var strLocation = "story_html5.html";
location.replace(strLocation + g_parms);
problem is this doesn't work on android browser, my chrome browser or some tablets.
When it does work I have a further problem. I take variables from the articulate player and put them on the certificate. Well in HTML5 its not a flash player how do i get at the system variables of articulate in pure html5?
Thanks!
David
I know this thread is old - but working on something similar - I have not tested it but wouldnt this work.
If you have a php login page that does authentication - assuming the user authenticates ok - you set some data in a session variable. Couldnt you use an ajax call to php to grab that session data at a later time vs worry about having to pass it in?
I made an application in Delphi with MySQL database and am now controlling the storyline by Delphi
I working on Dptive learning .
Antonio, can you help me , how did you use the Delphi ?
Adaptive *
This discussion is closed. You can start a new discussion or contact Articulate Support.