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

cmi.objectives issues #316

Closed
oliverfoster opened this issue Apr 14, 2024 · 1 comment · Fixed by #317
Closed

cmi.objectives issues #316

oliverfoster opened this issue Apr 14, 2024 · 1 comment · Fixed by #317
Assignees

Comments

@oliverfoster
Copy link
Member

oliverfoster commented Apr 14, 2024

Reference

Forum post: https://community.adaptlearning.org/mod/forum/discuss.php?d=4223
LMS: KnowBe4
Original pr for addition of the cmi.objectives behaviour: #280

...KnowBe4 won't let you continue if there are any errors. You can upload your package but cannot add it to any training. The support folks have been good about manually pushing it through for us, but we are going to have monthly training for the next year or so and they always need to be uploaded, viewed by others, then edited and uploaded again. With the need to contact support each time it makes this a lengthy process. That is the impact I was trying to avoid.

Issues

  • No switch
    As with cmi.interactions there is a switch to enable/disable the behaviour. There is no such switch for cmi.objectives.

"_shouldRecordInteractions": true,

  • Lazy objective creation
    getObjectiveById returns the next objective id if no existing id is found in the objectives list. Subsequently, the id value must be set if a new id is created or the id must be reset unnecessarily if an existing id is found as the code does not differentiate between the two scenarios. This happens after the objective index is fetched at the following lines:

this.setValue(`${cmiPrefix}.id`, id);

this.setValue(`${cmiPrefix}.id`, id);

this.setValue(`${cmiPrefix}.id`, id);

The code should check for objective existence before setting the id so as not to unnecessarily reset it.

@oliverfoster oliverfoster self-assigned this Apr 14, 2024
@oliverfoster oliverfoster moved this from New to Assigned in adapt_framework: The TODO Board Apr 14, 2024
@oliverfoster oliverfoster changed the title No switch to enable or disable cmi.objectives behaviour cmi.objectives issues Apr 14, 2024
@oliverfoster oliverfoster moved this from Assigned to Needs Reviewing in adapt_framework: The TODO Board Apr 14, 2024
@github-project-automation github-project-automation bot moved this from Needs Reviewing to Recently Released in adapt_framework: The TODO Board Apr 29, 2024
github-actions bot pushed a commit that referenced this issue Apr 29, 2024
## [5.9.8](v5.9.7...v5.9.8) (2024-04-29)

### Chore

* Readme updates for broken links, clarity, and linting errors (fixes #312) (#313) ([df90b8d](df90b8d)), closes [#312](#312) [#313](#313)

### Fix

* Added cmi.objectives _recordObjectives and id existence check (fixes #316) (#317) ([71e88df](71e88df)), closes [#316](#316) [#317](#317)

### Upgrade

* Bump ip from 1.1.8 to 1.1.9 (#311) ([1728659](1728659)), closes [#311](#311)
Copy link

🎉 This issue has been resolved in version 5.9.8 🎉

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
1 participant