summaryrefslogtreecommitdiff
path: root/js/codeq/prolog.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/prolog.js
parent163dd5a445910ac7ba19e0e291d1f04c20d9861d (diff)
Correctly process hint_type and hint.
Diffstat (limited to 'js/codeq/prolog.js')
-rw-r--r--js/codeq/prolog.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/codeq/prolog.js b/js/codeq/prolog.js
index 87ac353..bcced1c 100644
--- a/js/codeq/prolog.js
+++ b/js/codeq/prolog.js
@@ -66,14 +66,14 @@
};
var prologHandler; //created when we enter the prolog state and destroyed once we leave it
codeq.globalStateMachine.register('prolog', {
- 'enter': function (problemDef, commonHints, currentSolution) {
+ 'enter': function (problemDef, commonDef, currentSolution) {
$('#navigation-language').css('display', '');
$('#navigation-problem').css('display', '');
$("#navigation-prolog").addClass("active");
$('#navigation-prolog').css('display', '');
jqScreen.css('display', '');//we have to show the screen now so the code editor shows its initial values correctly
- prologHandler = createPrologHandler(problemDef, commonHints, currentSolution);
+ prologHandler = createPrologHandler(problemDef, commonDef, currentSolution);
subScreens = codeq.makeStateMachine(substates);
subScreens.transition(jqDescription.data(stateNameTag));
/* Q.delay(100).then(function(){
@@ -253,7 +253,7 @@
* @param {PrologTaskDef} info
* @returns {{destroy: Function, processServerHints: Function}}
*/
- createPrologHandler = function (problemDef, commonHints, currentSolution) {
+ createPrologHandler = function (problemDef, commonDef, currentSolution) {
var //problem = info.problem,
jqDescriptionContent = jqDescription.find('.description'),
jqEditor = jqCode.find('.code_editor'),
@@ -264,7 +264,7 @@
}),
activityHandler = makeActivityHandler(editor, problemDef.id),
terminal = makePrologTerminalHandler(jqTerminal, editor, problemDef.id, activityHandler),
- hinter = codeq.makeHinter(jqHints, jqEditor, editor, 'prolog_hints', problemDef.hint, commonHints, problemDef.plan),
+ hinter = codeq.makeHinter(jqHints, jqEditor, editor, 'prolog_hints', problemDef, commonDef),
commError = function (error) {
alert(error);
};