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

Fix: postRender automatically setting blank component as completed #46

Merged
merged 5 commits into from
Jan 16, 2023

Conversation

cahirodoherty-learningpool
Copy link
Contributor

Fixes #45

Fix

  • postRender automatically setting blank component as completed on page view

Testing

  1. Create a course with blank components and page level progress
  2. PLP should fill immediately on page load
  3. Clicking PLP will show blank components individually have completed

@paulstevendev
Copy link

Our requirements are that the blank component behaves according to the "Is this optional" setting. We use this component to determine if a user has viewed a page by placing a blank component at the top of each page with all other components set to optional. Therefore if you place a blank component at the top of the page and set it to NOT optional I would expect the menu of the course not to detect the page as complete until the user opens the page. This is how it currently works with the open source blank component but the Learning Pool one appears to act as optional despite the setting that has been set for "Is this optional"

@paulstevendev
Copy link

paulstevendev commented Nov 16, 2022

Here are some grabs showing a course with a single page that contains a blank component that is NOT optional. I have turned off the blank component appearing in the page level progress on the page.
You will see when I launch the course, the page is marked as incomplete.
Opening the page then returning to the menu you will see it is now complete.

image

image

image

I can see when I look in the console that the course lesson status changes to "completed" when I open the page

SCORM.data.set('cmi.core.lesson_status') value: completed
SCORM_API_wrapper.js:914 SCORM.data.set('cmi.suspend_data') value: {"a11y":false,"lang":"en","c":"hIA","q":"gw4XEDAcAbhgAA"}
adapt.min.js:1 INFO: course._isComplete: true, course._isAssessmentPassed: false, block completion: -0
SCORM_API_wrapper.js:914 SCORM.data.set('cmi.suspend_data') value: {"a11y":false,"lang":"en","c":"hIA","q":"gw4XEDAcAbhgAA"}
adapt.min.js:1 INFO: course._isComplete: true, course._isAssessmentPassed: false, block completion: -0

@oliverfoster
Copy link
Member

oliverfoster commented Dec 5, 2022

Would you get the same outcome by adding _isOptional: true default to the schema?
https://github.com/adaptlearning/adapt-contrib-blank/blob/master/example.json#L7
https://github.com/adaptlearning/adapt-contrib-blank/blob/master/properties.schema

That would retain the inviewability of the blank completion.

@cahirodoherty-learningpool
Copy link
Contributor Author

Yes this is part of the difference that you are seeing @paulstevendev. The LearningPool AT will override these components and set them as optional always. We want to remove this when the new component functionality is added.
The changes to the blank component would effectively make page completion occur upon opening when a blank component is on that page and is the only non-optional component. Does that make sense?

@paulstevendev
Copy link

@cahirodoherty-learningpool - the suggestion @oliverfoster has made sounds like a good compromise. If you did have a page where all the non blank components are set to optional then adding any blank components with a default setting of optional would result in page completion occur upon opening the course. However forcing the blank component to always act as optional is not an ideal solution for us so hopefully you can go with the suggestion by @oliverfoster

@cahirodoherty-learningpool
Copy link
Contributor Author

Yeah that works for us. I've just pushed another commit

@paulstevendev
Copy link

paulstevendev commented Dec 6, 2022

Thanks Cahir - so just to clarify, we will still be able to set the blank component as not-optional and it will respect that? Hence if we set the blank component to not-optional, a page that contains this blank component will need to be opened before the page completes?

Copy link

@chris-steele chris-steele left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes eminent sense

properties.schema Outdated Show resolved Hide resolved
js/blankView.js Outdated Show resolved Hide resolved
Co-authored-by: Oliver Foster <[email protected]>
Co-authored-by: Oliver Foster <[email protected]>
@oliverfoster
Copy link
Member

Taking @paulstevendev as implicit +1

@oliverfoster oliverfoster merged commit 36b330c into master Jan 16, 2023
@oliverfoster oliverfoster deleted the issue/45 branch January 16, 2023 10:55
@github-actions
Copy link

🎉 This PR is included in version 4.1.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@paulstevendev
Copy link

paulstevendev commented Jan 24, 2023

It doesn't appear that there are any properties appearing in the AT now for the blank component so it is impossible to set this to NOT optional.

Testing:
info [24 Jan 23 09:56:13 +00:00] Adapt authoring tool 0.11.1.
info [24 Jan 23 09:56:13 +00:00] Adapt framework 5.24.8.

Blank component: 4.1.4

image

@cahirodoherty-learningpool
Copy link
Contributor Author

It doesn't appear that there are any properties appearing in the AT now for the blank component so it is impossible to set this to NOT optional.

Testing: info [24 Jan 23 09:56:13 +00:00] Adapt authoring tool 0.11.1. info [24 Jan 23 09:56:13 +00:00] Adapt framework 5.24.8.

Blank component: 4.1.4

image

Issue to resolve this raised here: #51

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

Successfully merging this pull request may close these issues.

Blank components should always be marked as complete
4 participants