Travel Game - Leaderboard Questions...

Sep 29, 2015

Hi All,

I've finally finished the first installment of my travel game.

Throughout the game the user wins 'air miles'. I'd like to feed the user score through to a leaderboard but I'm having a few issues.

The game is hosted in Moodle 1.9 on a secure server, the users have to log in to their account on our LMS to play the game.

Is there any way to bypass the Moodle security so we can have the results feed through to a leaderboard that we would create? Or is there a way to create a leaderboard within Moodle 1.9?

Any advice or help would be really appreciated as I'm a bit stuck for ideas at the moment.

I've attached a link to the game below if it helps you understand...

11 Replies
David Price

I'm afraid I cant help much but I am looking to do something similar.  Not with Moodle but have an LMS hosted course post variables to an external database.  I have been unsuccessful so far in finding a solution but have been thinking about using some kind of JavaScript.

We use JavaScript to post variables out to Google Sheets so the same practise in theory could allow you to post out to a PHP/MySQL or .NET/SQL setup.  I just can't find a solution for it yet and my JavaScript knowledge is not the best.

Love the course by the way :)

David Price

Someone with more experience than me may correct me on this but you shouldn't have an issue posting out, its when you come to post into Moodle that you would struggle and would need some kind of API.

That being said I'm talking about posting direct out of the eLearn rather than Moodle.  So you would never actually post the data to Moodle.  Assuming your working with PHP and MySQL your JavaScript would need to call a PHP page with a form, post the data into that form and then submit the form which then posts into your external database.  Technically you dont need a form, you just need a page you can post variables to.

I created a PHP/MySQL based leaderboard system a couple years ago and everything is there for posting data, I just don't know how to call it via JS.

This discussion is closed. You can start a new discussion or contact Articulate Support.