Skip to content

Instantly share code, notes, and snippets.

Avatar

Philip Hutchison pipwerks

View GitHub Profile
@pipwerks
pipwerks / AppleScript for generating SCORM manifest <file> nodes
Created Feb 24, 2014
AppleScript that generates list of files for the <resource> node in a SCORM manifest. Select the directory containing your content, and the script will generate the list, then copy to your clipboard. Results are formatted like this: <file href="index.html" />
View AppleScript for generating SCORM manifest <file> nodes
(*
Based on http://www.jonn8.com/html/scripts/misc/List_Folder_Contents.html
with string replacement function from https://discussions.apple.com/message/20542403#20542403
*)
property script_name : "List Folder Contents"
property script_description : "This script will list a folder's contents returning full paths as strings and limit the list to specific file types. The script can also process subfolders (recursion)."
set the_folder to (choose folder with prompt "Choose a Folder to List:") as Unicode text
set file_types to {} --file types, set to {} to true to just return folders; file types are 4 character codes such as "osas" or "TEXT"
@pipwerks
pipwerks / Ungraded quiz with feedback
Created May 17, 2013
Updated "ungraded quiz with feedback" example. Uses jQuery. Warning: this example is NOT keyboard accessible, and will require a mouse or touch interaction.
View Ungraded quiz with feedback
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Sample ungraded question with feedback</title>
<style>
/* basic page styling */
body { font-family: sans-serif; color: #444; font-size: small; margin: 0px; padding: 2em; background: #eee; }
h1 { font-size: xx-large; font-weight: normal; color: #777; }
h2 { font-size: x-large; font-weight: normal; }
@pipwerks
pipwerks / sample.htm
Created Jan 18, 2012
Captivate SCORM 2004 Output, final cleanup
View sample.htm
<!DOCTYPE HTML>
<!-- saved from url=(0014)about:internet -->
<html lang="en">
<head>
<meta charset="utf-8" />
<title>@MOVIETITLE</title>
<script>
// set document.domain property here, if it works for your environment/SCORM implementation
// document.domain="";
@pipwerks
pipwerks / sample.htm
Created Jan 18, 2012
Captivate SCORM 2004 Output, centering SWF
View sample.htm
<!DOCTYPE HTML>
<!-- saved from url=(0014)about:internet -->
<html lang="en">
<head>
<meta charset="utf-8" />
<title>@MOVIETITLE</title>
<script>
// set document.domain property here, if it works for your environment/SCORM implementation
// document.domain="";
@pipwerks
pipwerks / sample.htm
Created Jan 18, 2012
Captivate SCORM 2004 Output, fixed RightClick functionality when using SWFObject 2.2
View sample.htm
<!DOCTYPE HTML>
<!-- saved from url=(0014)about:internet -->
<html lang="en">
<head>
<meta charset="utf-8" />
<title>@MOVIETITLE</title>
<script>
// set document.domain property here, if it works for your environment/SCORM implementation
// document.domain="";
@pipwerks
pipwerks / sample.htm
Created Jan 18, 2012
Captivate SCORM 2004 Output, setting up template
View sample.htm
<!DOCTYPE HTML>
<!-- saved from url=(0014)about:internet -->
<html lang="en">
<head>
<meta charset="utf-8" />
<title>@MOVIETITLE</title>
<script>
// set document.domain property here, if it works for your environment/SCORM implementation
// document.domain="";
@pipwerks
pipwerks / sample.htm
Created Jan 17, 2012
Captivate SCORM 2004 Output, created CONFIG object
View sample.htm
<!-- Copyright [2008] Adobe Systems Incorporated. All rights reserved -->
<!-- saved from url=(0013)about:internet -->
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>@MOVIETITLE</title>
<script>
// set document.domain property here, if it works for your environment/SCORM implementation
@pipwerks
pipwerks / sample.htm
Created Jan 17, 2012
Captivate SCORM 2004 Output, eliminate captivate.js
View sample.htm
<!-- Copyright [2008] Adobe Systems Incorporated. All rights reserved -->
<!-- saved from url=(0013)about:internet -->
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8" />
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
<script src="standard.js"></script>
<script src="SCORM_support/scorm_support.js"></script>
@pipwerks
pipwerks / scorm_support.js
Created Jan 14, 2012
Captivate SCORM 2004 Output, preventing redundant GetLastError calls
View scorm_support.js
/*global CaptivateSWF */
var SCORM_API = null,
unloaded = false,
isInitialized = false,
isTerminated = false,
courseStatus,
value_store = [],
lastCommand,
setValueWasSuccessful = true;
@pipwerks
pipwerks / log.txt
Created Jan 14, 2012
Captivate SCORM 2004 Course -- logged calls to Captivate_DoExternalInterface
View log.txt
SCORM initialized. Ready to go!
http://cloud.scorm.com/content/courses/FTYR5Q0IM4/Archive4056f446-8c7e-4794-82d1-5c9f40b2a302/0/MMTracking.swfFailed to load resource: the server responded with a status of 404 (Not Found)
Captivate_DoExternalInterface: Initialize, , ''
Captivate_DoExternalInterface: GetValue, cmi.entry, ''
Captivate_DoExternalInterface: GetLastError, , ''
Captivate_DoExternalInterface: SetValue, cmi.exit, suspend
cmi.exit(suspend) is not cached. Sending to LMS.
Captivate_DoExternalInterface: GetLastError, , ''
Last Get/Set was successful. Preventing pointless GetLastError invocation.
Captivate_DoExternalInterface: GetValue, cmi.location, ''
You can’t perform that action at this time.