...
...
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.
...
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
...
- 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
...
- 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.
...
- 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
- 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
...
- Open CMD as an Administrator
- Navigate to the file location using cd / use the dir command to list everything in the folder.
- C:\Users\Hayley.MARINELS\Desktop\2018.09.18-PreRelease-RegistrationRuleGenerator
- 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
- You need to make sure the excel file is in the right format.
- 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
- Make sure you do not have extra rows in your excel file when you convert it, delete any unnecessary rows.
- 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).
- 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.
- 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
- 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.
- This will export the list of the Registration Rules into the text document Results2 which you will then copy and run in /pages/dev.
- Open the Text file and you will have a copy of your Registration Rules.
- The registration rules will be in the following format - addRegisterStudentRule [string: orgPath] [string: coursePath] [string: filterExpression] [string actionType]
- 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
will make deleting Registration rules easier). Fix your mistakes and re-run the generator and then reapply the new rules under /pages/dev Jira Legacy server System JIRA columns key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution serverId 23f523ea-1678-3ca2-a1e8-2de53fd3b74a key COREDEV-3480
...
- 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
...
after running new reg commands, run ReEvaluateOfferingRulesForAllUser Registration /Root/XXX (to update student rules) and/or ReEvaluateOfferingRulesForAllUser Instructor /Root/XXX (to update Instructor rules)
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...