How do I enable students to unenrol themselves from courses?
1. Access Administration > Users > Permissions > Define roles.
2. Click the edit icon opposite the student role.
3. Change the moodle/role:unassignself capability from not set to allow.
4. Click the "Save changes" button at the bottom of the page.