Percentage based on slides viewed

Re: Percentage based on slides viewed

by Brandon Jimenez -
Number of replies: 5

Hello Dan,

I have a follow-up question that might help us to find a workaround: is there any way of convert the cmi.suspend_data field of the DB into a human-readable form? A sort of parser to convert into an Object or JSON at least. Our team is using Storyline to create the SCORM 2004 4th Ed. packages, so we are receiving a long string but with no way of knowing the complete structure. 


3wd1~2Y1607080f090a04121g0e0b0c0d0h0i0j0k0l0m0n0o0p0q0r0s0t0u0v0w0x0y0z0A0B0C0D0E0F0G0H0I0J0K0L0M0N0O0P0Q0R0S0T0U0V0W0X0Y0Z0_0$00111~205~2Y41001X12~2N401012011120121201912013120141201Y1201a120181201512016120171201b1201c1201d1201e1201f1201g1201h1201i1201j1201k1201l1201m1201n1201o1201p1201q1201r1201s1201t1201u1201v1201w1201x1201y1201z1201A1201B1201C1201D1201E1201F1201G1201H1201I1201J1201K1201L1201M1201N1201O1201P1201Q1201R1201S1201T1201U1201V1201W1201X12K9$$$$30000v_player.68ecYXk0MV6.5uU8HIYfoXZ1^1^00~3y51~2g2cb101021010112Ef~21134003400r78000121^h_default_Selectedg680101^8_default340034003400T0R2EfL34003400340034003400q70020181^g_default_Visited00000~2t2cb101021010102Ef~2e134003400g680101^8_defaultr78000121^h_default_Selected34003400g600101^8_defaultT0R2EfL34003400340034003400q70020181^g_default_Visited00000~2g2cb101021010112Ef~21134003400r78000121^h_default_Selectedg680101^8_default340034003400T0R2EfL34003400340034003400q70020181^g_default_Visited00000~223cb101021010112Ef~2P134003400g680101^8_defaultg680101^8_defaultr78000121^h_default_SelectedA780401c1^q_default_Selected_Disabled34003400TR2EfL34003400340034003400q70020181^g_default_Visited000000~2K2cb101021010122Ef~2v13400g680101^8_defaultr78000121^h_default_Selectedg680101^8_defaultg680101^8_default340034003400T0R2EfL34003400340034003400q70020181^g_default_Visited00000~2K2cb101021010132Ef~2v13400r78000121^h_default_Selectedg680101^8_defaultg680101^8_defaultg680101^8_default340034003400T0R2EfL34003400340034003400q70020181^g_default_Visited00000~2K2cb101021010112Ef~2v13400g680101^8_defaultg680101^8_defaultr78000121^h_default_Selectedg680101^8_default340034003400T0R2EfL34003400340034003400q70020181^g_default_Visited00000~2K2cb101001212122Ef~2v13400g680101^8_defaultr78010121^h_default_Selectedg680101^8_defaultg680101^8_default340034003400TR2EfL34003400340034003400q70020181^g_default_Visited000000~2g2cb101021010102Ef~21134003400g680101^8_defaultr78000121^h_default_Selected340034003400T0R2EfL34003400340034003400q70020181^g_default_Visited00000~2a4cb101021010112Ef~2X234003400m690o0O3m0101^8_defaultm690o000i0101^8_defaultx79010o0L4n0121^h_default_Selectedx79010o0Q2l0121^h_default_Selectedx79010o0T1k0121^h_default_Selectedm690o0Z0j0101^8_default34003400TR2EfL34003400340034003400q70020181^g_default_Visited000000~2g2cb101001111102Ef~21134003400g680101^8_defaultr78010121^h_default_Selected340034003400TR2EfL34003400340034003400q70020181^g_default_Visited000000~2r3cb101021010112Ef~2c234003400g680101^8_defaultr78000121^h_default_Selectedr78000121^h_default_Selectedg680101^8_defaultg680101^8_defaultg680101^8_default34003400TR2WeL34003400340034003400q70020181^g_default_Visited000000~2g2cb1010011111029f~21134003400g680101^8_defaultr78010121^h_default_Selected340034003400TR2EfL34003400340034003400q70020181^g_default_Visited000000~2g2cb101001111102Ef~21134003400g680101^8_defaultr78010121^h_default_Selected340034003400TR2EfL34003400340034003400q70020181^g_default_Visited000000~2g2cb101001111102Ef~21134003400g680101^8_defaultr78010121^h_default_Selected340034003400TR2EfL34003400340034003400q70020181^g_default_Visited000000~2K2cb101021010132Ef~2v13400r78000121^h_default_Selectedg680101^8_defaultg680101^8_defaultg680101^8_default340034003400T0R2EfL34003400340034003400q70020181^g_default_Visited00000~2K2cb101021010122Ef~2v13400g680101^8_defaultr78000121^h_default_Selectedg680101^8_defaultg680101^8_default340034003400T0R2EfL34003400340034003400q70020181^g_default_Visited00000~2K2cb101021010132Ef~2v13400r78000121^h_default_Selectedg680101^8_defaultg680101^8_defaultg680101^8_default340034003400T0R2EfL34003400340034003400q70020181^g_default_Visited00000~2K2cb101001212122Ef~2v13400g680101^8_defaultr78010121^h_default_Selectedg680101^8_defaultg680101^8_default340034003400TR2AeL34003400340034003400q70020181^g_default_Visited000000~2g2cb101001111102Ef~21134003400g680101^8_defaultr78010121^h_default_Selected340034003400TR2EfL34003400340034003400q70020181^g_default_Visited000000~2K2cb101021010112Ef~2v13400g680101^8_defaultg680101^8_defaultr78000121^h_default_Selectedg680101^8_default340034003400T0R2EfL34003400340034003400q70020181^g_default_Visited00000~2g2cb101021010102Ef~21134003400g680101^8_defaultr78000121^h_default_Selected340034003400T0R2EfL34003400340034003400q70020181^g_default_Visited00000~2g2cb101001111102Ef~21134003400g680101^8_defaultr78010121^h_default_Selected340034003400TR2EfL34003400340034003400q70020181^g_default_Visited000000~2W2cb101001212112Ef~2H13400m690o0Y0j0101^8_defaultg680101^8_defaultx79010o0Q2l0121^h_default_Selectedg680101^8_default340034003400TR2EfL34003400340034003400q70020181^g_default_Visited000000~2K2cb101021010112Ef~2v13400g680101^8_defaultg680101^8_defaultr78000121^h_default_Selectedg680101^8_default340034003400T0R2EfL34003400340034003400q70020181^g_default_Visited00000~2g2cb101021010102Ef~21134003400g680101^8_defaultr78000121^h_default_Selected340034003400T0R2EfL34003400340034003400q70020181^g_default_Visited000000000


I think that i can get the number of slides visited from there simply by having this in a more... readable way. Is there a SCORM API function that could help us with this. I checked scorm_13.js but still can't find the appropriate pattern. 


Thanks

Brandon


In reply to Brandon Jimenez

Re: Percentage based on slides viewed

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

Unfortunately there is no standard for how data is stored in suspend_data - its just a field available for content packages to store anything they want.

You might be able to work out how to turn that into something useful by searching for suspend_data in the storyline JS in your scorm package or you could try asking/searching the articulate forums - let us know if you figure something out!

In reply to Dan Marsden

Re: Percentage based on slides viewed

by Brandon Jimenez -

Hello


We were able to finally accomplish this by combining a few things we found along the way. However, the solution we found might only be applicable to Storyline and Moodle, meaning, as you pointed out, that most probably other authoring tools send the suspend_data in a different format.

1. we found a "decoder" of sorts - check it here: https://www.richeyweb.com/blog/23-personal-blog/130-a-brain-exercise-scorm-xapi

that returns an array
2. we extracted the data from the meta.xml file in the scorm package (2004 4th edition)

<?xml version="1.0" encoding="utf-8"?><meta xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><project id="xxxxxxxxxx" courseid="xxxxxxxxxxx" thumburl="story_content/thumbnail.jpg" title="xxxxxxx" datepublished="2018-08-23T16:20:14" version="1.0.0.0" flashdata="story_content/data.swf" html5data="mobile/data.json" mobiledata="mobile/data.gz" enabledownload="false" duration="xxxxxxxx" totalaudio="3397649" totalvideo="0"><description /><keywords /><slidemeta moniker="diapositive" monikerplural="diapositives" viewslides="51" slidecountdescription="51 diapositives" /><author name="xxxxxxx" email="" website="" /><application name="Articulate Storyline" version="3.18.16449.0" xmlversion="4.0" /></project></meta>

There's this property

viewslides="51
3. Compare the two and voila....ish


it's not exactly perfect but it got the job done.

Average of ratings: Useful (2)
In reply to Brandon Jimenez

Re: Percentage based on slides viewed

by Michael Richey -
Hi, I'm the author of the decoder PHP class.  To an earlier poster - yes, this will only help with Articulate Storyline created SCORM/xAPI modules.  They have another product that I'll be testing against in the near future, but as of now I can only confirm Articulate Storyline compatibility.


Looking over analytics, I found this forum thread.  I think it's super cool that my code is helping some people.


I recently updated it because my customer provided me with another version of output that I didn't previously cover.  My testing confirms it works with both versions of SCORM, and xAPI.

There is a bit that your post didn't cover, and that's slide uniqueness.  It decodes viewed slides, but if a user backtracks you may end up with a wrong slide count unless you perform an array_unique on the output.  If you fully translate, it will do this for you, but that isn't always necessary and you can save some processor cycles if you just array_unique the output of the slides method.


Anyway, I'm glad to see that it's helping.  Articulate has been less than cooperative regarding the data format.  People have been asking for a way to decode it for 4+ years and they decline every time.  The storage method sucks!  It's terribly inefficient.

In reply to Michael Richey

Re: Percentage based on slides viewed

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
Thanks Michael, 


Just had a read of your blog post too - as the maintainer of the SCORM plugin for Moodle I have some very similar feelings to yours wink

Could be a nice improvement to drop Michael's class into the core Moodle SCORM reports, would be good to have a way of displaying that data in a more useful format and Articulate must be a very high proportion of the SCORM packages used in Moodle these days.

Average of ratings: Useful (2)
In reply to Dan Marsden

Re: Percentage based on slides viewed

by Michael Richey -
I released the code on my site in GPL3, so you don't need my permission to use it in Moodle as I've already provided the source.  My AnyBase class used by this class is on GitHub, also GPL3.


I may release this in a GitHub repo later, when I've had a chance to look at some additional Articulate module outputs (apparently they have a new product that has no slides, so I don't know how that tracks yet). I'd also like to get my hands on some modules that contain quizzes, so I can decode that data as well.


You don't need my permission, but I'd like to give my blessing and best wishes. Attribution would be fantastic!