SCORM 1.2 course returns an empty string in Moodle

Jun 11, 2016

SCORM 1.2 course can't pass score (cmi.core.score.raw) to Moodle LMS on mobile devices only. It returns an empty string in Moodle.

I have developed a sample test file in Articulate Storyline 2 and published it as SCORM 1.2 which don't seem to trigger the right function call ( LMSSetValue cmi.core.score.raw ) in Moodle LMS.

In order to pass the score value to Moodle, i used the following JS code in a trigger on timeline start at end of course :

/*Get player to reference*/

var player = GetPlayer();

/*get LMS API*/

var lmsAPI = parent;

/*set score; the first number is the score*/

lmsAPI.SetScore(player.GetVar("14543GameScore"), 100, 0);

/*set status; possible values: "completed","incomplete", "failed", "passed"*/

if (player.GetVar("14543GameScore")>= player.GetVar("14543PassingPercentage"))
{
SetStatus("passed");
}
else
{
SetStatus("failed");
}


I published it as SCORM 1.2 course with following settings :

Report Status to LMS : Passed / Failed
Track using number of slides viewed
Include HTML5 output (for mobile devices)

After uploading it to Moodle as SCORM 1.2 package, it can't pass score value and status to Moodle on mobile devices only.
But same course passes score and status to Moodle on desktop.

So, i tested it on SCORM Cloud and Blackboard LMS to identify any issue with my course. To my surprise, it can easily pass score and status to SCORM Cloud and Balckboard on mobile devices as well as desktop.

I have tested with Moodle 2.6.5 and 3.1 with debugging and API Activity Log enabled.
I noticed in the log it can't trigger the right function call, i.e. LMSSetValue (cmi.core.score.raw, min and max) on mobile devices.

I have also attached the Articulate Storyline 2 course file (.story) , published output as SCORM 1.2 and Moodle API Activity Log.

48 Replies
Abhishek Roy

i am facing the issue only with mobile devices in Moodle LMS (2.6.5 , 2.7 , 3.1). course works fine on desktop in Moodle LMS.

same course works fine in Scorm Cloud on both desktop and mobile device.

i even tried this code from elearning brother's site

https://support.elearningbrothers.com/entries/23642122-Passing-over-Storyline-Game-data-to-your-LMS


/*Get player to reference*/
var player = GetPlayer();

/*get LMS API*/
var lmsAPI = parent;

/*set score; the first number is the score*/
lmsAPI.SetScore(player.GetVar(“zCardStacklQuestionsAnsweredCorrect”), 100, 0);

/*set status; possible values: ”completed”,”incomplete”, “failed”, “passed”*/
SetStatus(“completed”)

Abhishek Roy

yes, i have tested e from both desktop and mobile device as well. and it's working fine . it can capture score and status from a mobile device on scorm cloud.

but same course can't pass score to Moodle LMS ( version : 3.1 , 2.7, 2.6.5) on mobile device.
however, it passes both score and status to Moodle on desktop.

i have tried only passing status to Moodle from a mobile device. and it works fine.
the issue seems to be with score on a mobile device.

Abhishek Roy

also, tried this:

/*Get player to reference*/

var player = GetPlayer();

/*get LMS API*/

var lmsAPI = parent;

/*set score; the first number is the score*/

lmsAPI.SetScore(player.GetVar("14543GameScore"), 100, 0);

/*set status; possible values: "completed","incomplete", "failed", "passed"*/

if (player.GetVar("14543GameScore")>= player.GetVar("14543PassingPercentage"))
{
SetStatus("passed");
}
else
{
SetStatus("failed");
}

Abhishek Roy

today i created a demo storyline 2 course with default quiz and graded result slide. i published it as scorm 1.2 with html5 output. it is working absolutely fine from a mobile device. it passes score and status to Moodle LMS.

therefore it might be there is an issue with the following js code when the course is lauched on mobile through a LMS. 

lmsAPI.SetScore(player.GetVar(“zCardStacklQuestionsAnsweredCorrect”), 100, 0);

Abhishek Roy

as i said earlier, i have tested the same on scorm cloud. and it's working fine from both desktop and mobile.

but the problem is with Moodle LMS on mobile. it can't pass score.
it's working fine on desktop by passing score to Moodle.

