Remove generated files
This commit is contained in:
4
common/lib/capa/capa/tests/test_files/js/.gitignore
vendored
Normal file
4
common/lib/capa/capa/tests/test_files/js/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
test_problem_display.js
|
||||||
|
test_problem_generator.js
|
||||||
|
test_problem_grader.js
|
||||||
|
xproblem.js
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
// Generated by CoffeeScript 1.4.0
|
|
||||||
(function() {
|
|
||||||
var MinimaxProblemDisplay, root,
|
|
||||||
__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; };
|
|
||||||
|
|
||||||
MinimaxProblemDisplay = (function(_super) {
|
|
||||||
|
|
||||||
__extends(MinimaxProblemDisplay, _super);
|
|
||||||
|
|
||||||
function MinimaxProblemDisplay(state, submission, evaluation, container, submissionField, parameters) {
|
|
||||||
this.state = state;
|
|
||||||
this.submission = submission;
|
|
||||||
this.evaluation = evaluation;
|
|
||||||
this.container = container;
|
|
||||||
this.submissionField = submissionField;
|
|
||||||
this.parameters = parameters != null ? parameters : {};
|
|
||||||
MinimaxProblemDisplay.__super__.constructor.call(this, this.state, this.submission, this.evaluation, this.container, this.submissionField, this.parameters);
|
|
||||||
}
|
|
||||||
|
|
||||||
MinimaxProblemDisplay.prototype.render = function() {};
|
|
||||||
|
|
||||||
MinimaxProblemDisplay.prototype.createSubmission = function() {
|
|
||||||
var id, value, _ref, _results;
|
|
||||||
this.newSubmission = {};
|
|
||||||
if (this.submission != null) {
|
|
||||||
_ref = this.submission;
|
|
||||||
_results = [];
|
|
||||||
for (id in _ref) {
|
|
||||||
value = _ref[id];
|
|
||||||
_results.push(this.newSubmission[id] = value);
|
|
||||||
}
|
|
||||||
return _results;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
MinimaxProblemDisplay.prototype.getCurrentSubmission = function() {
|
|
||||||
return this.newSubmission;
|
|
||||||
};
|
|
||||||
|
|
||||||
return MinimaxProblemDisplay;
|
|
||||||
|
|
||||||
})(XProblemDisplay);
|
|
||||||
|
|
||||||
root = typeof exports !== "undefined" && exports !== null ? exports : this;
|
|
||||||
|
|
||||||
root.TestProblemDisplay = TestProblemDisplay;
|
|
||||||
|
|
||||||
}).call(this);
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
// Generated by CoffeeScript 1.4.0
|
|
||||||
(function() {
|
|
||||||
var TestProblemGenerator, root,
|
|
||||||
__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; };
|
|
||||||
|
|
||||||
TestProblemGenerator = (function(_super) {
|
|
||||||
|
|
||||||
__extends(TestProblemGenerator, _super);
|
|
||||||
|
|
||||||
function TestProblemGenerator(seed, parameters) {
|
|
||||||
this.parameters = parameters != null ? parameters : {};
|
|
||||||
TestProblemGenerator.__super__.constructor.call(this, seed, this.parameters);
|
|
||||||
}
|
|
||||||
|
|
||||||
TestProblemGenerator.prototype.generate = function() {
|
|
||||||
this.problemState.value = this.parameters.value;
|
|
||||||
return this.problemState;
|
|
||||||
};
|
|
||||||
|
|
||||||
return TestProblemGenerator;
|
|
||||||
|
|
||||||
})(XProblemGenerator);
|
|
||||||
|
|
||||||
root = typeof exports !== "undefined" && exports !== null ? exports : this;
|
|
||||||
|
|
||||||
root.generatorClass = TestProblemGenerator;
|
|
||||||
|
|
||||||
}).call(this);
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
// Generated by CoffeeScript 1.4.0
|
|
||||||
(function() {
|
|
||||||
var TestProblemGrader, root,
|
|
||||||
__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; };
|
|
||||||
|
|
||||||
TestProblemGrader = (function(_super) {
|
|
||||||
|
|
||||||
__extends(TestProblemGrader, _super);
|
|
||||||
|
|
||||||
function TestProblemGrader(submission, problemState, parameters) {
|
|
||||||
this.submission = submission;
|
|
||||||
this.problemState = problemState;
|
|
||||||
this.parameters = parameters != null ? parameters : {};
|
|
||||||
TestProblemGrader.__super__.constructor.call(this, this.submission, this.problemState, this.parameters);
|
|
||||||
}
|
|
||||||
|
|
||||||
TestProblemGrader.prototype.solve = function() {
|
|
||||||
return this.solution = {
|
|
||||||
0: this.problemState.value
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
TestProblemGrader.prototype.grade = function() {
|
|
||||||
var allCorrect, id, value, valueCorrect, _ref;
|
|
||||||
if (!(this.solution != null)) {
|
|
||||||
this.solve();
|
|
||||||
}
|
|
||||||
allCorrect = true;
|
|
||||||
_ref = this.solution;
|
|
||||||
for (id in _ref) {
|
|
||||||
value = _ref[id];
|
|
||||||
valueCorrect = this.submission != null ? value === this.submission[id] : false;
|
|
||||||
this.evaluation[id] = valueCorrect;
|
|
||||||
if (!valueCorrect) {
|
|
||||||
allCorrect = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return allCorrect;
|
|
||||||
};
|
|
||||||
|
|
||||||
return TestProblemGrader;
|
|
||||||
|
|
||||||
})(XProblemGrader);
|
|
||||||
|
|
||||||
root = typeof exports !== "undefined" && exports !== null ? exports : this;
|
|
||||||
|
|
||||||
root.graderClass = TestProblemGrader;
|
|
||||||
|
|
||||||
}).call(this);
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
// Generated by CoffeeScript 1.4.0
|
|
||||||
(function() {
|
|
||||||
var XProblemDisplay, XProblemGenerator, XProblemGrader, root;
|
|
||||||
|
|
||||||
XProblemGenerator = (function() {
|
|
||||||
|
|
||||||
function XProblemGenerator(seed, parameters) {
|
|
||||||
this.parameters = parameters != null ? parameters : {};
|
|
||||||
this.random = new MersenneTwister(seed);
|
|
||||||
this.problemState = {};
|
|
||||||
}
|
|
||||||
|
|
||||||
XProblemGenerator.prototype.generate = function() {
|
|
||||||
return console.error("Abstract method called: XProblemGenerator.generate");
|
|
||||||
};
|
|
||||||
|
|
||||||
return XProblemGenerator;
|
|
||||||
|
|
||||||
})();
|
|
||||||
|
|
||||||
XProblemDisplay = (function() {
|
|
||||||
|
|
||||||
function XProblemDisplay(state, submission, evaluation, container, submissionField, parameters) {
|
|
||||||
this.state = state;
|
|
||||||
this.submission = submission;
|
|
||||||
this.evaluation = evaluation;
|
|
||||||
this.container = container;
|
|
||||||
this.submissionField = submissionField;
|
|
||||||
this.parameters = parameters != null ? parameters : {};
|
|
||||||
}
|
|
||||||
|
|
||||||
XProblemDisplay.prototype.render = function() {
|
|
||||||
return console.error("Abstract method called: XProblemDisplay.render");
|
|
||||||
};
|
|
||||||
|
|
||||||
XProblemDisplay.prototype.updateSubmission = function() {
|
|
||||||
return this.submissionField.val(JSON.stringify(this.getCurrentSubmission()));
|
|
||||||
};
|
|
||||||
|
|
||||||
XProblemDisplay.prototype.getCurrentSubmission = function() {
|
|
||||||
return console.error("Abstract method called: XProblemDisplay.getCurrentSubmission");
|
|
||||||
};
|
|
||||||
|
|
||||||
return XProblemDisplay;
|
|
||||||
|
|
||||||
})();
|
|
||||||
|
|
||||||
XProblemGrader = (function() {
|
|
||||||
|
|
||||||
function XProblemGrader(submission, problemState, parameters) {
|
|
||||||
this.submission = submission;
|
|
||||||
this.problemState = problemState;
|
|
||||||
this.parameters = parameters != null ? parameters : {};
|
|
||||||
this.solution = null;
|
|
||||||
this.evaluation = {};
|
|
||||||
}
|
|
||||||
|
|
||||||
XProblemGrader.prototype.solve = function() {
|
|
||||||
return console.error("Abstract method called: XProblemGrader.solve");
|
|
||||||
};
|
|
||||||
|
|
||||||
XProblemGrader.prototype.grade = function() {
|
|
||||||
return console.error("Abstract method called: XProblemGrader.grade");
|
|
||||||
};
|
|
||||||
|
|
||||||
return XProblemGrader;
|
|
||||||
|
|
||||||
})();
|
|
||||||
|
|
||||||
root = typeof exports !== "undefined" && exports !== null ? exports : this;
|
|
||||||
|
|
||||||
root.XProblemGenerator = XProblemGenerator;
|
|
||||||
|
|
||||||
root.XProblemDisplay = XProblemDisplay;
|
|
||||||
|
|
||||||
root.XProblemGrader = XProblemGrader;
|
|
||||||
|
|
||||||
}).call(this);
|
|
||||||
Reference in New Issue
Block a user