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:
Submodule question-classes updated: 0cfd9cfda3...100ca7750d
@@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user