Closed pinazo closed 11 years ago
Confirmed. We are able to dump all game data by accessing /smile/all. David, let me know if we must persist game data in some manner.
look good.
I'm re-opening. Looking at the output from this in session: https://gist.github.com/truedat101/6863118
It's a huge array. Boo. I need an object that I can access things by the object type:
In the smileplug.js there is a line: js.get('/smile/all', routes.handleAllMessagesGet);
If you check into routes, the underlying call goes down to: game.messages.past
This returns the massive array of stuff.
Let's define the session data to be:
{ iqset: { <"all the questions" > }, sessionstats: { <"all stats"> }, students: { <"student { name, results } "> }, results: { <"all results">} }
Our students are keyed by IPaddress. For now, use routes.handleStudentGetAll().
For questions, use: routes.handleQuestionGetAll
For results, use: routes.handleResultsGet
We should include the metadata. Currently we only having rating: routes.handleRatingMetadataGet
This gets the rating scale used.
We don't have a nice sessionstats roll-up. Use: routes.handleMonitoringHtmlGet but we need to modify it to get back JSON. Let's create a new one: routes.handleSessionStats
Ok this is looking good:
{ "iqset":{
}, "sessionstats":{ "numberOfStudents":0, "numberOfQuestions":0, "numberOfStudentsPostingAnswers":0 }, "students":{
}, "results":{ "winnerScore":0, "winnerRating":0, "numberOfQuestions":0, "rightAnswers":[
],
"averageRatings":[
],
"questionsCorrectPercentage":[
]
}, "metadata":{ "1":"Low Quality Question", "2":"Adequate Question", "3":"Average Question", "4":"Good Question", "5":"High Quality Question" } }
Mark as closed.
Double check if the server offers a way to dump all game data for debugging. It would be nice to persist game sessions in some manner.