From c53d0c85e741893abd58787208b8be981e5ca103 Mon Sep 17 00:00:00 2001 From: viktar-dzmitryieu-tao Date: Wed, 3 Apr 2024 16:32:17 +0200 Subject: [PATCH 1/3] fix: expose zero maxscore for upload and endAttempt interactions --- src/qtiItem/core/interactions/EndAttemptInteraction.js | 5 ++++- src/qtiItem/core/interactions/UploadInteraction.js | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/qtiItem/core/interactions/EndAttemptInteraction.js b/src/qtiItem/core/interactions/EndAttemptInteraction.js index df6fd44a..2ba4d5ba 100644 --- a/src/qtiItem/core/interactions/EndAttemptInteraction.js +++ b/src/qtiItem/core/interactions/EndAttemptInteraction.js @@ -1,4 +1,7 @@ import InlineInteraction from 'taoQtiItem/qtiItem/core/interactions/InlineInteraction'; export default InlineInteraction.extend({ - qtiClass: 'endAttemptInteraction' + qtiClass: 'endAttemptInteraction', + getNormalMaximum() { + return 0; + } }); diff --git a/src/qtiItem/core/interactions/UploadInteraction.js b/src/qtiItem/core/interactions/UploadInteraction.js index 65c364be..39ba32db 100644 --- a/src/qtiItem/core/interactions/UploadInteraction.js +++ b/src/qtiItem/core/interactions/UploadInteraction.js @@ -1,5 +1,8 @@ import InlineInteraction from 'taoQtiItem/qtiItem/core/interactions/BlockInteraction'; var UploadInteraction = InlineInteraction.extend({ - qtiClass: 'uploadInteraction' + qtiClass: 'uploadInteraction', + getNormalMaximum() { + return 0; + } }); export default UploadInteraction; From 79839a21507b7d8ea57866ef5b21a4757ec68874 Mon Sep 17 00:00:00 2001 From: viktar-dzmitryieu-tao Date: Wed, 3 Apr 2024 16:56:01 +0200 Subject: [PATCH 2/3] fix: test --- test/qtiItem/maxScore/test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/qtiItem/maxScore/test.js b/test/qtiItem/maxScore/test.js index e92b6c4e..4af8324b 100644 --- a/test/qtiItem/maxScore/test.js +++ b/test/qtiItem/maxScore/test.js @@ -221,14 +221,14 @@ define([ expectedMaximum: 1, maxScore: 4 }, - { title: 'upload', data: dataUpload, expectedMaximum: undefined, maxScore: undefined }, + { title: 'upload', data: dataUpload, expectedMaximum: 0, maxScore: 0 }, { title: 'custom interaction', data: dataPci, expectedMaximum: 0, maxScore: 0 }, { title: 'custom response processing', data: dataCustomRp, expectedMaximum: undefined, maxScore: undefined }, { title: 'upload and choice - correct', data: dataUploadChoice, - expectedMaximum: undefined, - maxScore: undefined + expectedMaximum: 0, + maxScore: 0 }, { title: 'hottext - correct', data: dataHottextCorrect, expectedMaximum: 1, maxScore: 1 }, { title: 'hotspot - correct', data: dataHotspotCorrect, expectedMaximum: 1, maxScore: 1 }, From a0e9388f12c0d5342da141b85227369a49359fd4 Mon Sep 17 00:00:00 2001 From: oat-github-bot Date: Mon, 8 Apr 2024 12:45:24 +0000 Subject: [PATCH 3/3] chore: bump version --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index ae257ee2..5bfadfe9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@oat-sa/tao-item-runner-qti", - "version": "2.2.2", + "version": "2.2.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@oat-sa/tao-item-runner-qti", - "version": "2.2.2", + "version": "2.2.3", "license": "GPL-2.0", "devDependencies": { "@oat-sa/browserslist-config-tao": "^1.0.1", diff --git a/package.json b/package.json index cea0513c..a2365d92 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@oat-sa/tao-item-runner-qti", - "version": "2.2.2", + "version": "2.2.3", "displayName": "TAO Item Runner QTI", "description": "TAO QTI Item Runner modules", "files": [