Breaking: Version 2 improvements (fixes #29)#30
Breaking: Version 2 improvements (fixes #29)#30oliverfoster wants to merge 36 commits intomasterfrom
Conversation
|
Conflicts need resolved on this |
Logging improvements migrated from #26
|
Moved to resolve conflicts and brought in the logging improvements from #26 |
…ds in `ScoringSet` to query its models rather rather than the single parent model (which isn't always populated in a set). Fixed issues when evaluating correctness.
…rt attempt. Marked lifecycle callback hooks as protected methods, as calling these externally defeats the benefits of the LifecycleRenderer.
…ntrib-scoringAssessment#17. Resolved reset issues as the objective needs to wait until the set has been reset before updating the score and status - adjusted methods and logic accordingly so score and status can be handled separately by the sets lifecycle methods.
…class to keep this logic separate from the `ScoringSet`.
…ause the other sets hadn't yet been restored. Removed unnecessary overrides, with a decision to use inherited `ScoringSet` events and move from `'scoring:*'` to `'scoring:total:*'` - core framework listeners will be updated accoprdingly. Namespaced lifecycle events for clarity.
…`TotalSets` as the score logic for the modifiers is different, with the previous modifier scores not representing the score associated with that set.
…rather than the models, so it is easier to understand how the scores were updated. Fixed issue with logging modifier score changes when models become unavailable.
…dy but would need a direct import of the file, so exposed in same way as other methods and classes).
…te` and `isPassed`. Prevented potential for last registered set to be removed if attempting to deregister a set that hadn't been registered (no path in the current code where deregister receives an unregistered set, but added defensive coding in case a set authour breaks the inheritance chain).
| */ | ||
| onScoringSetReset(set) { | ||
| // TODO: determine if we should restart the sets on this model id only or all descendant sets as well | ||
| if (!set.model) return; |
There was a problem hiding this comment.
Not all sets have a single model, so resetting one of these will not reset all intersected sets. Should any set without a parent model actually allow a reset anyway?
There was a problem hiding this comment.
What happens when you give a parent model to your sets that currently have no parent model?
There was a problem hiding this comment.
Adding a parent model to something like a BucketSet, which is configured on the course model, will cause all sets with this parent to reset, even if those sets models don't intersect any other models (excluding course) associated with the set being reset. This prevents the ability to only reset one set configured at the course level.
Suggest amending the logic to match the TODO comment and use:
const sets = filterSetsByIntersectingModels(getAllSets(), set.models);There was a problem hiding this comment.
We should talk about this.
…passmark criteria (fixes #28).
…sues in `Lifecycle`.
…ted and set-weighted scaled scores. See https://github.com/adaptlearning/adapt-contrib-scoring/pull/30/changes#r3129702139.
…ecting models of the set being reset - see https://github.com/adaptlearning/adapt-contrib-scoring/pull/30/changes#r3173433396. Tidied some jsdoc comments.
|
This is quite a big change and not what was in the to-do comment. It looks like you've done intersecting sets, which also include ancestors. |
fixes #29
Fix
Update
isAvailableInHierarchyto account for detached models.orderavailableComponentsetcset,getSet.., etcStateandObjectiveapisinit,restore,start,reset,restart,visit,leaveandupdate, fully integrating adapt-contrib-modifiersNew
TotalSetsto replace the set behaviour on the mainAdapt.scoringAPIBreaking