summaryrefslogtreecommitdiff
path: root/js/prolog.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/prolog.js')
-rw-r--r--js/prolog.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/js/prolog.js b/js/prolog.js
index 429ac72..e252393 100644
--- a/js/prolog.js
+++ b/js/prolog.js
@@ -33,19 +33,20 @@
if (promptMode) {
terminal.pause();
codeq.comms.sendQuery({
+ 'problem_id': problem_id,
'step': 'run',
'program': editor.getDoc().getValue(),
'query': command,
- 'problem_id': problem_id,
'trace': activityHandler.addAndPurge({'typ': 'slv', 'qry': command})
- }).then(tcs, tcf).done();
+ }, problem_id).then(tcs, tcf).done();
}
else {
// not in prompt mode -- we should never land here, but handle it anyway
codeq.comms.sendQuery({
+ 'problem_id': problem_id,
'step': 'end',
'trace': activityHandler.addAndPurge({'typ': 'stp'})
- }).then(tcs, tcf).done();
+ }, problem_id).then(tcs, tcf).done();
}
}, {
'history': true,
@@ -63,17 +64,19 @@
// space or semicolon -> show next answer
event.which = 59; // semicolon
codeq.comms.sendQuery({
+ 'problem_id': problem_id,
'step': 'next',
'trace': activityHandler.addAndPurge({'typ': 'nxt'})
- }).then(tcs, tcf).done();
+ }, problem_id).then(tcs, tcf).done();
}
else {
// everything else: stop searching for answers
event.which = 46; // full stop
codeq.comms.sendQuery({
+ 'problem_id': problem_id,
'step': 'end',
'trace': activityHandler.addAndPurge({'typ': 'stp'})
- }).then(tcs, tcf).done();
+ }, problem_id).then(tcs, tcf).done();
}
}
});