var thedoc = getDisplayDocument();
var thepage = GetCurrentPageID();
thedoc.getElementById(thepage).style.left = "0px";
These texts come from File > Lectora Preference > Publish Strings.
You should not replace the text directly in the table as this would edit the Default Set. Export the text, put your translations into the exported file, save it with a new name, e.g. “Spanish”. Then “Add” a new Publish Strings Set, give it a name and “Import” the translated file to that set. Then you can switch between Default and Spanish.
I saw, you’re setting “AICC_Lesson_Status” only depending on the score. I didn’t test it in a LMS but if I imagine the course running in moodle, whatever the user achieves in the test, “AICC_Lesson_Status” is set to a completion state, i.e. either “completed” or “failed” (which also means “completed”).
If the user doesn’t close the window, your internal attempts counting should work, the running session doesn’t really recognize itself being completed. Values may be overwritten, but …
If the user closes the window, moodle will finish the Scorm attempt. The next time the course is opened, a new Scorm attempt is started. This means the course is again “not attempted” with all variables having their initial values, e.g. “ExamAttempts” = 0.
In summary: You should keep AICC_Lesson_Status “incomplete” (by not changing it) until Right_to_Work_Validation_Score = 100 OR ExamAttempts = 3 (or 2 if you start counting at 0)