mirror of
https://gitlab.com/MrFry/moodle-test-userscript
synced 2025-04-01 20:22:48 +02:00
Question class tostring, removed some todos
This commit is contained in:
parent
339d67d5cc
commit
ba9f812041
1 changed files with 4 additions and 11 deletions
|
@ -260,11 +260,11 @@
|
|||
}
|
||||
|
||||
toString () {
|
||||
var r = '?' + this.Q + '\n!' + this.A
|
||||
if (this.data.type === 'image') {
|
||||
r += '\n>' + this.data.images.join(', ')
|
||||
if (this.data.type !== 'simple') {
|
||||
return '?' + this.Q + '\n!' + this.A + '\n>' + JSON.stringify(this.data)
|
||||
} else {
|
||||
return '?' + this.Q + '\n!' + this.A
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
HasQuestion () {
|
||||
|
@ -798,7 +798,6 @@
|
|||
// "húzza oda ..." skip
|
||||
fun.push((i) => {
|
||||
let temp = RPM.GetAnswersFromGrabBox(i)
|
||||
console.log('GRABBOX TEST', temp) // TODO: remove
|
||||
return temp.map((x) => {
|
||||
return x.text
|
||||
}).join(', ')
|
||||
|
@ -1264,7 +1263,6 @@
|
|||
var answers = []
|
||||
questions.forEach((x, j) => {
|
||||
let question = SUtils.EmptyOrWhiteSpace(x) ? '' : SUtils.RemoveUnnecesarySpaces(x) // simplifying question
|
||||
// TODO: getdatafromquestion, implement grabboxes answering
|
||||
var result = data.Search(question, GetImageDataFromImgNodes(imgNodes))
|
||||
var r = PrepareAnswers(result, j)
|
||||
if (r !== undefined) { answers.push(r) }
|
||||
|
@ -1387,11 +1385,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
// TODO
|
||||
// function GetGrabBoxPositionsFromQuestion (i) {
|
||||
// return asd
|
||||
// }
|
||||
|
||||
function GetDataFormResult (i) {
|
||||
let data = { type: 'simple' }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue