Can Lectora send variables to Database without LMS?

butterfamily
butterfamily Community Member Posts: 5
Does anyone know whether is it possible to send variables in Lectora to Database without using LMS?

Comments

  • cpliu
    cpliu Community Member Posts: 237
    Thanks for the trick to save data to Access database. Have anyone tried to retrieve data from Access database and output the result in Lectora? I'm thinking about top 10 scorer for a quiz game we use. I have the data saved successfully in Access using ASP. If an example code in ASP to get top scorers out would be great.



    Thanks for the advice.
  • ssneg
    ssneg Community Member Posts: 1,466 ☆ Roadie ☆
    @cpliu 60332 wrote:
    Have anyone tried to retrieve data from Access database and output the result in Lectora?
    Yes, can be done. In Lectora, select Test, go to Results tab, check Receive response. Now whatever your script responds with (should be Response.Write(something) in ASP.NET, and echo something in PHP), will be recorded to a variable. You can then use this variable as normal, e.g. to check that the submission was ok and you can unblock the Next button etc.



    In the "get the top 10 list" case, you would need to use JS to parse the response variable and then populate the table with the top scorers' names.
  • cpliu
    cpliu Community Member Posts: 237
    Thanks for the hint. Although I don't know the syntax to pull data, the direction helps a lot.
  • raine
    raine Community Member Posts: 9
    SSNEG, you are a champion!! Been looking for a way to do this for ages and now I come across this thread and my prayers have been answered. :D
  • cpliu
    cpliu Community Member Posts: 237
    Do you have codes to retrieve data that worked successfully for you? Can you post so I can model when I need the functionality?



    Thanks,
  • ssneg
    ssneg Community Member Posts: 1,466 ☆ Roadie ☆
    @Raine 60667 wrote:
    SSNEG, you are a champion!! Been looking for a way to do this for ages and now I come across this thread and my prayers have been answered. :D
    I'm glad it worked for you. For anyone's reference (since people keep digging this thread up), Lectora can save data to Google Spreadsheets. No need for server scripts.