Open MaryOJob opened 1 year ago
This would require a bit more thought around doing this, as we'd most likely have to do it for all modules.
Releasing this into production would need more thought as the current temporary workaround for this does the job, but it will cause some 404 links - I think we should handle that better once we look into this feature in more detail.
Temporary solution
You will need to ensure that you change or add in 'post_status' => array( 'publish', 'draft' )
on the following lines of code:
Thinking about production, we could add in a filter to make it easily extendible. However, I'm more concerned about how to handle draft lessons on a published course as it will show up under the course on the frontend and show a 404 error.
We could hide the draft lesson from the frontend or show it but hide the link. We need more input around expected behavior for these cases as it may happen and may not be ultimately clear to admins/site owners.
Summary of my thoughts:
My Course (#123 - draft)
When a draft lesson is not yet published, it cannot be added to a course.
A site owner might want to create a course with a future publishing date, but have all their content (lessons) ready and assigned to the said course and saved in the draft, if they are not able to add the lessons saved to the draft, they would need to wait till the day of publishing to publish all lessons then add to the course.