Wraps the program folders on a website's branch and provides lookups for programs, courses and modules by their codes. Built by LearningManager for a single website and branch, it is used from learning templates to resolve module titles, list a group's enrolments, and track which program, course and module are currently selected in the reporting UI via cookies.


Properties

PropertyReturnsDescription
allProgramsList<ProgramFolder>All program folders available on this website's branch, regardless of the current user's access.
availProgramsList<ProgramFolder>Program folders from this website's branch that are available to the current user, lazily computed and cached for the lifetime of this model.
selectedCourseCourseFolderThe course currently selected for reporting within the selected program, read from the "reportingCourse" cookie.
selectedCoursesList<CourseFolder>The courses currently selected for reporting within the first selected program, read from the "reportingCourse" cookie. The cookie may hold a single course code or a JSON-style array of codes.
selectedModuleModuleFolderThe module currently selected for reporting within the selected course, read from the "reportingModule" cookie.
selectedModulesList<ModuleFolder>The modules currently selected for reporting within the first selected course, read from the "reportingModule" cookie. The cookie may hold a single module code or a JSON-style array of codes.
selectedProgramProgramFolderThe program currently selected for reporting, read from the "reportingProgram" cookie.
selectedProgramsList<ProgramFolder>The programs currently selected for reporting, read from the "reportingProgram" cookie. The cookie may hold a single program code or a JSON-style array of codes.

Methods

getModuleTitle(ModuleStatus ms) · getModuleTitle(String progCode, String courseCode, String moduleName) · getModuleFolder(ModuleStatus ms) · getModuleFolder(String progCode, String courseCode, String moduleName) · enrolementsForGroup(Group g) · getAllPrograms() · getAvailPrograms() · getSelectedProgram() · getSelectedPrograms() · getSelectedCourse() · getCourseFolder(String progCode, String courseCode) · getSelectedCourses() · getSelectedModule() · getSelectedModules() · program(String name) · course(String program, String course) · getEnrolement(Group g, ProgramFolder p) · isSelected(Group g, ProgramFolder p) · notSelected(Group g, ProgramFolder p) · isCompletable(Group g, ProgramFolder p) · findModuleFolder(ModuleStatus ms)

getModuleTitle(ModuleStatus ms)

Returns: String

Resolves the display title of the module a module status refers to.

ParameterDescription
msthe module status identifying the program, course and module

getModuleTitle(String progCode, String courseCode, String moduleName)

Returns: String

Resolves the display title of a module identified by program, course and module code.

ParameterDescription
progCodethe program code
courseCodethe course code
moduleNamethe module code

getModuleFolder(ModuleStatus ms)

Returns: ModuleFolder

Finds the module folder that a module status refers to, looked up by the status's program, course and module codes.

ParameterDescription
msthe module status identifying the program, course and module

getModuleFolder(String progCode, String courseCode, String moduleName)

Returns: ModuleFolder

Finds the module folder identified by program, course and module code.

ParameterDescription
progCodethe program code
courseCodethe course code
moduleNamethe module code

enrolementsForGroup(Group g)

Returns: List<EnrolementModel>

Loads all learning enrolments recorded against a group, each paired with its resolved program folder. Queries the database, so this is not cheap.

ParameterDescription
gthe group whose enrolments are loaded

getAllPrograms()

Returns: List<ProgramFolder>

All program folders available on this website's branch, regardless of the current user's access.

getAvailPrograms()

Returns: List<ProgramFolder>

Program folders from this website's branch that are available to the current user, lazily computed and cached for the lifetime of this model.

getSelectedProgram()

Returns: ProgramFolder

The program currently selected for reporting, read from the "reportingProgram" cookie.

getSelectedPrograms()

Returns: List<ProgramFolder>

The programs currently selected for reporting, read from the "reportingProgram" cookie. The cookie may hold a single program code or a JSON-style array of codes.

getSelectedCourse()

Returns: CourseFolder

The course currently selected for reporting within the selected program, read from the "reportingCourse" cookie.

getCourseFolder(String progCode, String courseCode)

Returns: CourseFolder

Finds the course folder identified by program and course code.

ParameterDescription
progCodethe program code
courseCodethe course code

getSelectedCourses()

Returns: List<CourseFolder>

The courses currently selected for reporting within the first selected program, read from the "reportingCourse" cookie. The cookie may hold a single course code or a JSON-style array of codes.

getSelectedModule()

Returns: ModuleFolder

The module currently selected for reporting within the selected course, read from the "reportingModule" cookie.

getSelectedModules()

Returns: List<ModuleFolder>

The modules currently selected for reporting within the first selected course, read from the "reportingModule" cookie. The cookie may hold a single module code or a JSON-style array of codes.

program(String name)

Returns: ProgramFolder

Finds a program folder by its name.

ParameterDescription
namethe program's name

course(String program, String course)

Returns: CourseFolder

Finds a course folder by program name and course name.

ParameterDescription
programthe program's name
coursethe course's name

getEnrolement(Group g, ProgramFolder p)

Returns: EnrolementModel

Finds the group's enrolment in a program, wrapped with the program folder for display.

ParameterDescription
gthe group to find the enrolment for
pthe program to look for an enrolment in

isSelected(Group g, ProgramFolder p)

Returns: boolean

Whether a group is enrolled in a program.

ParameterDescription
gthe group to check
pthe program to check enrolment in

notSelected(Group g, ProgramFolder p)

Returns: boolean

Whether a group is not enrolled in a program. The inverse of isSelected.

ParameterDescription
gthe group to check
pthe program to check enrolment in

isCompletable(Group g, ProgramFolder p)

Returns: boolean

Whether a group's enrolment in a program can be marked complete.

ParameterDescription
gthe group to check
pthe program to check

findModuleFolder(ModuleStatus ms)

Returns: ModuleFolder

Finds the module folder that a module status refers to, by walking from the program to the course to the module using the status's codes.

ParameterDescription
msthe module status identifying the program, course and module
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.