Open thomasplevy opened 2 years ago
When an item from condition 1 above is added, the post will automatically have it's membership restriction settings updated to include the current membership
Ok but let's do on save, right?
Oh yea, on save for sure.
This isn't a fully-fledged feature either... I was just thinking about it and wanted to capture the idea.
For one: if a plan is deleted from the course side the course should be removed from the membership and if the course is removed from the membership the course plan should be removed. Probably.
I'm thinking this entire UI should be built in react as a block-editor "plugin". Using the strategy we used for some react stuff related to certificates we could also place this interface outside the editor if it should ever become necessary, I think.
The problem
Users who create memberships and wish to provide access to a large-number of courses end up using the course auto-enrollment feature to add every course to the membership.
The UX (for students) and performance implications of this are not ideal for what the users are trying to achieve: they want the users to have access to all the courses.
Proposed solution
Building on our "membership associated posts" concepts LLMS_Membership::get_associated_posts()
We could provide an interface (on the membership's admin panel) to add posts to this list from within the membership, in bulk.
There are 3 conditions defined for a membership-associated post:
UI already exists for item 2 (the auto-enroll interface) but I think we can rework this UI and create a wholly new UI:
Associated Posts
In this area we'll list out all the associated posts, grouped by post type. The tables should list out the title, id, and have edit / frontend view links as well as an actions area.
Actions are "Remove" and for any enrollable post-type the ability to mark the item as "Auto-enroll"
We should add a warning somewhere when the auto-enroll list grows to be larger than 10 items. Something like "We suggest keeping the auto-enrollment list to 10 items or fewer to improve the student's user experience and prevent performance degradation on larger websites" (or something)
The interface will provide an "Add item" button, when clicked a modal will open to search for qualified posts (by default post, page, courses)
When an item from condition 1 above is added, the post will automatically have it's membership restriction settings updated to include the current membership
When an item from condition 3 above is added, we will automatically create a free members-only access plan for the course.