mirror of
https://gitlab.com/MrFry/moodle-test-userscript
synced 2025-04-01 20:22:48 +02:00
No question fix
This commit is contained in:
parent
dc3e8f5391
commit
8210d49d28
2 changed files with 4 additions and 4 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit 0cfd9cfda377ff8917df50e68f105ec43f5e9311
|
Subproject commit 100ca7750d88400b227c9e1592300c4d1ea7db5c
|
|
@ -1203,13 +1203,13 @@
|
||||||
var imgNodes = q.imgnodes
|
var imgNodes = q.imgnodes
|
||||||
// ------------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------------
|
||||||
var answers = []
|
var answers = []
|
||||||
for (var j = 0; j < questions.length; j++) {
|
questions.forEach((x, j) => {
|
||||||
var question = SUtils.RemoveUnnecesarySpaces(questions[j]) // simplifying question
|
let question = SUtils.EmptyOrWhiteSpace(x) ? '' : SUtils.RemoveUnnecesarySpaces(x) // simplifying question
|
||||||
var result = data.Search(question, SimplifyImages(imgNodes))
|
var result = data.Search(question, SimplifyImages(imgNodes))
|
||||||
var r = PrepareAnswers(result, j)
|
var r = PrepareAnswers(result, j)
|
||||||
if (r !== undefined) { answers.push(r) }
|
if (r !== undefined) { answers.push(r) }
|
||||||
HighLightAnswer(result, j) // highlights the answer for the current result
|
HighLightAnswer(result, j) // highlights the answer for the current result
|
||||||
}
|
})
|
||||||
ShowAnswers(answers, q.q)
|
ShowAnswers(answers, q.q)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue