-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
have spoor overwrite the hard-coded 'learner info' data with real data (
#155) * amend adapt-stateful-session.js so that it replaces the hard-coded 'learner info' data with actual data from the LMS update offline_API_wrapper.js so that it has the student_name in "Lastname, Firstname" (as the SCORM spec requires) and also so that it has student_id/learner_id * version bump * change default Student surname from 'Student' to 'Surname' following code review * update student_id to match * defensive programming to account for situations when the _learnerInfo object might not be present in _globals
- Loading branch information
1 parent
9ea0093
commit 4461c53
Showing
4 changed files
with
23 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,8 @@ var API = { | |
if (!API.LMSFetch()) { | ||
this.data["cmi.core.lesson_status"] = "not attempted"; | ||
this.data["cmi.suspend_data"] = ""; | ||
this.data["cmi.core.student_name"] = "Test Student"; | ||
this.data["cmi.core.student_name"] = "Surname, Sam"; | ||
this.data["cmi.core.student_id"] = "[email protected]"; | ||
this.data["cmi.interactions._count"] = 0; | ||
API.LMSStore(true); | ||
} | ||
|
@@ -97,7 +98,8 @@ var API_1484_11 = { | |
if (!API_1484_11.LMSFetch()) { | ||
this.data["cmi.completion_status"] = "not attempted"; | ||
this.data["cmi.suspend_data"] = ""; | ||
this.data["cmi.learner_name"] = "Test Student"; | ||
this.data["cmi.learner_name"] = "Surname, Sam"; | ||
this.data["cmi.learner_id"] = "[email protected]"; | ||
this.data["cmi.interactions._count"] = 0; | ||
API_1484_11.LMSStore(true); | ||
} | ||
|