i have tested with a default storyline quiz and result slide. it's passing score and status to Moodle from mobile.

so, i came to conclusion that there might be issue with the js code (passing score. SetScore) on mobile with Moodle.

Abhishek Roy

here is the Scorm API Activity Log of Moodle of custom quiz with the js code :

Wed, 15 Jun 2016 05:44:57 GMT: Moodle SCORM 1.2 API Loaded, Activity: test8, SCO: test5_SCO
Wed, 15 Jun 2016 05:44:58 GMT: Moodle SCORM 1.2 API Loaded, Activity: test8, SCO: test5_SCO
Wed, 15 Jun 2016 05:45:08 GMT: LMSInitialize("", "") => 0
Wed, 15 Jun 2016 05:45:08 GMT: LMSGetValue("cmi.core.lesson_mode") - normal => 0
Wed, 15 Jun 2016 05:45:08 GMT: LMSGetValue("cmi.core.lesson_mode") - normal => 0
Wed, 15 Jun 2016 05:45:08 GMT: LMSGetValue("cmi.core.lesson_status") - not attempted => 0
Wed, 15 Jun 2016 05:45:08 GMT: LMSSetValue("cmi.core.lesson_status", "incomplete") => 0
Wed, 15 Jun 2016 05:45:08 GMT: LMSSetValue("cmi.core.exit", "suspend") => 0
Wed, 15 Jun 2016 05:45:08 GMT: LMSGetValue("cmi.suspend_data") - => 0
Wed, 15 Jun 2016 05:45:08 GMT: LMSSetValue("cmi.core.session_time", "0000:00:00.3") => 0
Wed, 15 Jun 2016 05:45:10 GMT: Commit("", "") => 0
Wed, 15 Jun 2016 05:45:10 GMT: LMSCommit("AJAXResult", "true") => 0
Wed, 15 Jun 2016 05:45:10 GMT: LMSCommit("result", "true") => 0
Wed, 15 Jun 2016 05:45:10 GMT: LMSCommit("errorCode", "0") => 0
Wed, 15 Jun 2016 05:45:10 GMT: LMSSetValue("cmi.core.lesson_status", "incomplete") => 0
Wed, 15 Jun 2016 05:45:10 GMT: LMSSetValue("cmi.suspend_data", "") => 0
Wed, 15 Jun 2016 05:45:10 GMT: LMSSetValue("cmi.core.session_time", "0000:00:02.40") => 0
Wed, 15 Jun 2016 05:45:11 GMT: Commit("", "") => 0
Wed, 15 Jun 2016 05:45:11 GMT: LMSCommit("AJAXResult", "true") => 0
Wed, 15 Jun 2016 05:45:11 GMT: LMSCommit("result", "true") => 0
Wed, 15 Jun 2016 05:45:11 GMT: LMSCommit("errorCode", "0") => 0
Wed, 15 Jun 2016 05:45:34 GMT: LMSSetValue("cmi.suspend_data", "") => 0
Wed, 15 Jun 2016 05:45:34 GMT: LMSSetValue("cmi.core.session_time", "0000:00:26.20") => 0
Wed, 15 Jun 2016 05:45:39 GMT: Commit("", "") => 0
Wed, 15 Jun 2016 05:45:39 GMT: LMSCommit("AJAXResult", "true") => 0
Wed, 15 Jun 2016 05:45:39 GMT: LMSCommit("result", "true") => 0
Wed, 15 Jun 2016 05:45:39 GMT: LMSCommit("errorCode", "0") => 0
Wed, 15 Jun 2016 05:45:40 GMT: LMSSetValue("cmi.suspend_data", "") => 0
Wed, 15 Jun 2016 05:45:52 GMT: LMSSetValue("cmi.core.lesson_status", "passed") => 0
Wed, 15 Jun 2016 05:45:52 GMT: LMSSetValue("cmi.suspend_data", "") => 0
Wed, 15 Jun 2016 05:45:52 GMT: LMSSetValue("cmi.core.session_time", "0000:00:44.69") => 0
Wed, 15 Jun 2016 05:45:57 GMT: Commit("", "") => 0
Wed, 15 Jun 2016 05:45:57 GMT: LMSCommit("AJAXResult", "true") => 0
Wed, 15 Jun 2016 05:45:57 GMT: LMSCommit("result", "true") => 0
Wed, 15 Jun 2016 05:45:57 GMT: LMSCommit("errorCode", "0") => 0
Wed, 15 Jun 2016 05:45:57 GMT: LMSSetValue("cmi.suspend_data", "2m145060ji1001111a0101101111C02v12g12v1n6qw4gQynbD7.6d1x61vdoNT1^1^0jh03$_287600029500000") => 0
Wed, 15 Jun 2016 05:45:57 GMT: LMSSetValue("cmi.core.session_time", "0000:00:49.14") => 0
Wed, 15 Jun 2016 05:45:59 GMT: Commit("", "") => 0
Wed, 15 Jun 2016 05:45:59 GMT: LMSCommit("AJAXResult", "true") => 0
Wed, 15 Jun 2016 05:45:59 GMT: LMSCommit("result", "true") => 0
Wed, 15 Jun 2016 05:45:59 GMT: LMSCommit("errorCode", "0") => 0
Wed, 15 Jun 2016 05:45:59 GMT: LMSSetValue("cmi.suspend_data", "2m145060ji1001111a0101101111C02v12g12v1n6qw4gQynbD7.6d1x61vdoNT1^1^0jh03$_287600029500000") => 0
Wed, 15 Jun 2016 05:45:59 GMT: LMSSetValue("cmi.core.session_time", "0000:00:51.70") => 0
Wed, 15 Jun 2016 05:46:03 GMT: Commit("", "") => 0
Wed, 15 Jun 2016 05:46:03 GMT: LMSCommit("AJAXResult", "true") => 0
Wed, 15 Jun 2016 05:46:03 GMT: LMSCommit("result", "true") => 0
Wed, 15 Jun 2016 05:46:03 GMT: LMSCommit("errorCode", "0") => 0
Wed, 15 Jun 2016 05:46:03 GMT: LMSSetValue("cmi.suspend_data", "2B145060ed1001011501011C02v12g12v1n6qw4gQynbD7.6jwhpoWfF6t1^1^0Dh03$_2876000295000k02x0c34007600101^0000") => 0
Wed, 15 Jun 2016 05:46:03 GMT: LMSSetValue("cmi.core.session_time", "0000:00:55.71") => 0
Wed, 15 Jun 2016 05:46:17 GMT: Commit("", "") => 0
Wed, 15 Jun 2016 05:46:17 GMT: LMSCommit("AJAXResult", "true") => 0
Wed, 15 Jun 2016 05:46:17 GMT: LMSCommit("result", "true") => 0
Wed, 15 Jun 2016 05:46:17 GMT: LMSCommit("errorCode", "0") => 0
Wed, 15 Jun 2016 05:46:17 GMT: LMSSetValue("cmi.suspend_data", "2B145060ed1001011501011C02v12g12v1n6qw4gQynbD7.6jwhpoWfF6t1^1^0Dh03$_2876000295000k02x0c34007600101^0000") => 0
Wed, 15 Jun 2016 05:46:17 GMT: LMSSetValue("cmi.core.session_time", "0000:01:09.5") => 0
Wed, 15 Jun 2016 05:46:19 GMT: Commit("", "") => 0
Wed, 15 Jun 2016 05:46:19 GMT: LMSCommit("AJAXResult", "true") => 0
Wed, 15 Jun 2016 05:46:19 GMT: LMSCommit("result", "true") => 0
Wed, 15 Jun 2016 05:46:20 GMT: LMSCommit("errorCode", "0") => 0
Wed, 15 Jun 2016 05:46:20 GMT: LMSSetValue("cmi.suspend_data", "2B145060ed1001011501011C02v12g12v1n6qw4gQynbD7.6jwhpoWfF6t1^1^0Dh03$_2876000295000k02x0c34007600101^0000") => 0
Wed, 15 Jun 2016 05:46:44 GMT: LMSSetValue("cmi.core.session_time", "0000:01:36.56") => 0
Wed, 15 Jun 2016 05:46:44 GMT: LMSSetValue("cmi.core.exit", "suspend") => 0
Wed, 15 Jun 2016 05:46:49 GMT: Commit("", "") => 0
Wed, 15 Jun 2016 05:46:49 GMT: LMSCommit("AJAXResult", "true") => 0
Wed, 15 Jun 2016 05:46:49 GMT: LMSCommit("result", "true") => 0
Wed, 15 Jun 2016 05:46:49 GMT: LMSCommit("errorCode", "0") => 0
Wed, 15 Jun 2016 05:46:51 GMT: LMSFinish("AJAXResult", "true") => 0
Wed, 15 Jun 2016 05:46:51 GMT: LMSFinish("result", "true") => 0
Wed, 15 Jun 2016 05:46:51 GMT: LMSFinish("", "") => 0

 

