Course Teacher goes out of sync if a new Lesson is added after a Course is published
Opened this issue · 0 comments
markcummins commented
Steps to Reproduce
- Create a New Course and Lessons (e.g. Lesson A and Lesson B)
- Set the Course Teacher to be another User
- Add another Lesson and assign it to the Course (e.g. Lesson C)
- Log in as the Course Teacher
What I Expected
When I logged in as the Course teacher, I expected to be able to Edit All the lessons for the course
What Happened Instead
I was only able to edit the lessons that were added before the Teacher was assigned to the Course
PHP / WordPress / Sensei LMS version
PHP Version: 8.2.7
WordPress: 6.5.2
Sensei: 4.23.1
Browser / OS version
Chrome: 124.0.6367.78
Context / Source
I believe that when you set the Course teacher, it sets the course teacher as the author for all of the lessons. If you later add another lesson to the course, the lesson can have a different author, and therefore the teacher won't be able to access it.