From 4ee6c9c2db769d42e29b56d74f9313459c301138 Mon Sep 17 00:00:00 2001 From: MrFry Date: Wed, 16 Oct 2019 18:06:41 +0200 Subject: [PATCH] Question image compare type fix --- stable.user.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stable.user.js b/stable.user.js index 68f27c3..da0f0c0 100644 --- a/stable.user.js +++ b/stable.user.js @@ -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