Grants a group access to a training programme, or to a single course within a programme, on one website. Enrolements are always held against a group, never directly against a profile, so a person is enroled by being a member of an enroled group and a profile's enrolements are found by walking its group memberships. The programme and course are stored as their codes rather than as foreign keys, and leaving the course code null enrols the group in the whole programme. The completable flag decides whether members can actually complete modules and earn certification and rewards, or only view the content. Enrolements are audited, so changes are recorded and can be restored.
Group: Database Entities
Implements: Serializable, Auditable
Properties
| Property | Returns | Description |
|---|---|---|
| auditOrg | Organisation | The organisation this enrolement's audit records are written against, taken from the enroled group. Throws if the enroled group has not been set. |
| completable | boolean | Whether members of the enroled group can complete the material rather than just read it. When true they can complete modules, sit any assessment, and be issued certification and rewards. When false they may view the content but cannot be issued any certification or other completion status. |
| createdDate | Date | When the enrolement was created. Mandatory, and stored as a date with no time component. |
| enroledCourse | String | Code of the single course the group is enroled in. Optional: when it is set the group has access only to that course, and when it is null the group is enroled in the whole programme. |
| enroledGroup | Group | The group being granted access. Required. Enrolements are never held directly against a profile, so a person gains access by being a member of this group. |
| enroledProgram | String | Code of the programme the group is enroled in. Mandatory, and stored as the code rather than as a foreign key, so renaming a programme does not update existing enrolements. |
| id | long | Database generated primary key for this enrolement. |
| modifiedDate | Date | When the enrolement was last changed. Mandatory, and stored as a date with no time component, so it does not distinguish two changes made on the same day. |
| promotion | Reward | The promotion that granted this enrolement, or null if it was granted directly. Set when access to training comes from taking part in a promotion rather than from an administrator enroling the group. |
| website | Website | The website the enrolement applies to. Required, so the same group can be enroled in the same programme on two websites as two separate rows. |
Methods
getWebsite() · setWebsite(Website website) · getEnroledGroup() · setEnroledGroup(Group enroledEntity) · getEnroledCourse() · setEnroledCourse(String enroledCourse) · getEnroledProgram() · setEnroledProgram(String enroledProgram) · getId() · getCreatedDate() · setCreatedDate(Date createdDate) · getModifiedDate() · setModifiedDate(Date modifiedDate) · isCompletable() · setCompletable(boolean completable) · getPromotion() · setPromotion(Reward promotion) · getAuditOrg()
getWebsite()
Returns: Website
The website the enrolement applies to. Required, so the same group can be enroled in the same programme on two websites as two separate rows.
setWebsite(Website website)
Returns: void
Sets the website this enrolement applies to. Required.
| Parameter | Description |
|---|---|
website | the website the enrolement applies to |
getEnroledGroup()
Returns: Group
The group being granted access. Required. Enrolements are never held directly against a profile, so a person gains access by being a member of this group.
setEnroledGroup(Group enroledEntity)
Returns: void
Sets the group being granted access. Required.
| Parameter | Description |
|---|---|
enroledEntity | the group to enrol |
getEnroledCourse()
Returns: String
Code of the single course the group is enroled in. Optional: when it is set the group has access only to that course, and when it is null the group is enroled in the whole programme.
setEnroledCourse(String enroledCourse)
Returns: void
Sets the course the group is enroled in, or clears it to enrol the group in the whole programme.
| Parameter | Description |
|---|---|
enroledCourse | the course code, or null for a whole programme enrolement |
getEnroledProgram()
Returns: String
Code of the programme the group is enroled in. Mandatory, and stored as the code rather than as a foreign key, so renaming a programme does not update existing enrolements.
setEnroledProgram(String enroledProgram)
Returns: void
Sets the code of the programme the group is enroled in. Required.
| Parameter | Description |
|---|---|
enroledProgram | the programme code |
getId()
Returns: long
Database generated primary key for this enrolement.
getCreatedDate()
Returns: Date
When the enrolement was created. Mandatory, and stored as a date with no time component.
setCreatedDate(Date createdDate)
Returns: void
Sets the date the enrolement was created. Required.
| Parameter | Description |
|---|---|
createdDate | the creation date |
getModifiedDate()
Returns: Date
When the enrolement was last changed. Mandatory, and stored as a date with no time component, so it does not distinguish two changes made on the same day.
setModifiedDate(Date modifiedDate)
Returns: void
Sets the date the enrolement was last changed. Required, and not updated automatically, so set it yourself when you change an enrolement.
| Parameter | Description |
|---|---|
modifiedDate | the modification date |
isCompletable()
Returns: boolean
Whether members of the enroled group can complete the material rather than just read it. When true they can complete modules, sit any assessment, and be issued certification and rewards. When false they may view the content but cannot be issued any certification or other completion status.
setCompletable(boolean completable)
Returns: void
Sets whether members of the group can complete the material and earn certification, as opposed to only viewing it.
| Parameter | Description |
|---|---|
completable | true to allow completion, certification and rewards |
getPromotion()
Returns: Reward
The promotion that granted this enrolement, or null if it was granted directly. Set when access to training comes from taking part in a promotion rather than from an administrator enroling the group.
setPromotion(Reward promotion)
Returns: void
Links this enrolement to the promotion that granted it.
| Parameter | Description |
|---|---|
promotion | the granting promotion, or null if the enrolement was granted directly |
getAuditOrg()
Returns: Organisation
The organisation this enrolement's audit records are written against, taken from the enroled group. Throws if the enroled group has not been set.