Follow

More Efficient Registration Reporting

Avatar

When we create an integration deliverable package for new Engine customers, we include sample code for getting registration summary data consisting of completion status, success status, score, and duration in the RollupRegistration method.

// For Engine 2014.1 and newer this is "ScormEngineManager.Implementation.GetRegistrationSummary" instead.
RegistrationSummary regSummary = ScormEngineManager.GetRegistrationSummary(externalReg, externalConfig);

// Completion is an enumeration: Unknown, Completed, Incomplete
Completion completionStatus = regSummary.CompletionStatus;
// Success is an enumeration: Unknown, Passed, Failed
Success successStatus = regSummary.SuccessStatus;
// Total time in seconds tracked by ScormEngine (not as reported by course)
long totalTime = regSummary.TotalSecondsTracked;
// Score is unknown until explicitly reported by the course
bool scoreIsKnown = regSummary.ScoreIsKnown;
// Score is from -100.0 to +100.0
double score = regSummary.Score;

 

The data needed to populate a RegistrationSummary reporting object comes from Engine's database tables, so every call to ScormEngineManager.GetRegistrationSummary means a trip to the database. However, RegistrationSummary doesn't have all the registration data that Engine makes available. For more advanced reporting on information like interactions, you can get a full Registration object instead:

Registration reg = ScormEngineManager.GetRegistration(externalReg, externalConfig);

 

Each call to ScormEngineManager.GetRegistration will trigger several database queries, on top of the ones already performed by ScormEngineManager.GetRegistrationSummary. If you use both summary data and more detailed registration data in your reporting, you can reduce the number of database queries involved by getting a RegistrationSummary object directly from the Registration object. Instead of following this pattern:

RegistrationSummary regSummary = ScormEngineManager.GetRegistrationSummary(externalReg, externalConfig);
//
// report on the summary data
//

Registration reg = ScormEngineManager.GetRegistration(externalReg, externalConfig);
//
// report on the detailed data
//

Use this in your RollupRegistration override:

Registration reg = ScormEngineManager.GetRegistration(externalReg, externalConfig);
RegistrationSummary regSummary = reg.GetRegistrationSummary(); // Summarize the already-loaded registration data
//
// report on summary and detailed data
//
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk