Offering Rule Matrix
1 | Course Name | TRG-OHS-2205 Working at Height Training for Workers | EO Costa Atlantica PDR - Technical Training Qualification Card | Confined Spaces | |
2 | Course Path | /Root/Carnival/CMG/HESS/WorkingHeightWorker | /Root/Carnival/CMG/PDRs/EO/CostaAtlantica/PDR3 | /Root/Carnival/CMG/EOT/ConfinedSpaces | |
3 | Registration Type | OneTime | ReRegistration | Deactivated | |
4 | Re-Registration Before Certificate Expiry | 30d | |||
5 | Certificate Short Id | CourseCompleted1Y | |||
6 | De-Registration | ||||
7 | |||||
8 | |||||
9 | |||||
10 | |||||
11 | |||||
12 | OPF Name | OPF Value | |||
13 | Vessel | Shore | !x | ||
14 | Vessel | AIDAblue | x | ||
15 | Vessel | Costa Atlantica | x | x | |
16 | Rank | Captain | |||
17 | Rank | Engineer | x | x | |
18 | Rank | Environmental Officer | x |
Matrix Rows
Course Name
A human readable name of the course - this is not used in any rule creation (information only).
Course Path
Full LMS path to the course the rule applies to.
Registration Type
A registration type determines the behaviour of the course like re-occurring or only one-time registration.
OneTime: one time registration - doesn't re-register as soon as a completed registration exists (uses predicate HasNoRegistrations())
ReRegistration: re-registers users in combination of a Certificate with expiry (column Certificate Short Id is mandatory). Uses predicates !HasActiveRegistrations() and CertificateWillExpire(..) (a user without a certificate will get registered because the predicate CertificateWillExpire(..) returns true for that case.
OnlyWithCompletedRegistration: registers and re-registers users who have already at least one completed registration. This is only available in combination with a Certificate with expiry (column Certificate Short Id is mandatory). Uses predicates HasCompletedRegistrations(), !HasActiveRegistrations() and CertificateWillExpire(..)
Deactivated: a course which was in use before but has been discontinued. This creates a delete NavPage attribute to delete any rule for this course (differentiates between Student and Instructor)
No value (empty cell): no rules or delete commands are generated. Rows with no registration type value can be used to prepare courses for the future
Re-Registration Before Certificate Expiry
Only used if a certificate is used for the rule. Determines the period of time a user should be re-registered before their certificate expires. If left empty the user is re-registered on the day their certificate expires.
Value format is duration in days, months or years (i.e. 1d, 2m or 3y).
Certificate Short Id
The LMS certificate short Id which is awarded for completing the course. The certificate is used to determine the re-registration date according to the certificate’s validity duration. Only available for registration types ReRegistration and OnlyWithCompletedRegistration.
De-Registration
Set an ‘x' into a course column to add de-registration rules. An active registration would be removed as soon as the registration rule requirements won’t apply anymore (i.e. due to a vessel change).
OPF Name
Org profile name which can be used in registration rules.
OPF Value
Org profile value which can be used in registration rules.
Notes
If no value is set for column Registration Type no registration rule is generated for this course. This would allow to create registration rule matrices which have more courses listed than used - possibly useful to prepare registration rules for not yet published courses.
If no requirement (OPF value) is selected no registration rule is generated. However, if Registration Type ‘OneTime’ is selected but no OPF value is selected the generator outputs a warning (console). This would indicate that the rule was left empty unintentional.
Commands to delete any 'registration rules' and 'de-registration rules' are generated if the column Registration Type has any value. This is to remove any old rules
Instructor Rule Matrix
1 | Course Name | TRG-1701 - EFFECTIVE SUPERVISION | TRG-1701 - EFFECTIVE SUPERVISION | |
2 | Course Path | /Root/Carnival/CMG/HESS/PubHealth1 | /Root/Carnival/CMG/HESS/PubHealth1 | |
3 | Instructor Rule Status | Active | Active | |
4 | Remove Instructor | x | x | |
5 | ||||
6 | OPF Name | OPF Value |
|
|
7 | Vessel | Shore |
| |
8 | Vessel | AIDAblue | x |
|
9 | Vessel | Costa Atlantica | x | |
10 | Rank | Captain |
| x |
11 | Rank | Engineer |
| x |
12 | Rank | Environmental Officer |
Matrix Rows
Course Name
A human readable name of the course - this is not used in any rule creation (information only).
Course Path
Full LMS path to the course the rule applies to.
Instructor Rule Status
Active: Instructor rule is active
Deactivated: Instructor rule is deactivated - a course was discontinued. This creates a delete NavPage attribute to delete any instructor rules for this course
no value (empty cell): no rules or delete commands are generated. Rows with no value can be used to prepare courses for the future
Remove Instructor
Set an ‘x' into a course column to add a remove instructor rules. An instructor would be removed as soon as the instructor rule requirements wouldn’t apply anymore (i.e. due to a vessel change).
OPF Name
Org profile name which can be used in instructor rules.
OPF Value
Org profile value which can be used in instructor rules.
Notes
If no requirement (OPF value) is selected for a course no instructor rules are generated for this course. However, if a Instructor Rule Status ‘Active’ is selected but no OPF value is selected the generator output a warning (console). This would indicate that the instructor rule was left empty unintentional
Commands to delete any ‘instructor rules' and 'remove instructor' rules are generated if the column Instructor Rule Status has any value. This is to remove any old rules
Example Offering Rule Matrices for v4.2.x and v4.3.x
- PSDEV-726Getting issue details... STATUS
- PSDEV-806Getting issue details... STATUS
- PSDEV-768Getting issue details... STATUS
- PSDEV-755Getting issue details... STATUS
Get Offering Rule Matrix via GetOfferingRuleMatrix
being used in rules are automatically included in the matrix. That means if an OPF 'Rank' contains values Captain, Engineer and Deckhand and the rules only use Captain, only Captain is included in the matrix.
GetOfferingRuleMatrix [orgPath] [type: 'Registration' (student) or 'Instructor'] [Optional: IsTransposed (Default to true for new format, false for original matrix format] [Optional: CsvOutputPath (Note: if not provided, outputs to command line)] [optional: -includeOpfs:"OPFName1|OPFName2|…|OPFNameX"] [optional: -includeAllOpfValues]
By default all OPFs and OPF values which are actively used in rules are automatically included in the matrix. That means if an OPF 'Rank' contains values Captain, Engineer and Deckhand and the rules only use Captain, only Captain is included in the matrix. However, there are command parameters which allow to expand on that - see details below.
Switch parameters can be placed in any order - they are identified by the parameter name like '-includeAllOpfValues'
Command Parameters
mandatory: orgPath
The organization path to extract the offering rules from
mandatory: type
The offering rule type to export - Registration or Instructor rules
semi-optional: IsTransposed
By default we only export transposed Offering Rule Matrices (IsTransposed=true). That is, csv rows for OPF values and columns for courses. Use false to get the old Offering Rule Matrix format
The parameter IsTransposed is mandatory if parameter CsvOutputPath is used (the order of parameters is important)
optional: CsvOutputPath
The Offering Rule Matrix output will be written directly into a file on the hosting server. The Offering Rule Matrix is also output to the client command window.
The parameter IsTransposed is mandatory if parameter CsvOutputPath is used (the order of parameters is important)
optional switch parameter: -includeAllOpfValues
This option will include all OPF values of an SCS OPF in case the OPF is referenced in a rule (order all OPF values alphabetically).
Example:
An OPF 'Rank' single-choice-string contains 3 values Captain, Engineer and Deckhand. If the rules only referenced Rank values Captain and Deckhand, the option -includeAllOpfValues
would also include the not used OPF value Engineer in the Offering Rule Matrix.
optional switch parameter: -includeOpfs:OPFName1|OPFName2|...|OPFNameX
This parameter includes all listed OPFs in the Offering Rule Matrix even if they are not referenced in any rule. All OPFs listed must be single-choice-strings. The list is still valid if an OPF is already referenced by a rule. The Offering Rule Matrix would contain all available OPF values.
If an OPF name contains white spaces, enclose the whole OPF list with double quotes - example: -includeOpfs:"Rank|Functional Position|Vessel"
Offering Rule Generator
Unzip the attached version to a local folder and run DOS prompt (Ctrl+R, type 'cmd' and hit enter).
Tool Parameters
mandatory: Student
/Instructor
The first parameter decides which rules should be created - student registration rules or instructor rules.
mandatory switch parameter: -f
The Offering Rule Matrix with registration/instructor rules as csv file incl. absolute path
mandatory switch parameter: -o
Output file with the commands to replace and add the registration/instructor rules.
mandatory switch parameter: -p
Organization path of the courses in them matrix
optional switch parameter: -v
If used, the DOS prompt output is more elaborate what the rule generator is doing.
Parameter Examples
Example for Registration Rules
Student -f "D:\CMG\cmgtestRegRulesTest.csv" -o "D:\CMG\CmgTestRegistrationRule_Commands.txt" -p /Root/Carnival/CMG -v
Example for Instructor Rules
Instructor -f "D:\CMG\cmgtestInstructorRulesTest.csv" -o "D:\CMG\CmgTestInstructorRule_Commands.txt" -p /Root/Carnival/CMG -v
The code for the Offering Rule Generator can be found in Git PS repository MarineLS\RegistrationRuleGenerator
Add Comment