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

PropertyReturnsDescription
instanceIdStringUnique key this application is registered under, used by the application manager to look up and activate the Learning app for a website or organisation.
learningAppIndexerModuleStatusAppIndexerSearch indexer that indexes module status records - a profile's progress against a learning module - for this application.
learningLogAppIndexerLearningLogAppIndexerSearch indexer that indexes learning log entries, the start and completion events recorded against a profile's module progress.
quizAnswerAppIndexerQuizAnswerAppIndexerSearch indexer that indexes individual quiz answer records submitted as part of a quiz attempt.
quizAttemptAppIndexerQuizAttemptAppIndexerSearch indexer that indexes quiz attempt records, a profile's attempt at a quiz within a module.
rolesList<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.

ParameterDescription
profilethe 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.

ParameterDescription
profilethe 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.

ParameterDescription
moduleStatusthe module status that has just been completed
rfthe 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.

ParameterDescription
moduleStatusthe module status that has just been started
rfthe 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.

ParameterDescription
wrfthe website root folder whose programs are searched
programCodethe code of the program the module belongs to
courseCodethe code of the course the module belongs to
moduleCodethe 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.

ParameterDescription
profileBeanwraps 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.

ParameterDescription
profilethe 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.

ParameterDescription
programthe program code to filter by, or null to match any program
coursethe course code to filter by, or null to match any course
modulethe 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.

ParameterDescription
programthe program code to filter by, or null to match any program
coursethe course code to filter by, or null to match any course
modulethe module code to filter by, or null to match any module
startthe zero-based offset of the first record to return
pageSizethe 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.

ParameterDescription
programthe program code to filter by, or null to match any program
coursethe course code to filter by, or null to match any course
modulethe module code to filter by, or null to match any module
startthe start of the date range to search within
finishthe 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.

ParameterDescription
qthe free-text search query
startthe zero-based offset of the first record to return
pageSizethe 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.

ParameterDescription
dashboardModulesthe candidate modules to show on the dashboard, may be null
coursesthe 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.

ParameterDescription
orgthe 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.

ParameterDescription
orgthe 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.

ParameterDescription
pthe profile whose started modules are looked up
websitethe website to restrict results to
onlyCompletedif 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.

ParameterDescription
branchthe 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.

ParameterDescription
cthe course to find available modules within
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.