summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2017-02-28 12:14:12 +0100
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2017-02-28 12:14:12 +0100
commit04fc131e4d3db61d945ca9db6586a5a4e837939c (patch)
tree7d177d0014cd01a6afa17821108489ba19afb5a2
parent5a56bd88b4fe9dc8917995b67fcfb5fa852f8822 (diff)
Fix text-less popup hints for highlighting
It would probably be better to add a new class of hint instead, or to support this in the translation/template engine.
-rw-r--r--js/codeq/hint.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/codeq/hint.js b/js/codeq/hint.js
index 0c4b2f2..b869d99 100644
--- a/js/codeq/hint.js
+++ b/js/codeq/hint.js
@@ -1,5 +1,5 @@
/* CodeQ: an online programming tutor.
- Copyright (C) 2015 UL FRI
+ Copyright (C) 2015-2017 UL FRI
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
@@ -258,7 +258,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
// highlight given range in the editor
var mark = addMark(hint.start, hint.end, style);
- if (!template) return;
// execute templates for all languages
for (i = langs.length - 1; i >= 0; i--) {
@@ -268,8 +267,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
translations[lang] = codeq.template.process(content, templatePath, args);
}
else {
- translations[lang] = 'No translation in ' + lang + ' available for popup hint ' + hint.id;
- codeq.log.error(translations[lang]);
+ // any missing translation → no popup
+ // TODO support highlight-only hints instead
+ return;
}
}
// construct the wrapper element for the translation mechanism