Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

This document is outdated and has been marked as deprecated - please use Offering Rule Matrix and Offering Rule Generator instead

This page will discuss how to use the Registration Rule Generator.

Table of Contents

What does the Registration Rule Generator do?

The Registration Rule Generator is run through cmd. Every row generates one registration rule. All ticked OrgProfileValues of one OrgProfileField converts into one predicate ProfileValueIn(fieldName,val1|val2|val3|...). This will give you a list of predicates - one predicate per OrgProfileField. Combine all predicates into one registration rule expression which logically ANDs the predicate together.


NOTE: You Cannot have the following special characters in OrgProfileValues: The special characters for rules are '(' ')' ',' ':' '|' '$' ':'

Depending on the ticks which are checked in the excel file, the Registration Rule Generator can add in certificate predicates. If the registration rule only ever should register a user once in a lifetime for a course replace the predicate !HasActiveRegistrations() with HasNoRegistrations(). For now, the Registration Rule Generator will always use !HasActiveRegistrations(). 

Code Block
 addRegisterStudentRule -- Usage addRegisterStudentRule [string: orgPath] [string: coursePath] [string: filterExpression] [string actionType]

Rules

Student Rules

  • Row 1:

    • Course Name [column A]: Full course name for readability purpose only

    • Course Path [column B]: i.e. /Root/MarineLS/Course1

Notes 

The course path is case sensitive until 

Jira Legacy
serverSystem JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId23f523ea-1678-3ca2-a1e8-2de53fd3b74a
keyCOREDEV-3161
https://marinels.atlassian.net/browse/COREDEV-3161 is released. Currently, paths within registration rules are case-sensitive and wouldn't get executed if the casing is different. For example course /Root/Org/Course1 and registration rule RegisterStudent(/Root/Org/course1):ProfileValueIn(Role,OED Line-boat operator|OED Line-handler);HasNoRegistration() would not get executed

    • Re-Registration [column C]: Set ‘x’ to enable re-registration. Column D is mandatory if column C is ticked.

    • Re-Registration Before Certificate Expiry [column D]: This optional column is used in combination with Re-Registration (column C). It 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. The format of the cell is a duration value in days, months or years (i.e. like 1d, 2m or 3y)

Notes
The OrgProfileField requirements must match and the current date is greater than (expiry date - duration) before a user gets re-registered
Assumptions
The certificate will be awarded on completion (via certificate rule)
The certificate has a ValidityDuration. If no ValidityDuration is set, the user will never be re-registered because the certificate doesn’t expire
Only one certificate (template) per course exists (Certificate Short Id in column E). If multiple certificate templates are used for one course, we need additional discussions on how to determine when to re-register a user

    • Certificate Short Id [column E]: Mandatory if Re-Registration (column C) is ticked. Certificate short Id (name) which is used to determine the re-registration date according to certificate’s ValidityDuration

    • De-Registration [column F]: Set ‘x’ to de-register users from course if any of the OrgProfileField’s value doesn’t match the users’ profile. If the cell is empty, the user will be left registered in the course even if the requirements to get registered in this course don’t match anymore

    • OrgProfileField Names (Column G+): OrgProfileField names used in any of the rules. The column spans across all OrgProfileValues in row 2

      • Note: The OrgProfileField names must not contain '(' or ')' because they don't work with parsing rules in Core. Use '[' and ']' instead.

  • Row 2:

    • OrgProfileFieldValues starting from column G. Every OrgProfileFieldValue of one OrgProfileField occupies one column.

      • Note: The OrgProfileField values must not contain '(' or ')' because they don't work with parsing rules in Core. Use '[' and ']' instead.

  • Row 3+:

    • One or multiple rows per course. Place an ‘x’ into a column to enable registration according to the OrgProfileField’s value.

Instructor Rules

The instructor rules work almost like the registration and de-registration rules (see Registration Rule and De-Registration Rule) - just omit the use of predicates HasActiveRegistration() and HasNoRegistrations(). There is no Re-Registration for instructors.

  • Row 1:

    • Course Name [column A]: Full course name for readability purpose only

    • Course Path [column B]: i.e. /Root/MarineLS/Course1

Notes 

The course path is case sensitive until 

Jira Legacy
serverSystem JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId23f523ea-1678-3ca2-a1e8-2de53fd3b74a
keyCOREDEV-3161
https://marinels.atlassian.net/browse/COREDEV-3161 is released. Currently, paths within registration rules are case-sensitive and wouldn't get executed if the casing is different. For example course /Root/Org/Course1 and registration rule RegisterStudent(/Root/Org/course1):ProfileValueIn(Role,OED Line-boat operator|OED Line-handler);HasNoRegistration() would not get executed

    • Remove Instructor [column C]: Set ‘x’ to remove instructor if any of the OrgProfileField’s values don’t match the user’s profile. If the cell is empty, the instructor will not be removed from the course even if the requirements to be instructor for that course don’t match anymore

    • OrgProfileField Names (Column D+): OrgProfileField names used in any of the rules. The column of row 1 spans across all OrgProfileValues for row 2

      • Note: The OrgProfileField names must not contain '(' or ')' because they don't work with parsing rules in Core. Use '[' and ']' instead.

  • Row 2:

    • OrgProfileFieldValues starting from column D. Every OrgProfileFieldValue of one OrgProfileField occupies one column.

      • Note: The OrgProfileField values must not contain '(' or ')' because they don't work with parsing rules in Core. Use '[' and ']' instead.

  • Row 3+:

    • One or multiple rows per course. Place an ‘x’ into a column to enable registration according to the OrgProfileField’s value

