Skip to content

Commit

Permalink
update Numbas runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
christianp committed Jun 14, 2021
1 parent b9fd2b6 commit 9b5bd85
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions editor/static/js/numbas/numbas-runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -15526,7 +15526,7 @@ Question.prototype = /** @lends Numbas.Question.prototype */
};
var builtin_constants = tryGet(data,'builtin_constants');
if(builtin_constants) {
q.constantsTodo = Object.entries(builtin_constants).map(function(d){
q.constantsTodo.builtin = Object.entries(builtin_constants).map(function(d){
return {name: d[0], enable: d[1]};
});
}
Expand Down Expand Up @@ -27875,7 +27875,7 @@ Numbas.queueScript('answer-widgets',['knockout','util','jme','jme-display'],func
viewModel: function(params) {
this.answerJSON = params.answerJSON;
var p = this.part = params.part;
var scope = p.getScope();
var scope = Knockout.unwrap(p).getScope();
this.options = Knockout.unwrap(params.options);
this.showPreview = this.options.showPreview || false;
this.returnString = this.options.returnString || false;
Expand Down Expand Up @@ -27927,7 +27927,7 @@ Numbas.queueScript('answer-widgets',['knockout','util','jme','jme-display'],func
} else {
try {
var expr = Numbas.jme.compile(input);
var scope = p.getScope();
var scope = Knockout.unwrap(p).getScope();
var ruleset = new Numbas.jme.rules.Ruleset([],{});
expr = Numbas.jme.display.simplifyTree(expr, ruleset, scope);
return {valid: true, value: expr}
Expand Down

0 comments on commit 9b5bd85

Please sign in to comment.