Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: adaptlearning/adapt-contrib-mcq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v7.3.10
Choose a base ref
...
head repository: adaptlearning/adapt-contrib-mcq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 19 commits
  • 11 files changed
  • 7 contributors

Commits on Apr 14, 2023

  1. Copy the full SHA
    a49a34c View commit details

Commits on Apr 17, 2023

  1. Merge pull request #206 from adaptlearning/issue/205

    Fix: Revert touch fix for react+safari for general fix in core
    eleanor-heath authored Apr 17, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    593e590 View commit details
  2. Chore(release): 7.3.11 [skip ci]

    ## [7.3.11](v7.3.10...v7.3.11) (2023-04-17)
    
    ### Fix
    
    * Revert touch fix for react+safari for general fix in core ([a49a34c](a49a34c))
    semantic-release-bot committed Apr 17, 2023
    Copy the full SHA
    f4fcdf9 View commit details

Commits on Apr 27, 2023

  1. Bump yaml and semantic-release (#208)

    Removes [yaml](https://github.com/eemeli/yaml). It's no longer used after updating ancestor dependency [semantic-release](https://github.com/semantic-release/semantic-release). These dependencies need to be updated together.
    
    
    Removes `yaml`
    
    Updates `semantic-release` from 19.0.3 to 21.0.1
    - [Release notes](https://github.com/semantic-release/semantic-release/releases)
    - [Commits](semantic-release/semantic-release@v19.0.3...v21.0.1)
    
    ---
    updated-dependencies:
    - dependency-name: yaml
      dependency-type: indirect
    - dependency-name: semantic-release
      dependency-type: direct:development
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Apr 27, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0e76762 View commit details

Commits on Oct 30, 2023

  1. Update: alternative item option text added (fixes #209) (#210)

    * add item altText property
    
    * add altText to schema
    
    * add altText example
    
    * add altText to schema
    
    * update README
    
    * Normalise altText
    
    Co-authored-by: Oliver Foster <[email protected]>
    
    ---------
    
    Co-authored-by: Oliver Foster <[email protected]>
    kirsty-hames and oliverfoster authored Oct 30, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3d4f9ba View commit details
  2. Chore(release): 7.4.0 [skip ci]

    # [7.4.0](v7.3.11...v7.4.0) (2023-10-30)
    
    ### Update
    
    * alternative item option text added (fixes #209) (#210) ([3d4f9ba](3d4f9ba)), closes [#209](#209) [#210](#210)
    semantic-release-bot committed Oct 30, 2023
    Copy the full SHA
    72ff275 View commit details

Commits on Nov 23, 2023

  1. remove ariaQuestion placeholder text (#212)

    kirsty-hames authored Nov 23, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    6a2bd26 View commit details

Commits on Jan 16, 2024

  1. Fix: Title added to altText in schemas. (#215)

    joe-allen-89 authored Jan 16, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    48dee46 View commit details
  2. Chore(release): 7.4.1 [skip ci]

    ## [7.4.1](v7.4.0...v7.4.1) (2024-01-16)
    
    ### Fix
    
    * Title added to altText in schemas. (#215) ([48dee46](48dee46)), closes [#215](#215)
    semantic-release-bot committed Jan 16, 2024
    Copy the full SHA
    18862ad View commit details

Commits on Feb 21, 2024

  1. Upgrade: Bump ip from 1.1.8 to 1.1.9 (#217)

    Bumps [ip](https://github.com/indutny/node-ip) from 1.1.8 to 1.1.9.
    - [Commits](indutny/node-ip@v1.1.8...v1.1.9)
    
    ---
    updated-dependencies:
    - dependency-name: ip
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 21, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    f585154 View commit details

Commits on Apr 11, 2024

  1. Chore: e2e tests on mcq component (Issue/218) (#219)

    lemmyadams authored Apr 11, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    feb7453 View commit details

Commits on Jun 18, 2024

  1. Fix: moved striphtml function outside loop (fixes #222)

    lemmyadams authored Jun 18, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    54e263a View commit details
  2. Chore(release): 7.4.2 [skip ci]

    ## [7.4.2](v7.4.1...v7.4.2) (2024-06-18)
    
    ### Chore
    
    * e2e tests on mcq component (Issue/218) (#219) ([feb7453](feb7453)), closes [#219](#219)
    
    ### Fix
    
    * moved striphtml function outside loop (fixes #222) ([54e263a](54e263a)), closes [#222](#222)
    
    ### Upgrade
    
    * Bump ip from 1.1.8 to 1.1.9 (#217) ([f585154](f585154)), closes [#217](#217)
    semantic-release-bot committed Jun 18, 2024
    Copy the full SHA
    58233b3 View commit details

Commits on Jul 1, 2024

  1. Fix: Bump braces from 3.0.2 to 3.0.3 (#223)

    Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
    - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
    - [Commits](micromatch/braces@3.0.2...3.0.3)
    
    ---
    updated-dependencies:
    - dependency-name: braces
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jul 1, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    b8a37a5 View commit details
  2. Chore(release): 7.4.3 [skip ci]

    ## [7.4.3](v7.4.2...v7.4.3) (2024-07-01)
    
    ### Fix
    
    * Bump braces from 3.0.2 to 3.0.3 (#223) ([b8a37a5](b8a37a5)), closes [#223](#223)
    semantic-release-bot committed Jul 1, 2024
    Copy the full SHA
    652de56 View commit details

Commits on Oct 8, 2024

  1. New: Added support for _canShowCorrectness (#224)

    oliverfoster authored Oct 8, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    be2018c View commit details
  2. Chore(release): 7.5.0 [skip ci]

    # [7.5.0](v7.4.3...v7.5.0) (2024-10-08)
    
    ### New
    
    * Added support for _canShowCorrectness (#224) ([be2018c](be2018c)), closes [#224](#224)
    semantic-release-bot committed Oct 8, 2024
    Copy the full SHA
    f21b8c3 View commit details

Commits on Oct 14, 2024

  1. Fix: Use aria-disabled instead of disabled on input (fixes #227) (#228)

    oliverfoster authored Oct 14, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    7cfc539 View commit details
  2. Chore(release): 7.5.1 [skip ci]

    ## [7.5.1](v7.5.0...v7.5.1) (2024-10-14)
    
    ### Fix
    
    * Use aria-disabled instead of disabled on input (fixes #227) (#228) ([7cfc539](7cfc539)), closes [#227](#227) [#228](#228)
    semantic-release-bot committed Oct 14, 2024
    Copy the full SHA
    13ca7d2 View commit details
Showing with 2,864 additions and 211 deletions.
  1. +5 −0 README.md
  2. +2 −2 bower.json
  3. +3 −1 example.json
  4. +0 −3 js/McqView.js
  5. +14 −0 less/mcq.less
  6. +2,761 −193 package-lock.json
  7. +2 −2 package.json
  8. +19 −0 properties.schema
  9. +15 −0 schema/component.schema.json
  10. +17 −10 templates/mcq.jsx
  11. +26 −0 test/e2e/mcq.cy.js
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -59,6 +59,8 @@ guide the learner’s interaction with the component.

**\_canShowModelAnswer** (boolean): Setting this to `false` prevents the [**_showCorrectAnswer** button](https://github.com/adaptlearning/adapt_framework/wiki/Core-Buttons) from being displayed. The default is `true`.

**\_canShowCorrectness** (boolean): Setting this to `true` replaces the associated `_canShowModelAnswer` toggle button and displays correctness directly on the component items. The default is `false`.

**\_canShowFeedback** (boolean): Setting this to `false` disables feedback, so it is not shown to the user. The default is `true`.

**\_canShowMarking** (boolean): Setting this to `false` prevents ticks and crosses being displayed on question completion. The default is `true`.
@@ -69,6 +71,9 @@ guide the learner’s interaction with the component.

>**text** (string): Text that comprises the multiple choice option.
>**altText** (string): This will be read out by screen readers instead of reading `text`.
Optional for providing alternative text, for example, to specify how a word should be pronounced.

>**\_shouldBeSelected** (boolean): Determines whether the *item* must be selected for the answer to be correct. Value can be `true` or `false`. The value of **\_selectable** can be smaller, match or exceed the total number of **\_items** where **\_shouldBeSelected** is set to `true`.
>**\_isPartlyCorrect** (boolean): Determines whether the *item* when selected marks the question as partly correct. Value can be `true` or `false`. Default is `false`.
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adapt-contrib-mcq",
"version": "7.3.10",
"version": "7.5.1",
"framework": ">=5.19.1",
"homepage": "https://github.com/adaptlearning/adapt-contrib-mcq",
"bugs": "https://github.com/adaptlearning/adapt-contrib-mcq/issues",
@@ -22,7 +22,7 @@
"@semantic-release/npm": "^9.0.1",
"@semantic-release/release-notes-generator": "^10.0.3",
"conventional-changelog-eslint": "^3.0.9",
"semantic-release": "^19.0.3"
"semantic-release": "^21.0.1"
},
"scripts": {
"postversion": "cp package.json bower.json"
4 changes: 3 additions & 1 deletion example.json
Original file line number Diff line number Diff line change
@@ -9,20 +9,22 @@
"displayTitle": "MCQ",
"body": "Which of the following options would you consider to be correct?",
"instruction": "Choose {{#if _isRadio}}one option{{else}}one or more options{{/if}} then select Submit.",
"ariaQuestion": "Question text specifically for screen readers.",
"ariaQuestion": "",
"_attempts": 1,
"_shouldDisplayAttempts": false,
"_isRandom": false,
"_hasItemScoring": false,
"_questionWeight": 1,
"_selectable": 1,
"_canShowModelAnswer": true,
"_canShowCorrectness": false,
"_canShowFeedback": true,
"_canShowMarking": true,
"_recordInteraction": true,
"_items": [
{
"text": "This is option 1 (Correct)",
"altText": "",
"_shouldBeSelected": true,
"_isPartlyCorrect": false
},
3 changes: 0 additions & 3 deletions js/McqView.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import QuestionView from 'core/js/views/questionView';
import device from 'core/js/device';

class McqView extends QuestionView {

@@ -26,7 +25,6 @@ class McqView extends QuestionView {
}

onItemFocus(event) {
if (device.touch) return;
if (!this.model.isInteractive()) return;
if (this.model.get('_isRadio')) {
this.onItemSelect(event);
@@ -38,7 +36,6 @@ class McqView extends QuestionView {
}

onItemBlur(event) {
if (device.touch) return;
const index = $(event.currentTarget).data('adapt-index');
const item = this.model.getChildren().findWhere({ _index: index });
item.set('_isHighlighted', false);
14 changes: 14 additions & 0 deletions less/mcq.less
Original file line number Diff line number Diff line change
@@ -26,6 +26,20 @@
&__widget.show-correct-answer &-item:not(.is-correct):not(.is-incorrect) .is-selected &-item__answer-icon {
display: block;
}


// Always show selection
// --------------------------------------------------
&__widget.show-correctness &-item__answer-icon {
display: block;
}

// Class to show the item correctness
// --------------------------------------------------
&__widget.show-correctness .is-correct &-item__correct-icon,
&__widget.show-correctness .is-incorrect &-item__incorrect-icon {
display: block;
}
}

.mcq-item {
Loading