summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/codeq/prolog.js4
-rw-r--r--js/codeq/python.js4
-rw-r--r--js/codeq/robot.js4
3 files changed, 6 insertions, 6 deletions
diff --git a/js/codeq/prolog.js b/js/codeq/prolog.js
index 6447b86..c549f09 100644
--- a/js/codeq/prolog.js
+++ b/js/codeq/prolog.js
@@ -260,7 +260,8 @@
jqTerminal = jqConsole.find('.console'),
jqHints = jqInfo.find('.hints'),
editor = codeq.makeEditor(jqEditor[0], {
- mode: 'prolog'
+ mode: 'prolog',
+ value: currentSolution || ''
}),
activityHandler = makeActivityHandler(editor, problemDef.id),
terminal = makePrologTerminalHandler(jqTerminal, editor, problemDef.id, activityHandler),
@@ -271,7 +272,6 @@
codeq.tr.registerDictionary('prolog', problemDef.translations);
codeq.tr.translateDom(jqScreen);
- if (currentSolution) editor.setValue(currentSolution);
// $('#screen_prolog .title').text(problem.slug);
// jqDescriptionContent.html(problem.description);
jqBtnPlan.prop('disabled', !hinter.hasNextPlan());
diff --git a/js/codeq/python.js b/js/codeq/python.js
index 59e010a..440b5f7 100644
--- a/js/codeq/python.js
+++ b/js/codeq/python.js
@@ -219,7 +219,8 @@
jqHints = jqInfo.find('.hints'),
editor = codeq.makeEditor(jqEditor[0], {
mode: 'python',
- indentUnit: 4
+ indentUnit: 4,
+ value: currentSolution || ''
}),
activityHandler = makeActivityHandler(editor, problemDef.id),
terminal = makePythonTerminalHandler(jqTerminal, editor, problemDef.id, activityHandler),
@@ -230,7 +231,6 @@
codeq.tr.registerDictionary('python', problemDef.translations);
codeq.tr.translateDom(jqScreen);
- if (currentSolution) editor.setValue(currentSolution);
// $('#screen_python .title').text(problem.slug);
// jqDescriptionContent.html(problem.description);
jqBtnPlan.prop('disabled', !hinter.hasNextPlan());
diff --git a/js/codeq/robot.js b/js/codeq/robot.js
index f2f4a9b..1752f31 100644
--- a/js/codeq/robot.js
+++ b/js/codeq/robot.js
@@ -193,7 +193,8 @@
jqHints = jqInfo.find('.hints'),
editor = codeq.makeEditor(jqEditor[0], {
mode: 'python',
- indentUnit: 4
+ indentUnit: 4,
+ value: currentSolution || ''
}),
activityHandler = makeActivityHandler(editor, problemDef.id),
terminal = makeRobotTerminalHandler(jqTerminal, editor, problemDef.id, activityHandler),
@@ -204,7 +205,6 @@
codeq.tr.registerDictionary('robot', problemDef.translations);
codeq.tr.translateDom(jqScreen);
- if (currentSolution) editor.setValue(currentSolution);
jqBtnPlan.prop('disabled', !hinter.hasNextPlan());
editor.on('change', function (instance, changeObj) {