SMILEConsortium / node-smile-server

3 stars 4 forks source link

Dump full session data on the fly #5

Closed pinazo closed 11 years ago

pinazo commented 11 years ago

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.

pinazo commented 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.

truedat101 commented 11 years ago

look good.

truedat101 commented 11 years ago

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:

truedat101 commented 11 years ago

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.

truedat101 commented 11 years ago

Let's define the session data to be:

{ iqset: { <"all the questions" > }, sessionstats: { <"all stats"> }, students: { <"student { name, results } "> }, results: { <"all results">} }

truedat101 commented 11 years ago

Our students are keyed by IPaddress. For now, use routes.handleStudentGetAll().

truedat101 commented 11 years ago

For questions, use: routes.handleQuestionGetAll

truedat101 commented 11 years ago

For results, use: routes.handleResultsGet

truedat101 commented 11 years ago

We should include the metadata. Currently we only having rating: routes.handleRatingMetadataGet

This gets the rating scale used.

truedat101 commented 11 years ago

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

truedat101 commented 11 years ago

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" } }

truedat101 commented 11 years ago

Mark as closed.