diff --git a/xapi_stmt_gen/Dockerfile b/xapi_stmt_gen/Dockerfile index 1c23e50..fa64d68 100644 --- a/xapi_stmt_gen/Dockerfile +++ b/xapi_stmt_gen/Dockerfile @@ -1,6 +1,6 @@ FROM node:12.22.0 -LABEL version="2.9.1" +LABEL version="2.9.2" WORKDIR /usr/local/src RUN mkdir xapi_stmt_gen diff --git a/xapi_stmt_gen/xapi_stmt_gen/generator.js b/xapi_stmt_gen/xapi_stmt_gen/generator.js index 4c42f92..0f338b4 100644 --- a/xapi_stmt_gen/xapi_stmt_gen/generator.js +++ b/xapi_stmt_gen/xapi_stmt_gen/generator.js @@ -3723,7 +3723,7 @@ module.exports = async function main() { // eslint-disable-line max-statements // if authenticated using GakuNinLMS's LTI plugin const username = ( (user.auth === 'lti' && config.LRS.ePPNScoped) - ? user.alternatename + ? user.alternatename // Can be null and not unique : user.username ); const eppn = eppns.find((eppn) => { @@ -3742,7 +3742,8 @@ module.exports = async function main() { // eslint-disable-line max-statements scope: scope, // nullable acl: scope ? scope.replace(/[.-]/g, '_') : null // used for RLS }; - if (scope) { + // Exclude duplicates + if (scope && !newEppns.find(e => e.username === username)) { newEppns.push(userAttrs[user.id]); } }