From 7009ae2c2dca4b70e903135f088a15acb95f5085 Mon Sep 17 00:00:00 2001 From: Robert Zorko Date: Fri, 18 Sep 2015 09:42:52 +0200 Subject: added python and prolog into two different states --- js/python.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'js/python.js') diff --git a/js/python.js b/js/python.js index 7d7458e..fd2b9b1 100644 --- a/js/python.js +++ b/js/python.js @@ -6,6 +6,7 @@ // a constant var firstCharacterPos = {'line': 0, 'ch': 0}; + //codeq.makePythonTerminalHandler = function (jqConsole, editor, problem_id, activityHandler) { var makePythonTerminalHandler = function (jqConsole, editor, problem_id, activityHandler) { var terminal = codeq.makeConsole(jqConsole, { 'greeting': 'CodeQ Python terminal proxy' @@ -37,7 +38,7 @@ return terminal; }; - var makeActivityHandler = function (editor, problem_id) { + var makeActivityHandler = function (editor, problem_id) { var lastActivityMillis = Date.now(), deltaActivityMillis = function deltaActivityMillisFunc () { var now = Date.now(), @@ -81,6 +82,8 @@ }; }; + + /** * Creates a new handler for the given Prolog assignment definition. * @@ -94,7 +97,7 @@ jqConsole = $('#console'), jqHints = $('#info'), editor = CodeMirror(jqEditor[0], { cursorHeight: 0.85, lineNumbers: true, matchBrackets: true, mode: 'python' }), - activityHandler = makeActivityHandler(editor, problem.id), + activityHandler = codeq.makeActivityHandler(editor, problem.id), terminal = makePythonTerminalHandler(jqConsole, editor, problem.id, activityHandler), hintDefs = problem.hint, hintCounter = 0, // for generating unique class-names -- cgit v1.2.1