Skip to content

Commit 7b14fa6

Browse files
committed
minor frontend changes and added simple unicode support
1 parent 5cad0fc commit 7b14fa6

5 files changed

Lines changed: 6 additions & 15 deletions

File tree

‎v3/js/composingprograms.js‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@ function executeCode(forceStartingInstr) {
4545
py_crazy_mode: false,
4646
origin: 'composingprograms.js'};
4747

48-
var surveyObj = getSurveyObject();
49-
if (surveyObj) {
50-
backendOptionsObj.survey = surveyObj;
51-
}
52-
5348
var startingInstruction = forceStartingInstr ? forceStartingInstr : 0;
5449

5550
var frontendOptionsObj = {startingInstruction: startingInstruction,

‎v3/js/csc108h.js‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@ function executeCode(forceStartingInstr) {
4646
py_crazy_mode: false,
4747
origin: 'csc108h.js'};
4848

49-
var surveyObj = getSurveyObject();
50-
if (surveyObj) {
51-
backendOptionsObj.survey = surveyObj;
52-
}
53-
5449
var startingInstruction = forceStartingInstr ? forceStartingInstr : 0;
5550

5651
var frontendOptionsObj = {startingInstruction: startingInstruction,

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,11 @@ function executePythonCode(pythonSourceCode,
413413
return;
414414
}
415415

416+
// if you're in display mode, kick back into edit mode before
417+
// executing or else the display might not refresh properly ... ugh
418+
// krufty FIXME
419+
enterEditMode();
420+
416421
clearFrontendError();
417422
startExecutingCode();
418423

‎v3/js/opt-frontend.js‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,6 @@ function executeCode(forceStartingInstr, forceRawInputLst) {
319319
rawInputLst = forceRawInputLst; // UGLY global across modules, FIXME
320320
}
321321

322-
// kick back into edit mode before executing or else the display might
323-
// not refresh properly ... ugh krufty FIXME
324-
enterEditMode();
325-
326322
var backend_script = null;
327323
if ($('#pythonVersionSelector').val() == '2') {
328324
backend_script = python2_backend_script;

‎v3/pg_encoder.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def get_name(obj):
106106
return obj.__name__ if hasattr(obj, '__name__') else get_name(type(obj))
107107

108108

109-
PRIMITIVE_TYPES = (int, long, float, str, bool, type(None))
109+
PRIMITIVE_TYPES = (int, long, float, str, unicode, bool, type(None))
110110

111111
def encode_primitive(dat):
112112
if type(dat) is float:

0 commit comments

Comments
 (0)