You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a plugin that shows blocks in an article where the article has _lockType: sequential on its block models, the article also has trickle enabled at the article level.
The block models are set to _isLocked: true initially:
// Apply only changed locking statesObject.entries(locks).forEach(([id,isModelLocked])=>{constmodel=modelsById[id];constwasLocked=model.get('_isLocked');if(wasLocked===isModelLocked)return;model.set('_isLocked',isModelLocked);});
This can be fixed using the lockedAttributes for the AdaptModel, allowing trickle and core to force the model attribute to _isLocked: true until the same plugin unlocks it. Core essentially overrides trickle at the attribute level until core is ready to unlock the model.
The text was updated successfully, but these errors were encountered:
Subject of the issue
We have a plugin that shows blocks in an article where the article has
_lockType: sequential
on its block models, the article also has trickle enabled at the article level.The block models are set to
_isLocked: true
initially:adapt-contrib-core/js/models/adaptModel.js
Line 783 in e5a18ef
Trickle then overrides the block models when it comes to set the
_isLocked
attributes on the course descendants:https://github.com/adaptlearning/adapt-contrib-trickle/blob/6a84eb56fef11116860c4fabdd0d41281498fd14/js/models.js#L239
This can be fixed using the
lockedAttributes
for theAdaptModel
, allowing trickle and core to force the model attribute to_isLocked: true
until the same plugin unlocks it. Core essentially overrides trickle at the attribute level until core is ready to unlock the model.The text was updated successfully, but these errors were encountered: