Question image compare type fix

This commit is contained in:
MrFry 2019-10-16 18:06:41 +02:00
parent 801ac3a588
commit 4ee6c9c2db

View file

@ -21,7 +21,7 @@
// ==UserScript==
// @name Moodle/Elearning/KMOOC test help
// @version 1.6.4.4
// @version 1.6.4.5
// @description Online Moodle/Elearning/KMOOC test help
// @author MrFry
// @match https://elearning.uni-obuda.hu/main/*
@ -280,8 +280,8 @@
if (i === undefined || i.length === 0) { return qmatchpercent } else {
if (this.HasImage()) {
const imatchpercent = this.HasImage() ? SUtils.CompareString(this.I.join(' '), i.join(' '))
: 0
const iString = typeof this.I === 'string' ? this.I : this.I.join(' ')
const imatchpercent = this.HasImage() ? SUtils.CompareString(iString, i.join(' ')) : 0
return (qmatchpercent + imatchpercent) / 2
} else {
qmatchpercent -= 30