Forum Discussion
Storyline - Moodle SetStatus
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);
SetStatus("incomplete")
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.
- RussellKillips-Community Member
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.
- AbhishekRoyCommunity Member
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.
- PhilippSteingreCommunity Member
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. 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!
- GhanshyamParekhCommunity Member
Hi, I am facing the same issue where we need to allow users to re-visit the courses while completing the final quiz. Please advise if any solution or workaround found for this issue.