Featured Categories
-
Lectora®
Lectora® is the most trusted authoring tool in the world. Rock out your creativity! Author courses any way you like. Lectora adheres to best practices for Accessibility and Web Content Accessibility Guidelines (WCAG), offers responsive authoring for eLearning, and publishes to any LMS (Learning Management System).
-
CenarioVR®
Experience virtual reality through CenarioVR®, our training and virtual reality (VR) authoring software that allows you to create immersive learning in minutes! No coding required!
-
Rockstar Learning Platform®
Our Rockstar Learning Platform® has all the features you’ll love. Help your employees be better at their jobs, more valuable to your company, and most effective in servicing your customers.
-
The Training Arcade®
Level up your learner engagement with the Training Arcade®! The Training Arcade is a library of fun, mobile-ready, casual games that can be rapidly customized with your content to create effective gaming!
-
ELB Learning Content
Did you know that our AssetLibrary™ has over 120 million engaging, interactive, and awe-inspiring templates and assets to help you become an eLearning Rockstar®?
Can't set values in the LMS

I've been making custom eLearning for over 20 years and am used to being able to store whatever data that I need or want in the SCORM/AICC variables for location and suspend data. As I understand it, Lectora uses the location variable to store the last page visited. When it comes to suspend data, the documentation I have found states the following:
AICC_Core_Lesson - This variable contains information used by the published title to properly calculate the score of the user in the current title. If you modify the value of this variable within the content of a title that contains more than one automatically graded test, then the AICC_Score of the student cannot be properly updated and reflected to the AICC/SCORM Learning Management System (LMS). For all versions of SCORM including SCORM 2004, this variable is typically referred to by your LMS as cmi.suspend_data."
If this is accurate and still applicable, I interpret this to mean that Lectora only uses this variable if you have a course with multiple tests and it needs to do so as SCORM / AICC only has one variable to store the lesson score and therefore Lectora needs to store multiple test scores somewhere else so it can then calculate the overall score and store that in the single SCORM / AICC variable reserved for that. Although this is warning us that if we use that variable it will break things in muli-test courses it does say that we can write to it and use it.
I created a small test package that has the minimum amount of things Lectora requires to make a SCORM package. It contains two pages. The second page is an exit page that issues onShowExitClose. The first page contains the following onShowRunJS code:
var suspendData, suspendDataString;
if (AICC_Core_Lesson.getValue())
suspendData = AICC_Core_Lesson.getValue();
else
{
suspendData = {
page: 'abc123',
mod: 'two',
pi: 0
}
suspendDataString = JSON.stringify(suspendData);
AICC_Core_Lesson.set(suspendDataString);
}
VarAICC_Lesson_Status.set('completed');
VarAICC_Score.set(100);
The first time that I run this package, AICC_Core_Lesson is null, AICC_Lesson_Status is "incomplete" and AICC_Score is null. When I close the course and reopen, AICC_Core_Lesson and AICC_Lesson_Status are "incomplete" and AICC_Score is 100. So the above code works only for AICC_Score.
1. Can I use AICC_Core_Lesson to store custom data? If so, how do I do that and how do I keep Lectora from overwriting it? Also, why is Lectora storing the value, "incomplete" there when the documentation says that it only stores scores there if the course has multiple tests?
The other issue is every time I launch the course an alert pops up that declares that VarAICC_Lesson_Status is not defined. I have read on the forums that Lectora does not create a variable until it is actually used? I don't understand why it would do that? When I go to the Variable Manager and create a variable, I am defining it by definition. These variables should be available at all times within the course. In this specific case, we are talking about a variable that Lectora defined, not me - it's a reserved variable! And yet I'm being told it's undefined?
I have found that if I put a text box on the stage and reference variables inside of it, that takes care of this issue in most cases. However I have that text box on the first page of this project and I'm still being told that it's undefined. The text box shows the variable's values and after the first the launch they are all showing values.
2. Why is VarAICC_Lesson_Status popping an alert that it is undefined when the text box shows that it exists and contains a value?
Thank you for your time and help!
Comments
-
wheels Community Member, Administrator, Moderator, Rockstar Manager Posts: 702 eLearning ROCKSTAR Admin Team@fyoda.3494
Generally if you want to store something you should store it in a Lectora User defined variable by using a Modify Variable action. If the user variable you create is set to retain the variable value between sessions we'll save it for you.
The AICC prefixed variables do not start with Var, they are just referenced like AICC_Lesson_Status.set() although you shouldn't need to set it this way. Instead try the Modify Variable action.
Here is a little more information on how we map variables to the SCORM specification:
https://community.trivantis.com/forums/topic/using-scorm-1-2-and-scorm-2004-with-an-lms/0 -
Thank you for your response.
Removing "Var" from the AICC_Lesson_Status fixed that problem. No more alerts and Scorm Cloud reflects my setting it to completed. You stated a couple of times that I "shouldn't have to" do it that way (using js) and that I should just use the Lectora built in stuff. Writing and editing code in javascript is my preference as long as it works - less objects that one has to add to the Lectora flow chart (or whatever you all call it).
You did not answer my first question however, on whether or not I can use AICC_Core_Lesson to store what I want to store. Again, you said that I "should use" another method but did you not come out and say that I cannot use it. I've seen documentation that says that I can. But it doesn't work so far.
Concerning your suggestion that I store whatever I want in Lectora user defined variables and make sure they are checked "save between sessions" and Lectora will "save them for me" in the LMS. I just tested that.
It appears to save my variable but where is it saving it to? I checked the LMS data on Scorm Cloud and I cannot find my variable info there. Is it saving this data via cookies? If so what if the user has cookies disabled?
Thank you.0 -
wheels Community Member, Administrator, Moderator, Rockstar Manager Posts: 702 eLearning ROCKSTAR Admin TeamHi @fyoda.3494
Sorry for not answering your question. We store user variables in cmi.suspend_data and so setting AICC_Core_Lesson would interfere with that. If you use Lectora's Modify Variable action to set the AICC_Lesson_Status or AICC_Lesson_Score variables then we also handle calling LMSCommit() to ensure data is saved off to the LMS.
Hope this helps.
- Joe0
Categories
- 35.9K All Categories
- 110 ✫ Announcements
- 33.2K Lectora®
- 31.1K Lectora Discussions
- 29K Lectora Desktop
- 2K Lectora Online
- 2K Lectora Feature Requests
- 71 Lectora User Groups
- 27 ELB Learning Content
- 27 ELB Learning Content Discussions
- 345 CenarioVR®
- 205 CenarioVR Discussions
- 140 CenarioVR Feature Requests
- 44 Rockstar Learning Platform®
- 41 Rockstar Learning Platform Discussions
- 108 CourseMill®
- 108 CourseMill Discussions
- 48 ReviewLink®
- 48 ReviewLink Discussions
- 7 The Training Arcade®
- 7 The Training Arcade Discussions
- 938 All Things eLearning
- 39 eLearning Development
- 546 Learning Management System (LMS) Integration
- 333 Web Accessibility
- 1.2K ♪ The Green Room
- 9 Additional Learning Products