Template helper exposing a profile's e-learning progress, CPD points and CPD awards to Velocity templates. Registered in the template data model as "learning" by LearningApp so themes can render module completion status, module field answers and continuing professional development (CPD) totals for the current profile and organisation. An instance is created per request/page, scoped to the current organisation, the resource being rendered and the current profile.


Properties

PropertyReturnsDescription
allCpdAwardsList<CpdAwardBean>All CPD (continuing professional development) awards made to the current profile.
modulesModuleFolderMapAll module folders under the current site's /programs folder, as a lazily-built lookup map keyed on the path in the form program/course/module. Never null.
totalCpdPointsIntegerTotal number of CPD (continuing professional development) points awarded to the current profile across all of their CPD awards.

Methods

getModuleStatuses(OrgData orgData, ModuleFolder moduleFolder) · getCompletedModuleStatuses(OrgData orgData, ModuleFolder moduleFolder) · getCompletedModuleStatuses(UserResource user, ModuleFolder moduleFolder) · getModuleStatuses(UserResource user, ModuleFolder moduleFolder) · getModuleStatusForUser(MembershipBean user, ModuleFolder moduleFolder) · moduleFieldNames() · moduleFieldNames(String websiteName) · moduleFieldValues(String websiteName, Profile profile) · moduleFieldValues(String websiteName, ProfileBean profile) · getModules() · getTotalCpdPoints() · getAllCpdAwards() · totalCpdPointsForCert(String certName) · cpdAwardsForCert(String certName)

getModuleStatuses(OrgData orgData, ModuleFolder moduleFolder)

Returns: List<ModuleStatus>

Finds all ModuleStatus records, representing modules in progress or completed, for every user within the given organisation for the module identified by the given module folder.

ParameterDescription
orgDatathe organisation whose users' module statuses are returned
moduleFolderthe module folder identifying the program, course and module to look up statuses for

getCompletedModuleStatuses(OrgData orgData, ModuleFolder moduleFolder)

Returns: List<ModuleStatus>

Finds the completed ModuleStatus records for every user within the given organisation for the module identified by the given module folder.

ParameterDescription
orgDatathe organisation whose users' completed module statuses are returned
moduleFolderthe module folder identifying the program, course and module to look up statuses for

getCompletedModuleStatuses(UserResource user, ModuleFolder moduleFolder)

Returns: List<ModuleStatus>

Finds the completed ModuleStatus records for the given user in the module identified by the given module folder.

ParameterDescription
userthe user whose completed module statuses are returned
moduleFolderthe module folder identifying the program, course and module to look up statuses for

getModuleStatuses(UserResource user, ModuleFolder moduleFolder)

Returns: List<ModuleStatus>

Finds all ModuleStatus records for the given user in the module identified by the given module folder, including both in-progress and completed attempts.

ParameterDescription
userthe user whose module statuses are returned
moduleFolderthe module folder identifying the program, course and module to look up statuses for

getModuleStatusForUser(MembershipBean user, ModuleFolder moduleFolder)

Returns: ModuleStatus

Finds the ModuleStatus record for the given membership in the module identified by the given module folder.

ParameterDescription
userthe membership whose module status is returned
moduleFolderthe module folder identifying the program, course and module to look up the status for

moduleFieldNames()

Returns: Map<String,List<String>>

Finds the names of all custom module fields that have been stored by any user, for any module, on the current site. The result is keyed on the module path in the form program/course/module, with each value being the list of field names recorded against that module.

moduleFieldNames(String websiteName)

Returns: Map<String,List<String>>

Finds the names of all custom module fields that have been stored by any user, for any module, on the named website. The result is keyed on the module path in the form program/course/module. Returns an empty map, and logs a warning, if the named website does not exist under the current organisation.

ParameterDescription
websiteNamethe name of the website to look up module field names for

moduleFieldValues(String websiteName, Profile profile)

Returns: Map<String,Map<String,String>>

Finds the custom module field answers recorded by the given profile on the named website. The result is keyed on the module path in the form program/course/module, with each value being a map of field name to the answer recorded for that field. Returns an empty map, and logs a warning, if the named website does not exist under the current organisation.

ParameterDescription
websiteNamethe name of the website to look up module field values for
profilethe profile whose recorded field answers are returned

moduleFieldValues(String websiteName, ProfileBean profile)

Returns: Map<String,Map<String,String>>

Finds the custom module field answers recorded by the given profile on the named website. Resolves the ProfileBean to a persisted Profile and delegates to moduleFieldValues(String, Profile). Returns an empty map if the profile cannot be resolved.

ParameterDescription
websiteNamethe name of the website to look up module field values for
profilethe profile bean whose recorded field answers are returned

getModules()

Returns: ModuleFolderMap

All module folders under the current site's /programs folder, as a lazily-built lookup map keyed on the path in the form program/course/module. Never null.

getTotalCpdPoints()

Returns: Integer

Total number of CPD (continuing professional development) points awarded to the current profile across all of their CPD awards.

getAllCpdAwards()

Returns: List<CpdAwardBean>

All CPD (continuing professional development) awards made to the current profile.

totalCpdPointsForCert(String certName)

Returns: Integer

Total number of CPD (continuing professional development) points awarded to the current profile from awards linked to the certificate with the given name.

ParameterDescription
certNamethe name of the certificate to total points for

cpdAwardsForCert(String certName)

Returns: List<CpdAwardBean>

CPD (continuing professional development) awards made to the current profile that are linked to the certificate with the given name.

ParameterDescription
certNamethe name of the certificate to filter CPD awards by
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.