summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/codeq/problem_list.js1
-rw-r--r--js/codeq/prolog.js2
-rw-r--r--js/codeq/python.js2
-rw-r--r--js/codeq/robot.js2
4 files changed, 4 insertions, 3 deletions
diff --git a/js/codeq/problem_list.js b/js/codeq/problem_list.js
index a281afb..0070edb 100644
--- a/js/codeq/problem_list.js
+++ b/js/codeq/problem_list.js
@@ -363,6 +363,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
'problem': problem,
'id': rawData.id,
'translations': convertTranslations(rawTranslations, 'title', 'name', 'slug', 'description'), // GUI translations: keyword -> lang -> value
+ 'initial': rawData.initial,
'hint': processHints(rawTranslations), // hint translations: keyword -> lang -> value
'plan': processPlans(rawTranslations), // plan translations: keyword -> lang -> value
'hint_type': rawData.hint_type || {}
diff --git a/js/codeq/prolog.js b/js/codeq/prolog.js
index b0e8ebf..2c47bfb 100644
--- a/js/codeq/prolog.js
+++ b/js/codeq/prolog.js
@@ -167,7 +167,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
{
mode: 'prolog',
indentUnit: 4,
- value: currentSolution || ''
+ value: currentSolution || problemDef.initial || ''
},
function () {
jqTerminal.click();
diff --git a/js/codeq/python.js b/js/codeq/python.js
index 3bc7ab5..d5138b4 100644
--- a/js/codeq/python.js
+++ b/js/codeq/python.js
@@ -111,7 +111,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
{
mode: 'python',
indentUnit: 4,
- value: currentSolution || ''
+ value: currentSolution || problemDef.initial || ''
},
function () {
jqTerminal.click()
diff --git a/js/codeq/robot.js b/js/codeq/robot.js
index bf9200f..1dd1fd6 100644
--- a/js/codeq/robot.js
+++ b/js/codeq/robot.js
@@ -86,7 +86,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
{
mode: 'python',
indentUnit: 4,
- value: currentSolution || ''
+ value: currentSolution || problemDef.initial || ''
},
function () {
jqBtnRun.focus();