Skip to content

Instantly share code, notes, and snippets.

View jkriddle's full-sized avatar

Joshua Riddle jkriddle

  • Baltimore, MD
View GitHub Profile
/**
* @file Sample instance of a host system's configuration file. For testing only.
*/
/**
* @namespace
* @property {String} name - Target XML element of this configuration
* @property {String} description - User-friendly description of this configuration
* @property {Array} subelements - Item Elements allowed to be created/managed
* @property {String} subelements.name - Target XML element of this element
var itemXml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\
<!-- Thie example adapted from the PET Handbook, copyright University of Cambridge ESOL Examinations -->\
<assessmentItem xmlns=\"http://www.imsglobal.org/xsd/imsqti_v2p1\"\
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\
xsi:schemaLocation=\"http://www.imsglobal.org/xsd/imsqti_v2p1 http://www.imsglobal.org/xsd/imsqti_v2p1.xsd\"\
identifier=\"choice\" title=\"Unattended Luggage\" adaptive=\"false\" timeDependent=\"false\">\
<responseDeclaration identifier=\"RESPONSE\" cardinality=\"single\" baseType=\"identifier\">\
<correctResponse>\
<value>ChoiceA</value>\
</correctResponse>\
<?xml version="1.0" encoding="UTF-8"?>
<!-- Thie example adapted from the PET Handbook, copyright University of Cambridge ESOL Examinations -->
<assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_v2p1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p1 http://www.imsglobal.org/xsd/imsqti_v2p1.xsd"
identifier="choice" title="Unattended Luggage" adaptive="false" timeDependent="false">
<responseDeclaration identifier="RESPONSE" cardinality="single" baseType="identifier">
<correctResponse>
<value>ChoiceA</value>
</correctResponse>
@jkriddle
jkriddle / bootstrap.css
Created January 15, 2014 14:58
A compiled version of Twitter Bootstrap v3.0.3 using a CSS namespace of .tbs. For anyone wanting to use Twitter Bootstrap in an existing project without affecting existing styles, and don't have .less support. To use: apply the class .tbs to a wrapper element where you want to use Twitter Bootstrap. Anything inside that element will have the sty…
.tbs {
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
}
.tbs article,
.tbs aside,
.tbs details,
.tbs figcaption,
.tbs figure,
.tbs footer,
.tbs header,
itemEditor.on("save", function () {
// show item value
var manifest = itemEditor.getManifest();
alert(manifest);
var translation = itemEditor.getTranslation();
alert(translation);
});