Talk:Migrations

From MoodleDocs
Revision as of 07:48, 13 April 2023 by Jan de Lange (talk | contribs) (Created page with "I asked Chat GTP how to import Dynamic rules. This info is missing on the Migration info page. This is what it came up with: If you want to import dynamic rules using the "Co...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

I asked Chat GTP how to import Dynamic rules. This info is missing on the Migration info page. This is what it came up with:

If you want to import dynamic rules using the "Conditions" and "Actions" approach, you can do so by creating a CSV file with the following format:

"rule name","rule description","enabled","condition type","condition","action type","action"

"Assign to Cohort","Assign employee to cohort based on position",1,"user_position","manager","enrol_cohort","Managers Cohort"

In this example, we have three dynamic rules that assign users to cohorts based on their position. Each rule has a condition type of "user_position", which means that the rule is based on the user's position. The condition column specifies the position that triggers the rule, and the action type is set to "enrol_cohort", which means that the user will be enrolled in the specified cohort. The action column specifies the name of the cohort to enroll the user in.

You can customize this file according to your needs by changing the rule name, description, conditions, and actions. Just make sure to follow the same format and include all required fields.

I think it's great, or did AI missed something?

Kind regards

Jan