From a82ac7a978eaba09afeb347fd3778fc8f2e3eacf Mon Sep 17 00:00:00 2001 From: Brad Simpson Date: Fri, 24 May 2024 07:37:09 -0600 Subject: [PATCH 01/12] Fix: Replace deprecated drawer.triggerCustomView with drawer.openCustomView (fixes #222) --- .github/pull_request_template.md | 2 +- js/PageLevelProgressNavigationView.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 750a692..f641119 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -8,7 +8,7 @@ * A sentence describing each fix ### Update -* A sentence describing each udpate +* A sentence describing each update ### New * A sentence describing each new feature diff --git a/js/PageLevelProgressNavigationView.js b/js/PageLevelProgressNavigationView.js index a0beeba..b3129ff 100644 --- a/js/PageLevelProgressNavigationView.js +++ b/js/PageLevelProgressNavigationView.js @@ -91,7 +91,7 @@ export default class PageLevelProgressNavigationView extends NavigationButtonVie onProgressClicked(event) { if (event && event.preventDefault) event.preventDefault(); this.$el.attr('aria-expanded', true); - drawer.triggerCustomView(new PageLevelProgressView({ + drawer.openCustomView(new PageLevelProgressView({ collection: this.collection }).$el, false, this.model.get('_drawerPosition')); } From e52bf68b2b5fc11a8d07c0003beb94294ee5a975 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 24 May 2024 13:37:40 +0000 Subject: [PATCH 02/12] Chore(release): 7.6.2 [skip ci] ## [7.6.2](https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/compare/v7.6.1...v7.6.2) (2024-05-24) ### Fix * Replace deprecated drawer.triggerCustomView with drawer.openCustomView (fixes #222) ([a82ac7a](https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/commit/a82ac7a978eaba09afeb347fd3778fc8f2e3eacf)), closes [#222](https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/issues/222) --- bower.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index 8243bf3..614fdcb 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-pageLevelProgress", - "version": "7.6.1", + "version": "7.6.2", "framework": ">=5.31.0", "homepage": "https://github.com/adaptlearning/adapt-contrib-pageLevelProgress", "bugs": "https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/issues", diff --git a/package.json b/package.json index 8243bf3..614fdcb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-pageLevelProgress", - "version": "7.6.1", + "version": "7.6.2", "framework": ">=5.31.0", "homepage": "https://github.com/adaptlearning/adapt-contrib-pageLevelProgress", "bugs": "https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/issues", From 060e88ca3dc8321899d316a87b407ae40e521226 Mon Sep 17 00:00:00 2001 From: Brad Simpson Date: Thu, 30 May 2024 02:45:16 -0600 Subject: [PATCH 03/12] Fix: Clarify _showPageCompletion functionality (fixes #215) #219 --- README.md | 2 +- properties.schema | 4 ++-- schema/contentobject.schema.json | 2 +- schema/course.schema.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 48f402d..37be619 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ Add to _course.json_. > **\_isShownInNavigationBar** (boolean): Allows **Page Level Progress** to appear in the navigation bar. Acceptable values are `true` and `false`. -> **\_showPageCompletion** (boolean): Set to `false` to have the overall progress calculated only from components that have been set to display in **Page Level Progress** (ignoring the completion of those that haven't). +> **\_showPageCompletion** (boolean): Set to `false` to have the overall progress calculated only from components that have been set to display in **Page Level Progress** (ignoring the completion of those that haven't). Defaults to `true`. > **\_showAtCourseLevel** (boolean): Allows **Page Level Progress** to display all content objects and the current page components together, or just the current page components as before. Acceptable values are `true` and `false`. diff --git a/properties.schema b/properties.schema index 1ba551c..e9df3b8 100644 --- a/properties.schema +++ b/properties.schema @@ -144,7 +144,7 @@ "title": "Show page completion", "inputType": "Checkbox", "validators": [], - "help": "Controls whether the progress calculations are based on all components - or only those that are set to be displayed in Page Level Progress." + "help": "When enabled, the overall course progress will be calculated for all components. When disabled, only components that are set to be displayed in Page Level Progress will be included in the calculations. Defaults to enabled." }, "_isCompletionIndicatorEnabled": { "type": "boolean", @@ -201,7 +201,7 @@ "title": "Show page completion", "inputType": "Checkbox", "validators": [], - "help": "Controls whether the progress calculations for this page are based on all components and the overall page - or only the components that are set to be displayed in Page Level Progress." + "help": "When enabled, the overall progress for this page will be calculated for all components. When disabled, only components that are set to be displayed in Page Level Progress will be included in the calculations. Defaults to enabled." }, "_isCompletionIndicatorEnabled": { "type": "boolean", diff --git a/schema/contentobject.schema.json b/schema/contentobject.schema.json index 179804c..9a742fa 100644 --- a/schema/contentobject.schema.json +++ b/schema/contentobject.schema.json @@ -21,7 +21,7 @@ "_showPageCompletion": { "type": "boolean", "title": "Include overall page completion", - "description": "Controls whether the progress calculations for this page are based on all components and the overall page - or only the components that are set to be displayed in Page Level Progress", + "description": "When enabled, the overall progress for this page will be calculated for all components. When disabled, only components that are set to be displayed in Page Level Progress will be included in the calculations. Defaults to enabled.", "default": true }, "_isCompletionIndicatorEnabled": { diff --git a/schema/course.schema.json b/schema/course.schema.json index 4366dea..370657b 100644 --- a/schema/course.schema.json +++ b/schema/course.schema.json @@ -130,7 +130,7 @@ "_showPageCompletion": { "type": "boolean", "title": "Include overall page completion", - "description": "Controls whether the progress calculations are based on all components - or only those that are set to be displayed in Page Level Progress", + "description": "When enabled, the overall course progress will be calculated for all components. When disabled, only components that are set to be displayed in Page Level Progress will be included in the calculations. Defaults to enabled.", "default": true }, "_isCompletionIndicatorEnabled": { From b1676255f5e33f640af29eb7cff55b6f22616eff Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 30 May 2024 08:45:43 +0000 Subject: [PATCH 04/12] Chore(release): 7.6.3 [skip ci] ## [7.6.3](https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/compare/v7.6.2...v7.6.3) (2024-05-30) ### Fix * Clarify _showPageCompletion functionality (fixes #215) #219 ([060e88c](https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/commit/060e88ca3dc8321899d316a87b407ae40e521226)), closes [#215](https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/issues/215) [#219](https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/issues/219) --- bower.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index 614fdcb..648c382 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-pageLevelProgress", - "version": "7.6.2", + "version": "7.6.3", "framework": ">=5.31.0", "homepage": "https://github.com/adaptlearning/adapt-contrib-pageLevelProgress", "bugs": "https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/issues", diff --git a/package.json b/package.json index 614fdcb..648c382 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-pageLevelProgress", - "version": "7.6.2", + "version": "7.6.3", "framework": ">=5.31.0", "homepage": "https://github.com/adaptlearning/adapt-contrib-pageLevelProgress", "bugs": "https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/issues", From 3e193cc6eb14ed4685c8250b7b7d70a1b785dc66 Mon Sep 17 00:00:00 2001 From: Oliver Foster Date: Thu, 30 May 2024 17:33:21 +0100 Subject: [PATCH 05/12] New: Added progressive ItemsComponentModel bars (#221) --- js/PageLevelProgressIndicatorView.js | 9 ++++++++- js/adapt-contrib-pageLevelProgress.js | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/js/PageLevelProgressIndicatorView.js b/js/PageLevelProgressIndicatorView.js index 571f387..20f7627 100644 --- a/js/PageLevelProgressIndicatorView.js +++ b/js/PageLevelProgressIndicatorView.js @@ -1,4 +1,5 @@ import Adapt from 'core/js/adapt'; +import ItemsComponentModel from 'core/js/models/itemsComponentModel'; class PageLevelProgressIndicatorView extends Backbone.View { @@ -41,7 +42,7 @@ class PageLevelProgressIndicatorView extends Backbone.View { } else { this.listenTo(Adapt, 'remove', this.remove); } - this.listenTo(Adapt.course, 'bubble:change:_isComplete', this.refresh); + this.listenTo(Adapt.course, 'bubble:change:_isComplete bubble:change:_isVisited', this.refresh); } setPercentageComplete() { @@ -51,6 +52,12 @@ class PageLevelProgressIndicatorView extends Backbone.View { } calculatePercentage() { + const isPresentationComponentWithItems = (!this.model.isTypeGroup('question') && this.model instanceof ItemsComponentModel); + if (isPresentationComponentWithItems) { + const children = this.model.getChildren(); + const visited = children.filter(child => child.get('_isVisited')); + return Math.round(visited.length / children.length * 100); + } return this.model.get('_isComplete') ? 100 : 0; } diff --git a/js/adapt-contrib-pageLevelProgress.js b/js/adapt-contrib-pageLevelProgress.js index 62a6a7d..73bddd0 100644 --- a/js/adapt-contrib-pageLevelProgress.js +++ b/js/adapt-contrib-pageLevelProgress.js @@ -58,7 +58,7 @@ class PageLevelProgress extends Backbone.Controller { 'router:contentObject': this.renderNavigationView }); - this.listenTo(Adapt.course, 'bubble:change:_isComplete', this.onCompletionChange); + this.listenTo(Adapt.course, 'bubble:change:_isComplete bubble:change:_isVisited', this.onCompletionChange); } onCompletionChange(event) { From a0941e0277f67c6d801db07c57f4b9ca3dae2017 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 30 May 2024 16:33:48 +0000 Subject: [PATCH 06/12] Chore(release): 7.7.0 [skip ci] # [7.7.0](https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/compare/v7.6.3...v7.7.0) (2024-05-30) ### New * Added progressive ItemsComponentModel bars (#221) ([3e193cc](https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/commit/3e193cc6eb14ed4685c8250b7b7d70a1b785dc66)), closes [#221](https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/issues/221) --- bower.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index 648c382..bb4d30d 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-pageLevelProgress", - "version": "7.6.3", + "version": "7.7.0", "framework": ">=5.31.0", "homepage": "https://github.com/adaptlearning/adapt-contrib-pageLevelProgress", "bugs": "https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/issues", diff --git a/package.json b/package.json index 648c382..bb4d30d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-pageLevelProgress", - "version": "7.6.3", + "version": "7.7.0", "framework": ">=5.31.0", "homepage": "https://github.com/adaptlearning/adapt-contrib-pageLevelProgress", "bugs": "https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/issues", From af6fbab9b512b842d01b2860ee2fc34009f8a0f2 Mon Sep 17 00:00:00 2001 From: Brad Simpson Date: Fri, 7 Jun 2024 02:49:24 -0600 Subject: [PATCH 07/12] New: Add option to show course-level progress on PLP nav button (fixes #226) (#227) * Add course level completion option to nav button * Allow _showAtCourseLevel to be false when using course level for the nav bar * Documentation and schemas * Update new property name to _useCourseProgressInNavigationButton --- README.md | 4 +++- example.json | 3 ++- js/PageLevelProgressNavigationView.js | 6 ++++++ properties.schema | 9 +++++++++ schema/course.schema.json | 6 ++++++ 5 files changed, 26 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 37be619..b0d1c45 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,9 @@ Add to _course.json_. > **\_showPageCompletion** (boolean): Set to `false` to have the overall progress calculated only from components that have been set to display in **Page Level Progress** (ignoring the completion of those that haven't). Defaults to `true`. -> **\_showAtCourseLevel** (boolean): Allows **Page Level Progress** to display all content objects and the current page components together, or just the current page components as before. Acceptable values are `true` and `false`. +> **\_showAtCourseLevel** (boolean): Allows **Page Level Progress** to display all content objects and the current page components together, or just the current page components as before. Acceptable values are `true` and `false`. Defaults to `false`. + +> **\_useCourseProgressInNavigationButton** (boolean): Allows **Page Level Progress** to use course-level completion for the navigation button instead of page-level completion. Defaults to `false`. Add to _contentObjects.json_. diff --git a/example.json b/example.json index 8be68f9..4dfecf2 100644 --- a/example.json +++ b/example.json @@ -20,7 +20,8 @@ "_showPageCompletion": true, "_isCompletionIndicatorEnabled": true, "_isShownInNavigationBar": true, - "_showAtCourseLevel": false + "_showAtCourseLevel": false, + "_useCourseProgressInNavigationButton": false } // To go on a contentObject diff --git a/js/PageLevelProgressNavigationView.js b/js/PageLevelProgressNavigationView.js index b3129ff..85341cc 100644 --- a/js/PageLevelProgressNavigationView.js +++ b/js/PageLevelProgressNavigationView.js @@ -68,6 +68,12 @@ export default class PageLevelProgressNavigationView extends NavigationButtonVie } _getPageCompletionPercentage() { + const courseConfig = Adapt.course.get('_pageLevelProgress'); + + if (courseConfig._useCourseProgressInNavigationButton) { + return completionCalculations.calculatePercentageComplete(Adapt.course); + } + return completionCalculations.calculatePercentageComplete(this.pageModel, true); } diff --git a/properties.schema b/properties.schema index e9df3b8..8aac358 100644 --- a/properties.schema +++ b/properties.schema @@ -172,6 +172,15 @@ "inputType": "Checkbox", "validators": [], "help": "Controls whether to display all content objects and the current page components together, or just the current page components." + }, + "_useCourseProgressInNavigationButton": { + "type": "boolean", + "required": true, + "default": false, + "title": "Use course-level progress on navigation button", + "inputType": "Checkbox", + "validators": [], + "help": "When enabled, the navigation button will show course-level progress rather than page-level progress. Defaults to disabled." } } } diff --git a/schema/course.schema.json b/schema/course.schema.json index 370657b..52668a8 100644 --- a/schema/course.schema.json +++ b/schema/course.schema.json @@ -148,6 +148,12 @@ "title": "Display all content objects and the current page components", "description": "Controls whether to display all content objects and the current page components together, or just the current page components", "default": false + }, + "_useCourseProgressInNavigationButton": { + "type": "boolean", + "title": "Use course-level progress on navigation button", + "description": "When enabled, the navigation button will show course-level progress rather than page-level progress. Defaults to disabled.", + "default": false } } } From ab3b4a4631069fe2a71c296fca5a4bcf992e4c16 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 7 Jun 2024 08:49:50 +0000 Subject: [PATCH 08/12] Chore(release): 7.8.0 [skip ci] # [7.8.0](https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/compare/v7.7.0...v7.8.0) (2024-06-07) ### New * Add option to show course-level progress on PLP nav button (fixes #226) (#227) ([af6fbab](https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/commit/af6fbab9b512b842d01b2860ee2fc34009f8a0f2)), closes [#226](https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/issues/226) [#227](https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/issues/227) --- bower.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index bb4d30d..40a9abd 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-pageLevelProgress", - "version": "7.7.0", + "version": "7.8.0", "framework": ">=5.31.0", "homepage": "https://github.com/adaptlearning/adapt-contrib-pageLevelProgress", "bugs": "https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/issues", diff --git a/package.json b/package.json index bb4d30d..40a9abd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-pageLevelProgress", - "version": "7.7.0", + "version": "7.8.0", "framework": ">=5.31.0", "homepage": "https://github.com/adaptlearning/adapt-contrib-pageLevelProgress", "bugs": "https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/issues", From b327bb78233559599b3c660043526781cfd248b8 Mon Sep 17 00:00:00 2001 From: Brad Simpson Date: Fri, 7 Jun 2024 07:48:55 -0600 Subject: [PATCH 09/12] Fix: Return correct calculation for presentation components with items (fixes #228) (#229) * Fix incorrect calculation for presentation components with items * Update js/PageLevelProgressIndicatorView.js Co-authored-by: Oliver Foster * Update js/PageLevelProgressIndicatorView.js Co-authored-by: Oliver Foster * Update js/PageLevelProgressIndicatorView.js Co-authored-by: Oliver Foster --------- Co-authored-by: Oliver Foster --- js/PageLevelProgressIndicatorView.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/PageLevelProgressIndicatorView.js b/js/PageLevelProgressIndicatorView.js index 20f7627..4183642 100644 --- a/js/PageLevelProgressIndicatorView.js +++ b/js/PageLevelProgressIndicatorView.js @@ -53,12 +53,14 @@ class PageLevelProgressIndicatorView extends Backbone.View { calculatePercentage() { const isPresentationComponentWithItems = (!this.model.isTypeGroup('question') && this.model instanceof ItemsComponentModel); + const isComplete = this.model.get('_isComplete'); + if (isComplete) return 100; if (isPresentationComponentWithItems) { const children = this.model.getChildren(); const visited = children.filter(child => child.get('_isVisited')); return Math.round(visited.length / children.length * 100); } - return this.model.get('_isComplete') ? 100 : 0; + return 0 } render() { From ebd565b40aa416002ffdd0fbd05b92ef8f921584 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 7 Jun 2024 13:49:22 +0000 Subject: [PATCH 10/12] Chore(release): 7.8.1 [skip ci] ## [7.8.1](https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/compare/v7.8.0...v7.8.1) (2024-06-07) ### Fix * Return correct calculation for presentation components with items (fixes #228) (#229) ([b327bb7](https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/commit/b327bb78233559599b3c660043526781cfd248b8)), closes [#228](https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/issues/228) [#229](https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/issues/229) --- bower.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index 40a9abd..60e94fb 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-pageLevelProgress", - "version": "7.8.0", + "version": "7.8.1", "framework": ">=5.31.0", "homepage": "https://github.com/adaptlearning/adapt-contrib-pageLevelProgress", "bugs": "https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/issues", diff --git a/package.json b/package.json index 40a9abd..60e94fb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-pageLevelProgress", - "version": "7.8.0", + "version": "7.8.1", "framework": ">=5.31.0", "homepage": "https://github.com/adaptlearning/adapt-contrib-pageLevelProgress", "bugs": "https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/issues", From 9b4e8a70dda7d0699d2e5fb68dca548448f72562 Mon Sep 17 00:00:00 2001 From: Oliver Foster Date: Wed, 12 Jun 2024 10:05:38 +0100 Subject: [PATCH 11/12] New: Added correctness classes to progress bars and arialabels to drawer buttons (#225) --- js/PageLevelProgressIndicatorView.js | 12 ++++++++++-- templates/pageLevelProgressItem.jsx | 10 ++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/js/PageLevelProgressIndicatorView.js b/js/PageLevelProgressIndicatorView.js index 4183642..35e37e1 100644 --- a/js/PageLevelProgressIndicatorView.js +++ b/js/PageLevelProgressIndicatorView.js @@ -86,9 +86,17 @@ class PageLevelProgressIndicatorView extends Backbone.View { checkCompletion() { const percentage = this.setPercentageComplete(); + const isComplete = (percentage === 100); + const canShowMarking = Boolean(this.model.get('_canShowMarking')); + const isCorrect = (canShowMarking && isComplete && this.model.get('_isCorrect') === true); + const isPartlyCorrect = (canShowMarking && isComplete && this.model.get('_isCorrect') === false && this.model.get('_isAtLeastOneCorrectSelection')); + const isIncorrect = (canShowMarking && isComplete && this.model.get('_isCorrect') === false && !this.model.get('_isAtLeastOneCorrectSelection')); this.$el - .toggleClass('is-complete', percentage === 100) - .toggleClass('is-incomplete', percentage !== 100); + .toggleClass('is-complete', isComplete) + .toggleClass('is-incomplete', !isComplete) + .toggleClass('is-correct', isCorrect) + .toggleClass('is-partially-correct', isPartlyCorrect) + .toggleClass('is-incorrect', isIncorrect); } } diff --git a/templates/pageLevelProgressItem.jsx b/templates/pageLevelProgressItem.jsx index cb16f2e..a611c7a 100644 --- a/templates/pageLevelProgressItem.jsx +++ b/templates/pageLevelProgressItem.jsx @@ -13,6 +13,9 @@ export default function PageLevelProgressItem(props) { _isLocked, _isVisible, _isComplete, + _isCorrect, + _isAtLeastOneCorrectSelection, + _canShowMarking, title, altTitle, _id, @@ -20,6 +23,10 @@ export default function PageLevelProgressItem(props) { _children } = props; + const isCorrect = (_canShowMarking && _isComplete && _isCorrect === true); + const isPartlyCorrect = (_canShowMarking && _isComplete && _isCorrect === false && _isAtLeastOneCorrectSelection); + const isIncorrect = (_canShowMarking && _isComplete && _isCorrect === false && !_isAtLeastOneCorrectSelection); + const indicatorSeat = React.createRef(); useEffect(() => { if (_isOptional) return; @@ -57,6 +64,9 @@ export default function PageLevelProgressItem(props) { _isOptional && `${_globals._extensions._pageLevelProgress.optionalContent}.`, !_isOptional && _isComplete && `${_globals._accessibility._ariaLabels.complete}.`, !_isOptional && !_isComplete && `${_globals._accessibility._ariaLabels.incomplete}.`, + isCorrect && `${_globals._accessibility._ariaLabels.answeredCorrectly}.`, + isPartlyCorrect && `${_globals._accessibility._ariaLabels.answeredPartlyCorrect ?? _globals._accessibility._ariaLabels.answeredIncorrectly}.`, + isIncorrect && `${_globals._accessibility._ariaLabels.answeredIncorrectly}.`, compile(a11y.normalize(altTitle || title)) ])} > From df1ae020e7678212f70896ef270e3dff6fb9dc4b Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 12 Jun 2024 09:06:11 +0000 Subject: [PATCH 12/12] Chore(release): 7.9.0 [skip ci] # [7.9.0](https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/compare/v7.8.1...v7.9.0) (2024-06-12) ### New * Added correctness classes to progress bars and arialabels to drawer buttons (#225) ([9b4e8a7](https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/commit/9b4e8a70dda7d0699d2e5fb68dca548448f72562)), closes [#225](https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/issues/225) --- bower.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index 60e94fb..ce58857 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-pageLevelProgress", - "version": "7.8.1", + "version": "7.9.0", "framework": ">=5.31.0", "homepage": "https://github.com/adaptlearning/adapt-contrib-pageLevelProgress", "bugs": "https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/issues", diff --git a/package.json b/package.json index 60e94fb..ce58857 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "adapt-contrib-pageLevelProgress", - "version": "7.8.1", + "version": "7.9.0", "framework": ">=5.31.0", "homepage": "https://github.com/adaptlearning/adapt-contrib-pageLevelProgress", "bugs": "https://github.com/adaptlearning/adapt-contrib-pageLevelProgress/issues",