pipwerks / captivate-publishing-templates-redux Goto Github PK
View Code? Open in Web Editor NEWReplacements for Adobe Captivate's Publishing Templates; cleaned, modernized, with extra functionality
Replacements for Adobe Captivate's Publishing Templates; cleaned, modernized, with extra functionality
This may be more of a captivate functionality issue, not necessarily related to your changes, but no matter what I try, it seems I can't get the slide view completion to be honored. I have a video containing no quizes, and have the following Captivate settings:
-Report Status: Complete/Incomplete
-Report to LMS as: Percent
-Report Data: Slide Views Only, Slide View Completion of 100
-Reporting Level: Report Score
When the video launches, if I take the progress bar and drag it all the way to the last slide and play the last bit, then close, the LMS will report it as completed. I've tried this with CyberU as well as Scorm Cloud. I've also tried the same settings in both scorm 2004 and 1.2.
Any ideas would be greatly appreciated.
This bit (line 66-69 in scorm_support.js) checks the value store but doesn't actually update it with new values:
//If cached value exists, return it
if(typeof value_store[property] !== "undefined"){
return value_store[property];
}
Line 190 checks if the returned value from the cache matches the value Captivate is trying to set:
if(!cached_value || cached_value !== value){
... but never updates the value store either.
This means that the value store will always contain the first value that was set, which in turn means that:
Easy fix: Move the check for value equality from line 190 to the cmiCache function:
cmiCache = function(property, value){
var cachedValue;
//Ensure we have a valid property to work with
if(typeof property === "undefined"){ return false; }
//Replace all periods in CMI property names so we don't run into JS errors
property = property.replace(/\./g,'_');
cachedValue = value_store[property];
// ********* CHANGES START HERE ***************
//If cached value exists and is the same as new value, return it
if(typeof cachedValue !== "undefined" && cachedValue == value){
return cachedValue;
}
//Otherwise add to - or replace - in cache
if(typeof value !== "undefined"){
value_store[property] = value;
}
return false;
};
Since we now return false if the values don't match, we don't need the check in Captivate_DoExternalInterface:
if(cached_value === false) { // strict equality - could be an empty string
strErr = SCORM_API.SetValue(parameter, value);
setValueWasSuccessful = (strErr === "true");
} else {
...
Step 4 of the SCORM 2004 instructions (While you're in your SCORM_support folder, delete scorm_support.htm and scorm_support.swf, they won't be used anymore.) results in captivate throwing an error about these files not being present, when publishing the course.
I added them back in and then it published successfully.
Hi Philip,
First, thank you for your amazing work redoing these templates. The console logging and updated features are fantastic improvements. I have one minor suggestion... this is not a bug/issue.
As you probably already know, Captivate has some internal processes that dynamically generate the slides once it's fully loaded by the browser. If a Captivate Developer executes a call to cpCmndGotoSlideAndResume inside the customJavaScript() function, it may or may not work depending if the Captivate swf has finished loading all of the slides.
In the CaptivateMainTimeline.as file, you'll see a call to EI:
ExternalInterface.call("cpAllSlidesLoaded");
Not too many folks know about this call and it would be awesome to have a JS template method they could use similar to the customJavaScript() template method you provided in the Default.htm file(s).
In addition to the cpAllSlidesLoaded, Captivate also calls "cpSlideLoaded" via EI when each slide has loaded. This makes for some pretty interesting possibilities. I'm sure we'll have some more JS goodness in Cp6 with HTML5 support!
Thank you for your awesome effort on this project!
Jim Leichliter
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.