Storyline - Moodle SetStatus

Aug 26, 2016

My 2 questions related to Storyline 2 default quiz (MCQ) are:

1.) Can i restrict Storyline from sending score (cmi.score.raw) for each interaction / quiz on clicking the Submit button to LMS ? It always send a score to LMS as soon as the user has clicked the Submit button. I want it to send only a final score at the end in result slide. I can't use other than default quiz and result slide because i want each interaction to be stored in Moodle LMS which i think is not possible with a custom made quiz using JS.

2.) Can i manually set status to Incomplete until a user has answered all questions and reached the result slide ? If anyone exits the course only answer 1 or 2 question, not all, it will be marked as Incomplete in LMS. I have tried with a JS method, but it doesn't seems to work in a default AS2 quiz with a result slide.

Now regarding the issue :

I am developing a simple course in Articulate Storyline 2 (version 2.8) using Storyline's default / inbuilt quizzes. I am only using multiple choice.

I am publishing it as a SCORM 1.2 package with LMS Reporting set to : Passed / Incomplete.

The scorm package will be uploaded to Moodle 3.0.2

I have enabled debugging in Storyline as well as in Moodle to see the Activity Log.

If a user exit the course without answering any question, it marked as Incomplete in Moodle which is fine.

But the issue which i am facing is that whenever a user answers 1 question and exit the course or due to some reason can't complete it, Storyline sends a raw, min and max score for every interaction / quiz submitted. And the score gets stored in Moodle Report.  And the status is set as Failed and can't complete the quiz since it starts in Review Mode next time onwards. Only option left is to start a new attempt in Moodle.

It should only pass a final score in the result slide when a user has completed all questions.

Moreover,  since Storyline sends a raw score for every quiz individually, if for some reason a user can't complete the course, it's marked as Failed (as the user can't complete the whole quiz and have not reached the passing grade) and the user can't re-attempt the same quiz. A user has to start a new attempt in Moodle. Since an attempt is considered as Complete if the status is either Passed, Failed or Completed set by the SCORM package. It can be only re-attempted (in Moodle) if the status has been set as Incomplete by the package / course in the previous attempt.

Is there any workaround through a javascript or post-publish surgery so that i can restrict Storyline to not pass a score for each quiz or set the status as Incomplete for every quiz / interaction submitted until the result slide ?

I have tried using the Javascript method below for each quiz :

var player=GetPlayer();
var lmsAPI = parent;
lmsAPI.SetScore(0, 100, 0);

But it doesn't work. It can't set the status to Incomplete at end of each quiz submitted. I have set the trigger to execute the above JS when the user clicks the Submit button after the interaction has been submitted. It only passes a raw score score of 0 for every quiz but the status is set as Failed.


Any help will be highly appreciated.

PFA Storyline 2 file and SCORM 1.2 package.

Though it's a simple quiz, i can't think of any workaround.

15 Replies
Abhishek Roy

It will work in SCORM Cloud, but not in Moodle because Moodle doesn't fully supports SCORM 2004 specifications.

"3. Set completion status and success status
In SCORM 1.2, completion status and success status were rolled up into a single entity, cmi.core.lesson_status.  It had six potential values, including completed, incomplete, passed, failed.  In this world, it was impossible for the content to tell the LMS if a failed status meant that the user should be allowed to take the content again or not.  Was it failed because they hadn’t finished?  Who knew?

SCORM 2004, though, separates the concepts of passing and completing using two distinct data model elements:

cmi.complete_status (completed, incomplete, or unknown)
cmi.success_status (passed, failed, unknown)
This allows the content to be more expressive about whether a failure was final.  Each content vendor is welcome to their own interpretation here, but making use of both completion_status and success_status is important in SCORM 2004."

Russell Killips

Looking at the logs, I can only see articulate setting the lesson status twice. At the beginning of the course it is set to incomplete. Then it is set to complete at the end of the course. Im thinking that moodle is marking  the course as complete when it gets a score, even though articulate hasn't sent a complete status.

Abhishek Roy

Ok. So, is there any way to forcibly Set the Status to Incomplete through Storyline when someone exits the course midway ?

I really want to set it to Incomplete until it has reached result slide.

Currently a passed or failed status is set depending on the marks scored till anyone closes the window and the same attempt can't be taken. One has to start a new attempt in Moodle.
Even if one can re-attempt , the course starts in Review Mode and marks are not recorded.

Abhishek Roy

I have used a custom quiz with javascript to pass the score and status to lms only in the last result slide. it does perfectly. if a user closes the course halfway, it will be registered as Incomplete.

But, in a custom made quiz, it doesn't report interactions to Moodle or any LMS.
It reports interactions for each quiz / question with a default Storyline quiz.

Is there any way by using javascript or other so send interaction result for every quiz manually to Moodle like in default SL quiz ? i want to send score, correct response, user response, time taken, type for each quiz in Moodle ? Atleast i need to send score, user response, correct response for each quiz.

Can i use Storyline's LMS interaction reporting for SCORM 1.2 in a javascript call manually in every slide / quiz when the answer has been submitted ?

Russell Killips

I modified the SetScore function in the SCORMFunctions.js file. I created a variable called bSetScore and I set it to false. When set to false, the scores are not sent to the LMS.

In your course, when you want to turn Scoring back on, use this code.

var lmsAPI = parent;
lsmAPI.bSetScore = true;

In the sample story file, I put this code in the slide just before the results slide.

When you export your course, you will need to replace the SCORMFunctions.js file with the one that I modified.


Abhishek Roy

thank you so much Russell for your hard work. Appreciate that really.

i have also found a way to send intertions for a custom made quiz for each slide using a js trigger.

var lmsAPI = parent;
var player=GetPlayer();
var score1=player.GetVar("score1");
var optionsq1=player.GetVar("optionsq1");
var date = new Date();

//this calls the SCORM API to record a custom interaction

//(strID, strResponse, blnCorrect, strCorrectResponse, strDescription, //intWeighting, intLatency, strLearningObjectiveID, dtmTime, //scormInteractionType)

lmsAPI.SCORM_RecordInteraction("Question1",optionsq1 ,true ,"Correct_Option1" ,"This is Question 1" ,score1 ,"" ,"Course1" ,date , "choice");

the only issue  now is that everytime i click the button which executes the trigger, a duplicate interaction is sent to the lms and it gets stored which makes it confusing. how can the duplicate entries avoided ? can it be overwritten on top of previous interaction for each quiz ?

I have attached a story file with custom quiz.

Philipp Steingrebe

The same problem is driving me crazy. Did you find any solution yet?
There must be a way to say moodle to wait for the setStatus-command and not to set lesson_status based on the submitted score.raw value on it's own.

Or there must be a way to stop storyline to submit the score on any interaction and only submit it on the final(!) result slide.

Ashley Terwilliger-Pollard

Aw, sorry Philipp that this is still causing you such headaches. I don't know if Abhisek was able to change this behavior with his course, but in case he's not  still subscribed here, as the post is a bit older - you could always use the "contact me" button on a ELH users' profile to reach out to them directly! Best of luck with your project!