@didask/scol-r 1.0.1-beta-4 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/SCORMAdapter.js +10 -10
- package/package.json +1 -1
package/lib/SCORMAdapter.js
CHANGED
|
@@ -154,29 +154,29 @@ var SCORMAdapter = /** @class */ (function () {
|
|
|
154
154
|
return this.LMSGetValue("cmi.launch_data");
|
|
155
155
|
};
|
|
156
156
|
SCORMAdapter.prototype.getLearnerId = function () {
|
|
157
|
-
var
|
|
157
|
+
var CMIVariableName = this._isSCORM2004
|
|
158
158
|
? "cmi.learner_id"
|
|
159
159
|
: "cmi.core.student_id";
|
|
160
|
-
return this.LMSGetValue(
|
|
160
|
+
return this.LMSGetValue(CMIVariableName);
|
|
161
161
|
};
|
|
162
162
|
SCORMAdapter.prototype.setScore = function (score) {
|
|
163
|
-
var
|
|
163
|
+
var CMIVariableName = this._isSCORM2004
|
|
164
164
|
? "cmi.score.raw"
|
|
165
165
|
: "cmi.core.score.raw";
|
|
166
|
-
this.LMSSetValue(
|
|
166
|
+
this.LMSSetValue(CMIVariableName, score);
|
|
167
167
|
};
|
|
168
168
|
SCORMAdapter.prototype.getScore = function () {
|
|
169
|
-
var
|
|
169
|
+
var CMIVariableName = this._isSCORM2004
|
|
170
170
|
? "cmi.score.raw"
|
|
171
171
|
: "cmi.core.score.raw";
|
|
172
|
-
var score = this.LMSGetValue(
|
|
172
|
+
var score = this.LMSGetValue(CMIVariableName);
|
|
173
173
|
return score;
|
|
174
174
|
};
|
|
175
175
|
SCORMAdapter.prototype.getLessonStatus = function () {
|
|
176
|
-
var
|
|
176
|
+
var CMIVariableName = this._isSCORM2004
|
|
177
177
|
? "cmi.completion_status"
|
|
178
178
|
: "cmi.core.lesson_status";
|
|
179
|
-
return this.LMSGetValue(
|
|
179
|
+
return this.LMSGetValue(CMIVariableName);
|
|
180
180
|
};
|
|
181
181
|
SCORMAdapter.prototype.setLessonStatus = function (lessonStatus) {
|
|
182
182
|
if (this._isSCORM2004) {
|
|
@@ -202,7 +202,7 @@ var SCORMAdapter = /** @class */ (function () {
|
|
|
202
202
|
}
|
|
203
203
|
};
|
|
204
204
|
SCORMAdapter.prototype.setSessionTime = function (msSessionTime) {
|
|
205
|
-
var
|
|
205
|
+
var CMIVariableName = this._isSCORM2004
|
|
206
206
|
? "cmi.session_time"
|
|
207
207
|
: "cmi.core.session_time";
|
|
208
208
|
var duration;
|
|
@@ -221,7 +221,7 @@ var SCORMAdapter = /** @class */ (function () {
|
|
|
221
221
|
duration =
|
|
222
222
|
formattedHours + ":" + formattedMinutes + ":" + formattedSeconds;
|
|
223
223
|
}
|
|
224
|
-
this.LMSSetValue(
|
|
224
|
+
this.LMSSetValue(CMIVariableName, duration);
|
|
225
225
|
};
|
|
226
226
|
Object.defineProperty(SCORMAdapter.prototype, "objectivesAreAvailable", {
|
|
227
227
|
get: function () {
|