CoursePath
Guides a learner through modules.
kor/ui/CoursePathSource
When to use
- Use it for courses, onboarding and certification.
Examples
Safety training
<k:CoursePath title="Work safety" press=".onPress">
<k:CourseModule key="1" title="Introduction" text="8 min" kind="video" progress="100"/>
<k:CourseModule key="2" title="Protective equipment" text="15 min" progress="40"/>
<k:CourseModule key="3" title="Quiz" kind="quiz" locked="true"/>
<k:CourseModule key="4" title="Certificate" kind="exam" locked="true"/>
</k:CoursePath>
sap.ui.define(["sap/ui/core/mvc/Controller", "kor/ui/Toast"], (Controller, Toast) => Controller.extend("sample.Course", {
onPress(event) {
Toast.show(String(event.getParameter("key")));
}
}));
API
Properties
| Name | Type | Default | Description |
|---|
title | string | | Course |
text | string | | Description |
Aggregations
| Name | Type | Description |
|---|
modules | CourseModule[] | Modules |
Events
| Name | Type | Description |
|---|
press | key: string | An unlocked module was pressed |
CourseModule
A course module.
Properties
| Name | Type | Default | Description |
|---|
key | string | | Key |
title | string | | Name |
text | string | | Duration or description |
kind | string | reading | video, quiz, exam, lab, reading or live |
icon | string | | Replaces the kind icon |
progress | float | 0 | Progress, 0 to 100 |
score | string | | Result shown when finished |
locked | boolean | false | Whether it is locked |
Related
ProgressStages