Skip to content

Commit 3a049ed

Browse files
committed
pass in options to java backend
1 parent 0dcd624 commit 3a049ed

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎v3/js/opt-frontend-common.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ var java_backend_script = 'web_exec_java.py';
6060
// these are the REAL endpoints, accessed via jsonp. code is in ../../v4-cokapi/
6161
var JS_JSONP_ENDPOINT = 'http://104.237.139.253:3000/exec_js_jsonp'; // for deployment
6262
var JAVA_JSONP_ENDPOINT = 'http://104.237.139.253:3000/exec_java_jsonp'; // for deployment
63+
//var JAVA_JSONP_ENDPOINT = 'http://104.237.139.253:5001/exec_java_jsonp'; // for debug
6364

6465
var domain = "http://pythontutor.com/"; // for deployment
6566

@@ -1339,6 +1340,7 @@ function executePythonCode(pythonSourceCode,
13391340
// hack for Java execution! should just be a dummy script for logging only
13401341
$.get(backendScript,
13411342
{user_script : pythonSourceCode,
1343+
options_json: JSON.stringify(backendOptionsObj),
13421344
user_uuid: supports_html5_storage() ? localStorage.getItem('opt_uuid') : undefined,
13431345
// if we don't have any deltas, then don't bother sending deltaObj:
13441346
diffs_json: deltaObj && (deltaObj.deltas.length > 0) ? JSON.stringify(deltaObj) : null},
@@ -1352,7 +1354,8 @@ function executePythonCode(pythonSourceCode,
13521354
// The name of the callback parameter, as specified by the YQL service
13531355
jsonp: "callback",
13541356
dataType: "jsonp",
1355-
data: {user_script : pythonSourceCode},
1357+
data: {user_script : pythonSourceCode,
1358+
options_json: JSON.stringify(backendOptionsObj)},
13561359
success: execCallback,
13571360
});
13581361
} else {

0 commit comments

Comments
 (0)