Documentation
Cross Lesson
Description
The Cross Lesson module is used to link to other lessons and courses.
Properties
The list starts with the common properties, learn more about them by visiting the Modules description section. The other available properties are described below.
Property name | Description |
---|---|
Text | Text displayed by the module. |
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's properties tab. |
Course id | The ID of the course containing the target resource. If this property is left empty, the target lesson is assumed to be part of the currently selected course. Course ID can be found in the "Manage courses" to export page on mAuthor. It's visible in the brackets. |
Page | ID of the target page. If this property is left empty, the module 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 whether the target resource is a lesson, an ebook, or a course. |
Open in current tab | If marked, the target resource opens in the current tab. |
Lang attribute | This property allows defining the language for this module (different than the language of the lesson). |
Speech texts | Sets the values of speech texts - predefined phrases providing additional context while using the module in the Text To Speech mode. Speech texts are always read using the content's default language. |
Check if user has access to resource | If checked, the module communicates with the LMS and checks if the current user can access the course defined in the "Course id". If this value is not provided, it checks the courses defined in the "List of IDs required for access" field below. If LMS returns 'False', then the module is hidden. By default, the module is displayed. |
List of IDs required for access | List of courses' IDs required when checking for access. If there is more than one ID, they should be separated by a comma ",". |
Supported commands
Command name | Params | Description |
---|---|---|
requestCrossLesson | --- | Opens a new tab or window with the resource specified in the module. |
hide | --- | Hides the module if it is visible. |
show | --- | Shows the module if it is hidden. |
Managing in custom LMS
In case of managing the Cross Lesson module in a custom LMS, it is necessary to connect to the player's external event bus:
player.onExternalEvent((eventName: string, data: string) => {
});
The Cross Lesson module 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.
Optional values may not be defined in JSON string. It depends on the module's configuration.