Documentation
Cross Lesson
Description
Cross Lesson addon is used to link to other lessons and courses.
Properties
Property name | Description |
---|---|
Text | Text displayed by the addon. |
Image | Image displayed while not in the selected state.
This property allows online resources. Find out more ยป |
Defined lesson id | The defined id of the target resource. It can be set in the lesson properties tab. |
Course id | The id of the course containing the target resource. If this property is left empty, it is assumed that the target lesson is part of the currently selected course. Course ID can be found in a manage courses to export page on mAuthor. It's visible in brackets |
Page | Id of the target page. If this property is left empty, the addon will link to the first page of the target resource. The page Id can be accessed in the editor in the "Properties" menu of the page. It's a multi-character code that looks like "yu0vI5m6JJ7NzhVS". |
Type | Specifies wheter the target resource is a lesson or an ebook. |
Supported commands
Command name | Params | Description |
---|---|---|
requestCrossLesson | --- | Opens a new tab or window with the resource specified in the addon. |
show | --- | Shows the addon. |
hide | --- | Hides the addon. |
Managing in custom LMS
In case of managing the cross lesson addon in a custom LMS, it is necessary to connect to the player external event bus:
player.onExternalEvent((eventName: string, data: string) => {
});
Cross lesson addon calls this method with the provided data:
- eventName:
"crossLesson"
- data: JSON string which contains:
- lessonID: Id from
Defined lesson id
property. - type: Type from
Type
property. - page: Optional value from
page
property. - courseID: Optional value from
Course ID
property.
- lessonID: Id from
Optional values may not be defined in JSON string. It depends on the addon configuration.