Copies a lesson, inserts the copy directly after the original and renumbers the rest of the section.
The copy takes a "(Copy)" suffix, incremented if that title is already used in the section, and gets a fresh slug. Attached documents are copied too. Every sibling lesson is renumbered so the new ordering is contiguous.
Endpoint
Method:
POSTPath:
/admin/courses/{course_id}/lessons/{lesson_id}/duplicateEdition: Core
Controller:
CourseAdminController@duplicateLessonRoute source:
fluent-community/Modules/Course/Http/course_api.php:60Controller source:
fluent-community/Modules/Course/Http/Controllers/CourseAdminController.phpRequires a course admin for this course, or a WordPress user with
manage_options.
Live sample
The request and response below were recorded against a running FluentCommunity install and then anonymised — member names, emails, avatars and post content are fictional, and long collections are trimmed to a few entries.
POST Post Duplicate Lesson
Copies a lesson, inserts the copy directly after the original and renumbers the rest of the section.
Controller: CourseAdminController@duplicateLesson
Route source: fluent-community/Modules/Course/Http/course_api.php:60
Authorizations
WordPress Application Passwords — use Basic auth with username:application_password.
Parameters
Path Parameters
Course ID extracted from the URL path.
Lesson ID extracted from the URL path.
Responses
Successful response