Skip to content

Conversation

@markcummins
Copy link
Contributor

Resolves #7599

Proposed Changes

This code syncs the Lesson Author and the Course Author (or Course Teacher). It ensures that the lesson author is the same as the course author, and makes sure that the current Course Teacher is able to access and edit all of the lessons in the course.

Testing Instructions

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
Before the update, the course teacher would not be able to edit Lesson C, as they would not be the Author of the lesson. After the update, they would be able to edit all the lessons in the course.

Pre-Merge Checklist

  • PR title and description contain sufficient detail and accurately describe the changes
  • Adheres to coding standards (PHP, JavaScript, CSS, HTML)
  • All strings are translatable (without concatenation, handles plurals)
  • Follows our naming conventions (P6rkRX-4oA-p2)
  • Hooks (p6rkRX-1uS-p2) and functions are documented
  • New UIs are responsive and use a mobile-first approach
  • Code is tested on the minimum supported PHP and WordPress versions

@markcummins
Copy link
Contributor Author

Hi,

This is an updated version of the original commit I made here:
#7600

Apologies for opening a new PR but it was some time since I made the original PR.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Course Teacher goes out of sync if a new Lesson is added after a Course is published

1 participant