Re-Registration Rules

If Re-Registration is ticked certificates must be enabled for the course in order to work properly. Certificate rules must make sure that the user gets awarded a certificate on course completion. The certificate needs a ValidityDuration.

The column Re-Registration Before Certificate Expiry is optional and would re-register a user a set time period ahead of certificate expiry. If Re-Registration Before Certificate Expiry is left empty (use 0d as the default value) the user will get re-registered on the day of certificate expiry.

Add the predicate CertificateWillExpire([Certificate Short Id],[Re-Registration Before Certificate Expiry]) - with the appropriate values from the course row - to a registration rule with Re-Registration ticked.

Notes:

  • No Certificates or Certificate rules are generated by the Registration Rule Generator

  • If an awarded certificate doesn’t have a ValidityDuration the certificate will never expire and therefore, re-registration would never happen

  • Registration rules must be re-run manually to trigger re-registration. Automatically make sure to trigger re-registration is on Core’s roadmap

  • CertificateWillExpire(..) predicate description can be found here

How to Run the Registration Rule Generator

How to install the Generator

  1. Download the Registration Rule Generator from the following folder. Currently, it is located on the google drive under Operations → Professional Services → Moran Tug → Registration Rule Generator (Pre-release Version) or it can be found at the following link: https://drive.google.com/drive/u/0/folders/1Xc5v6y10wvmepZ8HJZw8B6WeDDGTSIWv

...

  1. Open CMD as an Administrator

  2. Navigate to the file location using cd / use the dir command to list everything in the folder. 

  3. C:\Users\Hayley.MARINELS\Desktop\2018.09.18-PreRelease-RegistrationRuleGenerator

  4. Type in RegistrationRuleGenerator.exe student to get a list of the options you have and that you need to include. Using the student will do registration rules for Students you can also do instructor.

...

Excel File

  1. You need to make sure the excel file is in the right format. 

    1. An example of an excel file that is in the right format can be found at https://docs.google.com/spreadsheets/d/137K9O9QuqsKt7Z3fk-3q2Y8A9QeroZgVV9czhcqm5gc/edit#gid=338886090

  2. Make sure you do not have extra rows in your excel file when you convert it, delete any unnecessary rows.

    1. Image Modified
  3. Once you excel file is in the right format convert the excel file to a .csv file (save as .csv) put it in the same folder as the downloaded Reg Rule Generator. Do this through Google Docs - for some reason when you do it on excel 365 it will save the .csv files with ";" instead of "," and they need to be separated by "," (commas).

  4. Once the generator is running execute the following command in CMD. Note this example does not have the Re-register ticked in the excel file and does not include anything about certificates. 

    1. RegistrationRuleGenerator.exe student -f "2018.09.13 - RegistrationRulesCMG_Rev03.csv" -o "C:\Users\Hayley.MARINELS\Desktop\2018.09.18-PreRelease-RegistrationRuleGenerator\Results2" -p /Root/Carnival/CMG/ -v

    2. Note: This command is tailored to an example from an excel sheet. Make sure all of the proper flags are included if Re-register is needed. 

  5. This will export the list of the Registration Rules into the text document Results2 which you will then copy and run in /pages/dev. 

  6. Image RemovedImage Added
  7. Open the Text file and you will have a copy of your Registration Rules.

  8. The registration rules will be in the following format - addRegisterStudentRule [string: orgPath] [string: coursePath] [string: filterExpression] [string actionType]

  9. Go to the site you wish to put the Registration Rules on and go to /pages/dev to run the commands. 

What if you make a mistake?

If you make a mistake go to the home page (Example: /Root/Carnival/CMG) and go to Edit → Page Attributes and delete the Registration Rules (task

Jira Legacy
serverSystem JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId23f523ea-1678-3ca2-a1e8-2de53fd3b74a
keyCOREDEV-3480
https://marinels.atlassian.net/browse/COREDEV-3480 will make deleting Registration rules easier). Fix your mistakes and re-run the generator and then reapply the new rules under /pages/dev

NavPage attribute keys for Registration Rules:

  • System.OfferingRule.Instructor.AutoGenerated: auto-generated instructor rules (add/remove instructors)

  • System.OfferingRule.Registration.AutoGenerated: auto-generated de-/registration rules

Suggestions for Using

BEFORE RUNNING REG RULE PROCESSOR

...

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@a03
sortmodified
showSpacefalsesortmodified
reversetrue
typepage
cqllabel in ( "registrationrulegenerator" , "registrationrulematrix" , "registrationrules" ) and type = "page" and space = "PS"
labelsRegistrationRules RegistrationRuleGenerator RegistrationRuleMatrix

...

Page Properties
hiddentrue


Related issues