note : it can't pass the cmi.core.score.raw, min and max

Abhishek Roy

and here is the default SL quiz

SCORM API Activity Log
Wed, 15 Jun 2016 06:20:50 GMT: Moodle SCORM 1.2 API Loaded, Activity: qqq, SCO: test123_SCO
Wed, 15 Jun 2016 06:20:50 GMT: Moodle SCORM 1.2 API Loaded, Activity: qqq, SCO: test123_SCO
Wed, 15 Jun 2016 06:20:53 GMT: LMSInitialize("", "") => 0
Wed, 15 Jun 2016 06:20:53 GMT: LMSGetValue("cmi.core.lesson_mode") - normal => 0
Wed, 15 Jun 2016 06:20:53 GMT: LMSGetValue("cmi.core.lesson_mode") - normal => 0
Wed, 15 Jun 2016 06:20:53 GMT: LMSGetValue("cmi.core.lesson_status") - not attempted => 0
Wed, 15 Jun 2016 06:20:53 GMT: LMSSetValue("cmi.core.lesson_status", "incomplete") => 0
Wed, 15 Jun 2016 06:20:53 GMT: LMSSetValue("cmi.core.exit", "suspend") => 0
Wed, 15 Jun 2016 06:20:53 GMT: LMSGetValue("cmi.suspend_data") - => 0
Wed, 15 Jun 2016 06:20:53 GMT: LMSSetValue("cmi.core.session_time", "0000:00:00.2") => 0
Wed, 15 Jun 2016 06:20:54 GMT: Commit("", "") => 0
Wed, 15 Jun 2016 06:20:54 GMT: LMSCommit("AJAXResult", "true") => 0
Wed, 15 Jun 2016 06:20:54 GMT: LMSCommit("result", "true") => 0
Wed, 15 Jun 2016 06:20:54 GMT: LMSCommit("errorCode", "0") => 0
Wed, 15 Jun 2016 06:20:54 GMT: LMSSetValue("cmi.core.lesson_status", "incomplete") => 0
Wed, 15 Jun 2016 06:20:54 GMT: LMSSetValue("cmi.suspend_data", "") => 0
Wed, 15 Jun 2016 06:20:54 GMT: LMSSetValue("cmi.core.session_time", "0000:00:01.6") => 0
Wed, 15 Jun 2016 06:20:55 GMT: Commit("", "") => 0
Wed, 15 Jun 2016 06:20:55 GMT: LMSCommit("AJAXResult", "true") => 0
Wed, 15 Jun 2016 06:20:56 GMT: LMSCommit("result", "true") => 0
Wed, 15 Jun 2016 06:20:56 GMT: LMSCommit("errorCode", "0") => 0
Wed, 15 Jun 2016 06:21:03 GMT: LMSSetValue("cmi.suspend_data", "") => 0
Wed, 15 Jun 2016 06:21:03 GMT: LMSSetValue("cmi.core.session_time", "0000:00:09.96") => 0
Wed, 15 Jun 2016 06:21:07 GMT: Commit("", "") => 0
Wed, 15 Jun 2016 06:21:07 GMT: LMSCommit("AJAXResult", "true") => 0
Wed, 15 Jun 2016 06:21:07 GMT: LMSCommit("result", "true") => 0
Wed, 15 Jun 2016 06:21:07 GMT: LMSCommit("errorCode", "0") => 0
Wed, 15 Jun 2016 06:21:09 GMT: LMSSetValue("cmi.suspend_data", "") => 0
Wed, 15 Jun 2016 06:21:11 GMT: LMSGetValue("cmi.interactions._count") - 0 => 0
Wed, 15 Jun 2016 06:21:11 GMT: LMSSetValue("cmi.interactions_0.id", "Scene1_Slide1_TrueFalse_0_0") => 0
Wed, 15 Jun 2016 06:21:12 GMT: LMSSetValue("cmi.interactions_0.type", "true-false") => 0
Wed, 15 Jun 2016 06:21:12 GMT: LMSSetValue("cmi.interactions_0.student_response", "t") => 0
Wed, 15 Jun 2016 06:21:12 GMT: LMSSetValue("cmi.interactions_0.correct_responses_0.pattern", "t") => 0
Wed, 15 Jun 2016 06:21:12 GMT: LMSSetValue("cmi.interactions_0.result", "correct") => 0
Wed, 15 Jun 2016 06:21:12 GMT: LMSSetValue("cmi.interactions_0.weighting", "1") => 0
Wed, 15 Jun 2016 06:21:12 GMT: LMSSetValue("cmi.interactions_0.objectives_0.id", "test123") => 0
Wed, 15 Jun 2016 06:21:12 GMT: LMSSetValue("cmi.interactions_0.time", "11:51:11") => 0
Wed, 15 Jun 2016 06:21:12 GMT: LMSSetValue("cmi.core.score.raw", "33.33") => 0
Wed, 15 Jun 2016 06:21:12 GMT: LMSSetValue("cmi.core.score.max", "100") => 0
Wed, 15 Jun 2016 06:21:12 GMT: LMSSetValue("cmi.core.score.min", "0") => 0
Wed, 15 Jun 2016 06:21:12 GMT: LMSSetValue("cmi.suspend_data", "2T145060ji1001111a0101101111A101^1^1^n6h7cDVJedP6.6ZfwnC2jRL81^1^0PLcb101001515103vG0q34007600101^970030111^34000000002000") => 0
Wed, 15 Jun 2016 06:21:12 GMT: LMSSetValue("cmi.core.session_time", "0000:00:19.19") => 0
Wed, 15 Jun 2016 06:21:14 GMT: Commit("", "") => 0
Wed, 15 Jun 2016 06:21:14 GMT: LMSCommit("AJAXResult", "true") => 0
Wed, 15 Jun 2016 06:21:14 GMT: LMSCommit("result", "true") => 0
Wed, 15 Jun 2016 06:21:14 GMT: LMSCommit("errorCode", "0") => 0
Wed, 15 Jun 2016 06:21:15 GMT: LMSSetValue("cmi.suspend_data", "2T145060ji1001111a0101101111A101^1^1^n6h7cDVJedP6.6ZfwnC2jRL81^1^0PLcb101001515103vG0q34007600101^970030111^34000000002000") => 0
Wed, 15 Jun 2016 06:21:19 GMT: LMSGetValue("cmi.interactions._count") - 1 => 0
Wed, 15 Jun 2016 06:21:19 GMT: LMSSetValue("cmi.interactions_1.id", "Scene1_Slide2_TrueFalse_0_0") => 0
Wed, 15 Jun 2016 06:21:19 GMT: LMSSetValue("cmi.interactions_1.type", "true-false") => 0
Wed, 15 Jun 2016 06:21:19 GMT: LMSSetValue("cmi.interactions_1.student_response", "f") => 0
Wed, 15 Jun 2016 06:21:19 GMT: LMSSetValue("cmi.interactions_1.correct_responses_0.pattern", "f") => 0
Wed, 15 Jun 2016 06:21:19 GMT: LMSSetValue("cmi.interactions_1.result", "correct") => 0
Wed, 15 Jun 2016 06:21:19 GMT: LMSSetValue("cmi.interactions_1.weighting", "1") => 0
Wed, 15 Jun 2016 06:21:19 GMT: LMSSetValue("cmi.interactions_1.objectives_0.id", "test123") => 0
Wed, 15 Jun 2016 06:21:19 GMT: LMSSetValue("cmi.interactions_1.time", "11:51:19") => 0
Wed, 15 Jun 2016 06:21:19 GMT: LMSSetValue("cmi.core.score.raw", "66.66") => 0
Wed, 15 Jun 2016 06:21:19 GMT: LMSSetValue("cmi.core.score.max", "100") => 0
Wed, 15 Jun 2016 06:21:19 GMT: LMSSetValue("cmi.core.score.min", "0") => 0
Wed, 15 Jun 2016 06:21:20 GMT: LMSSetValue("cmi.suspend_data", "2M26506070on1001211f010110111101211A101^1^1^n6h7cDVJedP6.60ZGT9P0Utn1^1^0~2y1Lcb101001515103vG0q34007600101^970030111^3400000Lcb101001515113V41q3400970030111^7600101^3400000002000") => 0
Wed, 15 Jun 2016 06:21:20 GMT: LMSSetValue("cmi.core.session_time", "0000:00:26.61") => 0
Wed, 15 Jun 2016 06:21:22 GMT: Commit("", "") => 0
Wed, 15 Jun 2016 06:21:22 GMT: LMSCommit("AJAXResult", "true") => 0
Wed, 15 Jun 2016 06:21:22 GMT: LMSCommit("result", "true") => 0
Wed, 15 Jun 2016 06:21:22 GMT: LMSCommit("errorCode", "0") => 0
Wed, 15 Jun 2016 06:21:22 GMT: LMSSetValue("cmi.suspend_data", "2M26506070on1001211f010110111101211A101^1^1^n6h7cDVJedP6.60ZGT9P0Utn1^1^0~2y1Lcb101001515103vG0q34007600101^970030111^3400000Lcb101001515113V41q3400970030111^7600101^3400000002000") => 0
Wed, 15 Jun 2016 06:21:25 GMT: LMSGetValue("cmi.interactions._count") - 2 => 0
Wed, 15 Jun 2016 06:21:25 GMT: LMSSetValue("cmi.interactions_2.id", "Scene1_Slide3_TrueFalse_0_0") => 0
Wed, 15 Jun 2016 06:21:25 GMT: LMSSetValue("cmi.interactions_2.type", "true-false") => 0
Wed, 15 Jun 2016 06:21:25 GMT: LMSSetValue("cmi.interactions_2.student_response", "t") => 0
Wed, 15 Jun 2016 06:21:25 GMT: LMSSetValue("cmi.interactions_2.correct_responses_0.pattern", "f") => 0
Wed, 15 Jun 2016 06:21:25 GMT: LMSSetValue("cmi.interactions_2.result", "wrong") => 0
Wed, 15 Jun 2016 06:21:25 GMT: LMSSetValue("cmi.interactions_2.weighting", "1") => 0
Wed, 15 Jun 2016 06:21:25 GMT: LMSSetValue("cmi.interactions_2.objectives_0.id", "test123") => 0
Wed, 15 Jun 2016 06:21:25 GMT: LMSSetValue("cmi.interactions_2.time", "11:51:25") => 0
Wed, 15 Jun 2016 06:21:25 GMT: LMSSetValue("cmi.core.score.raw", "66.66") => 0
Wed, 15 Jun 2016 06:21:25 GMT: LMSSetValue("cmi.core.score.max", "100") => 0
Wed, 15 Jun 2016 06:21:25 GMT: LMSSetValue("cmi.core.score.min", "0") => 0
Wed, 15 Jun 2016 06:21:26 GMT: LMSSetValue("cmi.suspend_data", "2C3850607080ts1001311k01011011110121101311A101^1^1^n6h7cDVJedP6.692wCslWEpR1^1^0~2h2Lcb101001515103vG0q34007600101^970030111^3400000Lcb101001515113V41q3400970030111^7600101^3400000Lcb101021010103IE0q34007600101^970020111^340000002000") => 0
Wed, 15 Jun 2016 06:21:26 GMT: LMSSetValue("cmi.core.session_time", "0000:00:32.67") => 0
Wed, 15 Jun 2016 06:21:30 GMT: Commit("", "") => 0
Wed, 15 Jun 2016 06:21:30 GMT: LMSCommit("AJAXResult", "true") => 0
Wed, 15 Jun 2016 06:21:30 GMT: LMSCommit("result", "true") => 0
Wed, 15 Jun 2016 06:21:30 GMT: LMSCommit("errorCode", "0") => 0
Wed, 15 Jun 2016 06:21:30 GMT: LMSSetValue("cmi.core.score.raw", "66.66666666666667") => 0
Wed, 15 Jun 2016 06:21:30 GMT: LMSSetValue("cmi.core.score.max", "100") => 0
Wed, 15 Jun 2016 06:21:30 GMT: LMSSetValue("cmi.core.score.min", "0") => 0
Wed, 15 Jun 2016 06:21:30 GMT: LMSSetValue("cmi.core.lesson_status", "passed") => 0
Wed, 15 Jun 2016 06:21:30 GMT: LMSSetValue("cmi.suspend_data", "2C3850607080ts1001311k01011011110121101311A101^1^1^n6h7cDVJedP6.692wCslWEpR1^1^0~2h2Lcb101001515103vG0q34007600101^970030111^3400000Lcb101001515113V41q3400970030111^7600101^3400000Lcb101021010103IE0q34007600101^970020111^340000002000") => 0
Wed, 15 Jun 2016 06:21:30 GMT: LMSSetValue("cmi.core.session_time", "0000:00:37.9") => 0
Wed, 15 Jun 2016 06:21:31 GMT: Commit("", "") => 0
Wed, 15 Jun 2016 06:21:31 GMT: LMSCommit("AJAXResult", "true") => 0
Wed, 15 Jun 2016 06:21:31 GMT: LMSCommit("result", "true") => 0
Wed, 15 Jun 2016 06:21:31 GMT: LMSCommit("errorCode", "0") => 0
Wed, 15 Jun 2016 06:21:32 GMT: LMSSetValue("cmi.suspend_data", "2C3850607080ts1001311k01011011110121101311A101^1^1^n6h7cDVJedP6.692wCslWEpR1^1^0~2h2Lcb101001515103vG0q34007600101^970030111^3400000Lcb101001515113V41q3400970030111^7600101^3400000Lcb101021010103IE0q34007600101^970020111^340000002000") => 0
Wed, 15 Jun 2016 06:21:44 GMT: LMSSetValue("cmi.core.session_time", "0000:00:50.46") => 0
Wed, 15 Jun 2016 06:21:44 GMT: LMSSetValue("cmi.core.exit", "suspend") => 0
Wed, 15 Jun 2016 06:21:47 GMT: Commit("", "") => 0
Wed, 15 Jun 2016 06:21:47 GMT: LMSCommit("AJAXResult", "true") => 0
Wed, 15 Jun 2016 06:21:47 GMT: LMSCommit("result", "true") => 0
Wed, 15 Jun 2016 06:21:48 GMT: LMSCommit("errorCode", "0") => 0
Wed, 15 Jun 2016 06:21:48 GMT: LMSFinish("AJAXResult", "true") => 0
Wed, 15 Jun 2016 06:21:48 GMT: LMSFinish("result", "true") => 0
Wed, 15 Jun 2016 06:21:48 GMT: LMSFinish("", "") => 0


both quiz are run from mobile device.

Steve Flowers

So it's passing the status but not the score? Only thing I can figure is possibly the value from Storyline is being interpreted as a string rather than a number by that specific browser. It's exactly the same call Storyline itself uses. Since it works on the desktop, it's gotta be browser related. Try forcing the type to Number to see if it makes a difference.

lmsAPI.SetScore(Number(player.GetVar("14543GameScore")), 100, 0);

Abhishek Roy

Using this JS code, solves the problem :) Atlast found a solution after a month.

This works both on desktop (flash version) and mobile / tablet devices (html5 version) . It's specially for Moodle on mobile devices. Had to remove var lmsAPI = parent; to fix the issue .

/Get player to reference/

var player = GetPlayer();

/set score; the first number is the score/

lmsAPI.SetScore(player.GetVar("14543GameScore"), 100, 0);

/set status; possible values: "completed","incomplete", "failed", "passed"/

if (player.GetVar("14543GameScore")>= player.GetVar("14543PassingPercentage"))
{ SetStatus("passed"); }

else
{ SetStatus("failed"); }

This discussion is closed. You can start a new discussion or contact Articulate Support.