Skip to content

Lesson Import Schema

Donna Peplinskie edited this page Nov 21, 2022 · 6 revisions

The following is the schema used for importing lessons in Sensei LMS 3.3+.

Please visit the importer documentation to learn more.

CSV Column Name Example Notes
Id 100 Optional. Unique identifier used to identify lesson prerequisites.
Lesson My Lesson Name Required.
Slug my-lesson-name Optional. Overwrites content with this slug if it already exists. Note that a lesson that has never been published will not be overwritten; a new lesson with the same name will be created instead.
Description This is the lesson description. Optional. HTML and block markup are supported.
Excerpt This is the lesson excerpt. Optional.
Status publish Optional. One of publish, pending or draft (default).
Module Module 1 Optional. The lesson must be attached to a course in order to associate a module. The module listed here must also be attached to that same course. The lesson is not associated with a module if a module with this name is not found.
Prerequisite 100 OR slug:lesson-slug OR id:100 Optional. To use a lesson that already exists on the site, use its post ID OR its slug by using the prefix slug:. Note that the lesson must have been published at some point in order to use the slug: prefix. To use a new lesson that is being added in this file, use the format id:100, where 100 is the value of the ID column for the applicable lesson.
Preview 1 Optional. 0 (default) or 1.
Tags Tag 1, Tag 2 Optional. Comma-separated list of lesson tags. Tags are created if they don’t already exist.
Image http://example.com/image.jpg OR image.jpg Optional. Images need to be pre-uploaded or available online in order to import them. Alternatively, the filename can be used if the image already exists in the media library.
Length 5 Lesson length in minutes. Must be greater than or equal to 1.
Complexity std Leave blank for None (default) or one of easy, std or hard.
Video <iframe width="560" height="315" src="https://www.youtube.com/embed/abc123" frameborder="0" allowfullscreen></iframe> Optional. Lesson video embed code.
Pass Required 1 Optional. 0 (default) or 1.
Passmark 50 Must be between 0 and 100, inclusive.
Number Of Questions 3 Leaving this blank means all questions will be displayed.
Random Question Order 1 Optional. 0 (default) or 1.
Auto-grade 0 Optional. 0 or 1 (default).
Quiz Reset 1 Optional. 0 (default) or 1.
Allow Comments 0 Optional. 0 or 1 (default).
Questions 100, slug:the-question-slug, id:100 Optional. Comma-separated list of new or existing question IDs. New questions are prefixed with id:, while existing IDs are unprefixed. To add a question that already exists on the site, use its post ID OR its slug by using the prefix slug:. To add a new question that will be uploaded simultaneously in a separate CSV file, use the format id:100, where 100 is the value of the ID column for the applicable question in the questions CSV file.
Clone this wiki locally