Skip to content

Commit

Permalink
Prevent crash of Xerte dashboard if LearningLocker's aggregate endpoi…
Browse files Browse the repository at this point in the history
…nt is used
  • Loading branch information
torinfo committed Jul 6, 2022
1 parent 4660052 commit e5ca0ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website_code/scripts/xapi_dashboard_data.js
Expand Up @@ -172,7 +172,7 @@ DashboardState.prototype.getStatementsxAPI = function(q, one, callback) {
};

DashboardState.prototype.getStatementsAggregate = function(q, one, callback) {
var role = this.data.info.role;
var role = (this.info ? this.info.role : "");
var matchLaunched = '{"statement.verb.id" : { "$eq" : "http://adlnet.gov/expapi/verbs/launched" } }';
var matchCourse = '';
if (typeof q['activities'] != "undefined")
Expand Down Expand Up @@ -262,7 +262,7 @@ DashboardState.prototype.getStatementsAggregate = function(q, one, callback) {

DashboardState.prototype.retrieveDataThroughAggregate = function(q, dashboard_state, data, callback)
{
var role = this.data.info.role;
var role = (this.info ? this.info.role : "");
var startDate = moment(q['since']);
var endDate = moment(q['until']);

Expand Down

0 comments on commit e5ca0ff

Please sign in to comment.