Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update profile field and cohort in enrol_user #111

Merged
merged 3 commits into from
Nov 26, 2024

Conversation

rhell4
Copy link
Contributor

@rhell4 rhell4 commented Nov 21, 2024

Some other plugins like block_enrolkey only call enrol_user so the profile fields and cohort are not updated. These should always be updated when using an enrol key.

Also after unsuspending a user dynamic cohorts were not updated for Totara, so added that piece too for consistency.

Testing instructions;

  1. As an admin;
  2. Have both auth_enrolkey and block_enrolkey installed
  3. Set up an enrol key for a self enrol instance in a course
  4. Add the enrol key block to the dashboard
  5. Go to Site administration > Plugins > Authentication > Enrolment key based self-registration > Manage enrolkey cohort rules
  6. Add at least one cohort and profile field for the enrol key
  7. As a student;
  8. Login and go to the dashboard
  9. Enter the enrol key in the block
  10. You should receive a message saying you were enrolled into the course
  11. As an admin;
  12. Check the student was added to the cohort and the profile field was updated correctly

Some other plugins like block_enrolkey only call enrol_user so the profile
fields and cohort are not updated. These should always be updated when using
an enrol key.
@matthewhilton matthewhilton merged commit 8512cf4 into master Nov 26, 2024
41 checks passed
@matthewhilton matthewhilton deleted the profile-cohort-update branch November 26, 2024 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants