Skip to content

Commit

Permalink
fix(adaptor): resolve issue with xapi assertion pass/fail logic (fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
brendongitx committed Nov 3, 2023
1 parent a016160 commit a52d4f4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/main/server/adapter/xapi/xapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,7 @@ var xapiStatement = async function (s) {
if (!EcObject.isObject(s)) return;
if (s.result == null) return;
var negative = false;
if (s.result.score != null) {
var scaled = s.result.score.scaled;
if (scaled > 0.7)
negative = false;
else
negative = true;
} else if (s.result.success != null) {
if (s.result.success != null) {
var scaled = 1.0;
if (s.result.success == true)
negative = false;
Expand All @@ -134,6 +128,12 @@ var xapiStatement = async function (s) {
} else if (s.result.response == "Fail") {
var scaled = 1.0;
negative = true;
} if (s.result.score != null) {
var scaled = s.result.score.scaled;
if (scaled > 0.7)
negative = false;
else
negative = true;
} else
return;

Expand Down

0 comments on commit a52d4f4

Please sign in to comment.