Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutor "inline" fails to modify buttons #102

Closed
chucklorenz opened this issue Jul 28, 2023 · 1 comment · Fixed by #103
Closed

Tutor "inline" fails to modify buttons #102

chucklorenz opened this issue Jul 28, 2023 · 1 comment · Fixed by #103
Assignees

Comments

@chucklorenz
Copy link
Member

Subject of the issue/enhancement/features

When Tutor's feedback is set to '"_type": "inline"', Tutor's README is not in sync with its actual behaviour. I don't know which is correct.

My environment

  • FW v5.31.17
  • Tutor v4.5.8
  • MCQ v7.3.11
  • Chrome desktop

Steps to reproduce

  1. Install Tutor in the demo course installed with the FW.
  2. Add the following code to course.json:
"_tutor": {
        "_type": "notify",
        "_classes": "",
        "_hasNotifyBottomButton": false,
        "_button": {
            "text": "{{_globals._extensions._tutor.hideFeedback}}",
            "ariaLabel": "{{_globals._extensions._tutor.hideFeedback}}"
        }
},
  1. Add the following code to the first MCQ ("_id": "c-60"):
"_tutor": {
        "_isInherited": false,
        "_type": "inline",
        "_classes": "",
        "_hasNotifyBottomButton": false,
        "_button": {
            "text": "{{_globals._extensions._tutor.hideFeedback}}",
            "ariaLabel": "{{_globals._extensions._tutor.hideFeedback}}"
        }
},
  1. Run course and submit a selection of the MCQ--correct or incorrect, doesn't matter.

Expected behaviour

According to the README, I should expect that "inline" will modify the buttons, hiding btn__feedback and adding the is-full-width class to btn__action. I expect this to cause the "Show correct answer" button to become full-width and to cause the "Show feedback" button to disappear.

Actual behaviour

Inline feedback appears below the component, but the buttons remain unmodified as in the following pic. No new classes are added to the buttons.
image
While the "Show feedback" label is meaningless since the feedback is already displayed, at least the button remains disabled.

I find this actual behaviour regardless of choosing a correct or incorrect option and whether the _tutor config is included or not in course.json.

@joe-allen-89 joe-allen-89 self-assigned this Aug 10, 2023
@joe-allen-89 joe-allen-89 transferred this issue from adaptlearning/adapt-contrib-core Aug 10, 2023
joe-allen-89 added a commit that referenced this issue Aug 11, 2023
) (#103)

* Fix: Incorrect return early logic in onButtonsViewPostRender

* Fix: asString removed from TUTOR_TYPE throughtout.
github-actions bot pushed a commit that referenced this issue Aug 11, 2023
## [4.5.9](v4.5.8...v4.5.9) (2023-08-11)

### Chore

* Semantic release GHA packages version bump (#99) ([ffc89fc](ffc89fc)), closes [#99](#99)

### Fix

* Incorrect return early logic in onButtonsViewPostRender (fixes #102) (#103) ([b8f1844](b8f1844)), closes [#102](#102) [#103](#103)
@github-actions
Copy link

🎉 This issue has been resolved in version 4.5.9 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants