Need Help Creating Custom Content using additional programming
April 6, 2016 12:00 AM
Hello all, I am a newbie. I have been tasked with creating an additional login/register admin area that would display reporting from those who tested but also that interfaces with a MySQL database that is being feed with the testing results. I honestly don't know where to start. Can I use VBScript or PHP custom code to incorporate that into a current Lectora program? If I can, how can I do this or can you point me into the direction of where I should be posting this?
Discussion (4)
Hi Melanie,
so essentially you want to create a server application that would store Lectora test results along with learner's input such as Name or Email, correct? That is quite easy:
- step 1: In Lectora, create a test and all forms for learners to enter their names
- step 2: create a PHP script and a MySQL database. The script should get POST parameters and store them into a database. This is usually chapter 2 of any PHP textbook. See this for example: http://www.tizag.com/phpT/postget.php
- step 3: Enable "submit results to CGI / Include all variable value" in Lectora, enter the URL of your server script (e.g. http://www.example.com/submitresults.php), set it to POST.
Of course, if you want to display the results, you will also need to create a PHP page that reads from the database and displays the results. This is usually Chapter 1 of any PHP textbook.
Please note that this will not authenticate your users against any database, it will simply take whatever they input as their names. If you want authentication, you have to expand the server side with a database containing learner names and passwords as well as a method of authenticating learners against the database, creating new learners, managing lost passwords, securing it etc. etc. In other words, you are building your own small LMS.
And if this is your first venture into the wonderful world of PHP, MySQL, servers and databases, then this might be a little bit too much. The easy way out is to just use Lectora's ability to submit variables to Google Drive.
Cheers,
Sergey
VBScript wasn't something I preferred, it was just something I had read in documentation somewhere so I thought I was limited to using it. PHP would be much better and seems like, since I will be incorporating with a MySQL database, it would be the best option. I had never used FireBase so that is good to know. Thank you so much for your response. I am sure I will have more questions about how to initially connect with the software and get it to read my code but at least I know what is possible now.
undefined
Thanks,
Melanie
Hi Melanie,
VBScript i am not sure about if and how it can be connected with Lectora. PHP is server side. So yes, you can connect from Lectora with a PHP script. You can connect with a PHP script by either using a Javascript call in your course somewhere or by using the forms built in Lectora. In both cases you would need to pass variables by using GET or POST data. The serverside script acts on that data and gives back some feedback you can show/work with in Lectora.
Another option is like this sample:
http://community.trivantis.com/shared-content/online-journal-proof-of-concept-v2/
It uses Firebase, a Google cloud realtime database. No PHP needed, just a straight connection through Javascript with the database. If you have a filled complex MySql database from which you need to get data... then PHP probably is your best bet. On the other hand , if no data yet inside a MySql database, and you need to create/setup a database too...then Firebase might be a great option, especially because its realtime and quick too.
Kind regards,
Math
G'day Melanie,
Have you seen what can be done using xAPI (AKA Tin Can)?
Take a look at the Peer Comparison example, simple click the "Contest" menu option above.
Regards, Peter
www.LectoraDeveloper.com
Discussions have been disabled for this post