JSFiddle - React, Tailwind, and code Playground
by evaneus
JavaScript
// Generated by CoffeeScript 1.3.1
(function() {
var $, AssessmentItem, QtiItem, QtiNode, loadItem, _class,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; },
//Uncaught TypeError: Cannot read property 'prototype' of undefined
_this = this;
AssessmentItem = (function(_super) {
__extends(AssessmentItem, _super);
AssessmentItem.name = 'AssessmentItem';
function AssessmentItem() {
return AssessmentItem.__super__.constructor.apply(this, arguments);
}
AssessmentItem.prototype.getItemBody = function() {};
return AssessmentItem;
})(QtiNode);
$ = jQuery;
loadItem = function(itemId) {
return $.ajax('/xml/ims/choice.xml', {
type: 'GET',
dataType: 'xml',
error: function(jqXHR, textStatus, errorThrown) {
console.log('error getting xml');
return $('body').append("AJAX Error: " + textStatus);
},
success: function(data, textStatus, jqXHR) {
console.log('success getting item xml');
$('body').append("Successful AJAX!");
return console.log($(data).toXMLString());
}
});
};
this.ItemPlayerApi = {
loadItem: loadItem
};
QtiItem = (function() {
QtiItem.name = 'QtiItem';
function QtiItem(xmlDataString) {
this.name = name;
}
return QtiItem;
})();
QtiNode = (function() {
QtiNode.name = 'QtiNode';
function QtiNode() {
return _class.apply(this, arguments);
}
_class = QtiNode.xmlNode;
return QtiNode;
})();
}).call(this);