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

Trickle issue with reset assessment #190

Closed
oliverfoster opened this issue Nov 20, 2023 · 1 comment · Fixed by #189
Closed

Trickle issue with reset assessment #190

oliverfoster opened this issue Nov 20, 2023 · 1 comment · Fixed by #189
Assignees

Comments

@oliverfoster
Copy link
Member

oliverfoster commented Nov 20, 2023

Subject of the issue

Trickle adds its models after the assessment is initialised, therefore when an assessment restores its original block models upon resetting, it can exclude a laterly configured trickle button.

Trickle models are injected into blocks and articles at adapt:start, from adaptlearning/adapt-contrib-trickle#197
https://github.com/adaptlearning/adapt-contrib-trickle/blob/82a1c23f24f6508d6ed8c0a65e23ddb11ae9d8ad/js/controller.js#L29-L40

Assessment keeps its article's original children at the model init processes, before trickle has added its children.

this._originalChildModels = this.getChildren().models;

Assessment then restores its article's original children when it is reset, removing any subsequently added trickle button.
this.getChildren().reset(this._originalChildModels);

@oliverfoster oliverfoster self-assigned this Nov 20, 2023
@oliverfoster oliverfoster transferred this issue from adaptlearning/adapt-contrib-trickle Nov 21, 2023
@oliverfoster oliverfoster changed the title Issue with reset assessment Trickle issue with reset assessment Nov 21, 2023
Copy link

🎉 This issue has been resolved in version 5.1.10 🎉

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