Browse Source

multi-response hint text

isundil 6 years ago
parent
commit
248d171245
2 changed files with 3 additions and 1 deletions
  1. 1 0
      config.js
  2. 2 1
      quizz.js

+ 1 - 0
config.js

@@ -33,6 +33,7 @@ module.exports.MODULES["#quizz"] = new (require('./quizz.js'))({
 });
 
 module.exports.MODULES["#rapido"] = new (require('./rapido.js'))({
+    DISABLED: false,
     NEXT_WORD_DELAY: 10 * 1000, // 10 sec
     WORD_TIMEOUT: 20 * 1000, // 20 sec
     DICTIONARY_PATH: './fr.txt',

+ 2 - 1
quizz.js

@@ -95,7 +95,8 @@ Question.prototype.getHint = function(hintLevel) {
     var hints = [];
     for (var i =0, len = this.response.length; i < len; ++i)
         hints.push(Question.toHint(this.response[i], this.normalizedResponse[i], this.boundaries, i, type, hintLevel));
-    return hints.join (" ou ");
+    return hints.length > 1 ? ("Plusieures reponses acceptees: " +hints.join(" ou ")) : hints[0];
+    return hints.join(" ou ");
 }
 
 Question.prototype.check = function(response) {