summaryrefslogtreecommitdiff
path: root/js/codeq/python.js
diff options
context:
space:
mode:
authorAleš Smodiš <aless@guru.si>2015-09-29 16:45:21 +0200
committerAleš Smodiš <aless@guru.si>2015-09-29 16:45:21 +0200
commitd657145124a601a9375b04a488ff2950f645f26d (patch)
tree16cbfa6119f53e37471c05236d3cdba179128978 /js/codeq/python.js
parent163dd5a445910ac7ba19e0e291d1f04c20d9861d (diff)
Correctly process hint_type and hint.
Diffstat (limited to 'js/codeq/python.js')
-rw-r--r--js/codeq/python.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/codeq/python.js b/js/codeq/python.js
index e20fe06..8a9e92f 100644
--- a/js/codeq/python.js
+++ b/js/codeq/python.js
@@ -71,14 +71,14 @@
};
var pythonHandler; //created when we enter the python state and destroyed once we leave it
codeq.globalStateMachine.register('python', {
- 'enter': function (problemDef, commonHints, currentSolution) {
+ 'enter': function (problemDef, commonDef, currentSolution) {
$('#navigation-language').css('display', '');
$('#navigation-problem').css('display', '');
$("#navigation-python").addClass("active");
$('#navigation-python').css('display', '');
jqScreen.css('display', '');//we have to show the screen now so the code editor shows its initial values correctly
- pythonHandler = createPythonHandler(problemDef, commonHints, currentSolution);
+ pythonHandler = createPythonHandler(problemDef, commonDef, currentSolution);
subScreens = codeq.makeStateMachine(substates);
subScreens.transition(jqDescription.data(stateNameTag));
/* Q.delay(100).then(function(){
@@ -211,7 +211,7 @@
* @param {PrologTaskDef} info
* @returns {{destroy: Function, processServerHints: Function}}
*/
- var createPythonHandler = function (problemDef, commonHints, currentSolution) {
+ var createPythonHandler = function (problemDef, commonDef, currentSolution) {
var //problem = info.problem,
jqDescriptionContent = jqDescription.find('.description'),
jqEditor = jqCode.find('.code_editor'),
@@ -223,7 +223,7 @@
}),
activityHandler = makeActivityHandler(editor, problemDef.id),
terminal = makePythonTerminalHandler(jqTerminal, editor, problemDef.id, activityHandler),
- hinter = codeq.makeHinter(jqHints, jqEditor, editor, 'python_hints', problemDef.hint, commonHints, problemDef.plan),
+ hinter = codeq.makeHinter(jqHints, jqEditor, editor, 'python_hints', problemDef, commonDef),
commError = function (error) {
alert(error);
};