Skip to content

Commit

Permalink
Fix teh LTI vesrion of the module dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
torinfo committed Apr 14, 2023
1 parent a8a45fe commit 34af480
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tools/dashboard/index.php
Expand Up @@ -181,7 +181,9 @@
$info->lrs = $statistics_available->lrs;
$info->dashboard = $statistics_available->dashboard;
$info->role = $role;
$info->users = $users;
if ($role != "Student") {
$info->users = $users;
}
$info->actor = $USER->email;
$info->displayname = $USER->displayname;
$info->firstname = $USER->firstname;
Expand Down
2 changes: 1 addition & 1 deletion website_code/scripts/xapi_dashboard_data.js
Expand Up @@ -85,7 +85,7 @@ DashboardState.prototype.getStatementsxAPI = function(q, one, callback) {
var statement = body.statements[x];
if ($this.info.role == "Teacher") {
if (statement.actor.mbox != undefined) {
if ($this.info.users.findIndex(u => 'email:' + u.email === statement.actor.mbox) === -1) {
if ($this.info.users.findIndex(u => 'mailto:' + u.email === statement.actor.mbox) === -1) {
// Skip this user
continue;
}
Expand Down

0 comments on commit 34af480

Please sign in to comment.