Registers the e-learning ("Learning") application, which adds structured programs, courses, modules and quizzes to a website. Wires the feature into the platform: admin pages for managing courses, modules, certificates and quiz submissions; menu entries and portlets for both the admin console and the website; search indexers for module status, course status, learning log, quiz attempt and quiz answer records; custom profile fields and journey builder node types driven by learning progress; and CPD award, module field and quiz answer reports. Other server code reaches this class through the platform context to look up dashboard modules and courses for a profile, record module start/completion, and check whether learning content is indexed for an organisation.
Implements: MenuApplication, PriviledgeApplication, PortletApplication, EventListener, ChildPageApplication, BrowsableApplication, DataResourceApplication, ReportingApplication, TemplatingApplication, ManageProfileApplication, SearchableApplication, SettingsApplication, ComponentApplication, DependentApplication, JourneyBuilderApplication, FieldProviderApplication, ProfileMappingSourceApplication, TableUploadApplication, SharingApplication
Properties
| Property | Returns | Description |
|---|---|---|
| instanceId | String | Unique key this application is registered under, used by the application manager to look up and activate the Learning app for a website or organisation. |
| learningAppIndexer | ModuleStatusAppIndexer | Search indexer that indexes module status records - a profile's progress against a learning module - for this application. |
| learningLogAppIndexer | LearningLogAppIndexer | Search indexer that indexes learning log entries, the start and completion events recorded against a profile's module progress. |
| quizAnswerAppIndexer | QuizAnswerAppIndexer | Search indexer that indexes individual quiz answer records submitted as part of a quiz attempt. |
| quizAttemptAppIndexer | QuizAttemptAppIndexer | Search indexer that indexes quiz attempt records, a profile's attempt at a quiz within a module. |
| roles | List<Role> | Roles registered by this application: the Learner role granted to enrolled users, and the Learning Administrator role used to manage courses, modules and results. |
Methods
getInstanceId() · getLearningAppIndexer() · getLearningLogAppIndexer() · getQuizAttemptAppIndexer() · getQuizAnswerAppIndexer() · getModuleStatuses(Profile profile) · getCompletedStatuses(Profile profile) · onModuleComplete(ModuleStatus moduleStatus, RootFolder rf) · onModuleStarted(ModuleStatus moduleStatus, RootFolder rf) · findDashboardCourses() · findModuleFolder(WebsiteRootFolder wrf, String programCode, String courseCode, String moduleCode) · findAvailableModulesForProfile(ProfileBean profileBean) · findAvailableModulesForProfile(Profile profile) · findDashboardModules() · searchModuleStatuses(String program, String course, String module) · searchModuleStatuses(String program, String course, String module, Integer start, Integer pageSize) · searchModuleStatuses(String program, String course, String module, Date start, Date finish) · searchModuleStatuses(String q, Integer start, Integer pageSize) · findBestItems(List<ModuleFolder> dashboardModules, List<CourseFolder> courses) · getRoles() · indexLearningSetting(Organisation org) · indexLearningEnabled(Organisation org) · getStartedModulePaths(Profile p, Website website, boolean onlyCompleted) · getAllModulePaths(Branch branch) · getAvailableModules(CourseFolder c)
getInstanceId()
Returns: String
Unique key this application is registered under, used by the application manager to look up and activate the Learning app for a website or organisation.
getLearningAppIndexer()
Returns: ModuleStatusAppIndexer
Search indexer that indexes module status records - a profile's progress against a learning module - for this application.
getLearningLogAppIndexer()
Returns: LearningLogAppIndexer
Search indexer that indexes learning log entries, the start and completion events recorded against a profile's module progress.
getQuizAttemptAppIndexer()
Returns: QuizAttemptAppIndexer
Search indexer that indexes quiz attempt records, a profile's attempt at a quiz within a module.
getQuizAnswerAppIndexer()
Returns: QuizAnswerAppIndexer
Search indexer that indexes individual quiz answer records submitted as part of a quiz attempt.
getModuleStatuses(Profile profile)
Returns: List<ModuleStatus>
Looks up every module status recorded for the given profile within the current organisation, covering modules in progress and completed.
| Parameter | Description |
|---|---|
profile | the profile whose module statuses are looked up |
getCompletedStatuses(Profile profile)
Returns: List<ModuleStatus>
Looks up the module statuses for the given profile within the current organisation that are marked complete.
| Parameter | Description |
|---|---|
profile | the profile whose completed module statuses are looked up |
onModuleComplete(ModuleStatus moduleStatus, RootFolder rf)
Returns: void
Records that a module has been completed, delegating to the learning manager to log the completion, award any points or certificates, and update the module status.
| Parameter | Description |
|---|---|
moduleStatus | the module status that has just been completed |
rf | the root folder the module was completed within |
onModuleStarted(ModuleStatus moduleStatus, RootFolder rf)
Returns: void
Records that a module has been started, writing a "started" entry to the learning log for the module status.
| Parameter | Description |
|---|---|
moduleStatus | the module status that has just been started |
rf | the root folder the module was started within |
findDashboardCourses()
Returns: List<CourseFolder>
Finds the courses relevant to the currently logged in user's dashboard, based on the user's enrolments in the current website.
findModuleFolder(WebsiteRootFolder wrf, String programCode, String courseCode, String moduleCode)
Returns: ModuleFolder
Looks up a module folder by its program, course and module codes within the given website's programs folder.
| Parameter | Description |
|---|---|
wrf | the website root folder whose programs are searched |
programCode | the code of the program the module belongs to |
courseCode | the code of the course the module belongs to |
moduleCode | the code of the module to find |
findAvailableModulesForProfile(ProfileBean profileBean)
Returns: List<ModuleFolder>
Finds the modules the supplied profile is able to start or continue, resolved from the courses the profile's enrolments give it access to in the current website.
| Parameter | Description |
|---|---|
profileBean | wraps the profile whose available modules are looked up |
findAvailableModulesForProfile(Profile profile)
Returns: List<ModuleFolder>
Finds the modules the supplied profile is able to start or continue, resolved from the courses the profile's enrolments give it access to in the current website.
| Parameter | Description |
|---|---|
profile | the profile whose available modules are looked up |
findDashboardModules()
Returns: List<ModuleFolder>
Finds the modules relevant to the currently logged in user's dashboard: modules the user has started but not finished, followed by modules the user is now able to start.
searchModuleStatuses(String program, String course, String module)
Returns: List<ModuleStatus>
Searches module statuses in the current organisation by program, course and module code, over the common reporting date range taken from the current request.
| Parameter | Description |
|---|---|
program | the program code to filter by, or null to match any program |
course | the course code to filter by, or null to match any course |
module | the module code to filter by, or null to match any module |
searchModuleStatuses(String program, String course, String module, Integer start, Integer pageSize)
Returns: Map
Searches module statuses in the current organisation by program, course and module code, over the common reporting date range, returning a single page of results plus the total match count.
| Parameter | Description |
|---|---|
program | the program code to filter by, or null to match any program |
course | the course code to filter by, or null to match any course |
module | the module code to filter by, or null to match any module |
start | the zero-based offset of the first record to return |
pageSize | the maximum number of records to return |
searchModuleStatuses(String program, String course, String module, Date start, Date finish)
Returns: List<ModuleStatus>
Searches module statuses in the current organisation by program, course and module code, over an explicit date range.
| Parameter | Description |
|---|---|
program | the program code to filter by, or null to match any program |
course | the course code to filter by, or null to match any course |
module | the module code to filter by, or null to match any module |
start | the start of the date range to search within |
finish | the end of the date range to search within |
searchModuleStatuses(String q, Integer start, Integer pageSize)
Returns: Map
Searches module statuses in the current organisation using a free-text query, over the common reporting date range, returning a single page of results plus the total match count.
| Parameter | Description |
|---|---|
q | the free-text search query |
start | the zero-based offset of the first record to return |
pageSize | the maximum number of records to return |
findBestItems(List<ModuleFolder> dashboardModules, List<CourseFolder> courses)
Returns: List<? extends DirectoryResource>
Chooses whether to present courses or individual modules on the dashboard, based on which list is a better fit once there are too many items to display cleanly: courses are shown once there are more than two courses or more than six modules, otherwise the modules themselves are shown.
| Parameter | Description |
|---|---|
dashboardModules | the candidate modules to show on the dashboard, may be null |
courses | the candidate courses to show on the dashboard, may be null |
getRoles()
Returns: List<Role>
Roles registered by this application: the Learner role granted to enrolled users, and the Learning Administrator role used to manage courses, modules and results.
indexLearningSetting(Organisation org)
Returns: String
Reads the organisation's "indexLearning" configuration setting, which controls whether module status is included in search indexing.
| Parameter | Description |
|---|---|
org | the organisation whose setting is read, may be null |
indexLearningEnabled(Organisation org)
Returns: boolean
Checks whether learning content should be indexed for the given organisation, defaulting to enabled when the "indexLearning" setting has not been configured.
| Parameter | Description |
|---|---|
org | the organisation to check |
getStartedModulePaths(Profile p, Website website, boolean onlyCompleted)
Returns: List<String>
Builds the program/course/module code paths for the modules the given profile has started within the given website, optionally restricted to modules the profile has completed.
| Parameter | Description |
|---|---|
p | the profile whose started modules are looked up |
website | the website to restrict results to |
onlyCompleted | if true, only include modules the profile has completed |
getAllModulePaths(Branch branch)
Returns: List<String>
Walks the given branch's content to find every program/course/module path it contains, caching the result against the branch's current head so repeated calls for an unchanged branch avoid re-walking the content tree.
| Parameter | Description |
|---|---|
branch | the branch to walk for module paths |
getAvailableModules(CourseFolder c)
Returns: List<ModuleFolder>
Finds the modules a user should tackle next within the given course: the incomplete modules at the lowest ordered "level" that still has any incomplete module.
| Parameter | Description |
|---|---|
c | the course to find available modules within |