Update Tutor LMS Lesson


Changes a Tutor LMS lesson: title, content, published or draft, featured image, downloadable attachments, video (a YouTube, Vimeo or other video URL, and its duration), and whether it is a free preview. Only the fields given change; the lesson's other settings, attachments and video are kept, which a plain post update would lose. attachment_ids replaces the lesson's whole attachment list. To move the lesson to another topic or position, use mosmcp/tutor-move-content. Get lesson IDs from mosmcp/tutor-get-course.

Also known as: edit lesson, add video to lesson, lesson attachments, publish lesson, free preview lesson, lesson content.

Property Value
Ability slug mosmcp/tutor-update-lesson
Wire tool name mosmcp__tutor-update-lesson
Category Tutor LMS (mosmcp-tutor)
Plan Pro

 

Required access

Requirement Value
Capability edit_tutor_lessons
Minimum default role Administrator
Annotations readOnly: false · destructive: false · idempotent: true · openWorld: false

 

Input schema

Field Type Required Default Description
lesson_id integer (min 1) Yes — The lesson ID, as listed by mosmcp/tutor-get-course.
title string (min length 1) — New lesson title.
content string — New lesson content, replacing the old. HTML is saved the way the WordPress editor saves it: a user with the unfiltered_html capability can save any markup, including forms, scripts and styles, and markup a user is not allowed to save is refused with the reason rather than silently removed. Backslashes are kept.
status string (one of draft, publish) — "publish" so students can see it, or "draft".
featured_image_id integer (min 0) — Media library image ID, or 0 to remove the image.
attachment_ids integer[] — Media library file IDs students can download from the lesson, replacing the current list. Empty to remove them all.
video_url string — The lesson video's address: a YouTube or Vimeo link, or a direct video URL. Empty to remove the video.
video_duration string | integer — The video's length, shown to students: h:mm:ss, mm:ss, or seconds.
preview boolean — Make the lesson a free preview that anyone can open without enrolling. Shown by Tutor LMS Pro's Course Preview add-on.

 

Output schema

Field Type Required Description
id integer Yes
type string lesson, quiz, assignment, or another kind an add-on adds.
title string Yes
status string Yes
order integer Sort key in its topic: lower comes first. Tutor's builder may start at 0.
preview boolean Lessons: whether it is a free preview.
video_source string Lessons: where the video comes from (youtube, vimeo, external_url, html5 for an upload, embedded, shortcode), empty when there is none.
video_url string Lessons: the video's web address for youtube, vimeo and external_url sources, otherwise empty.
has_attachments boolean Lessons: whether it has downloadable files.
question_count integer Quizzes: how many questions it has.
topic_id integer
course_id integer Yes
featured_image_id integer
attachment_ids integer[]
changed string[] Yes
view_url string
warnings object[] Notes about the save, such as markup that could not be kept.
warnings[].code string
warnings[].message string
warnings[].context string
notes string[]

 


<< Previous Next >>
Update Tutor LMS Course Update Tutor LMS Topic

For more information about the Secure MCP Server for WordPress plugin, explore the following resources:

Product Overview | Pricing | Try for Free | Documentation

If you have any questions regarding plugin configuration, pricing plans or licensing, please contact us or mail us at aisupport@xecurify.com.