Pairs an enrolment with the program folder it belongs to, and exposes convenience accessors used when listing a group's training enrolments. Instances are produced by ProgramsModel.enrolementsForGroup(Group) and ProgramsModel.getEnrolement(Group, ProgramFolder); the wrapped program folder may be null if the enrolled program can no longer be found, in which case the enrolment's own program and course codes are used as fallback labels.
Properties
| Property | Returns | Description |
|---|---|---|
| completable | boolean | Whether the enrolment has been marked as completable. |
| course | CourseFolder | Resolves the course folder the enrolment is for, by looking up the enrolled course code as a child of the program folder. Wraps any authorisation or bad request error from the lookup in a RuntimeException. |
| course | boolean | Whether this enrolment is for a specific course, as opposed to an entire program. |
| courseCode | String | Code of the course the enrolment is for, if any. |
| courseTitle | String | Display title of the enrolled course. |
| enrolement | Enrolement | The underlying enrolment entity this model wraps. |
| program | ProgramFolder | The resolved program folder for this enrolment. |
| programCode | String | Code of the program the enrolment is for. |
| programTitle | String | Display title of the enrolled program. |
| website | Website | The website the enrolment was recorded against. |
Methods
getEnrolement() · getWebsite() · getProgram() · getCourse() · isCompletable() · isCourse() · getProgramTitle() · getProgramCode() · getCourseCode() · getCourseTitle()
getEnrolement()
Returns: Enrolement
The underlying enrolment entity this model wraps.
getWebsite()
Returns: Website
The website the enrolment was recorded against.
getProgram()
Returns: ProgramFolder
The resolved program folder for this enrolment.
getCourse()
Returns: CourseFolder
Resolves the course folder the enrolment is for, by looking up the enrolled course code as a child of the program folder. Wraps any authorisation or bad request error from the lookup in a RuntimeException.
isCompletable()
Returns: boolean
Whether the enrolment has been marked as completable.
isCourse()
Returns: boolean
Whether this enrolment is for a specific course, as opposed to an entire program.
getProgramTitle()
Returns: String
Display title of the enrolled program.
getProgramCode()
Returns: String
Code of the program the enrolment is for.
getCourseCode()
Returns: String
Code of the course the enrolment is for, if any.
getCourseTitle()
Returns: String
Display title of the enrolled course.