You can easily find (and change, if you want) an enrollment key for a course to which you have editing rights.
- In the Administration block of your course, click on the Users option to expand the menu. (If you don't see the option, try clicking on Course Administration, first.)
- Click on Enrolment methods to expand the sub-menu.
- Edit the Self enrolment method by clicking on the edit icon OR clicking on Self enrolment (Student) in the sub-menu of the Administration block.
- Ensure that the "Allow existing enrolments" AND "Allow new enrolments" are both enabled (showing "Yes").
- Check the Unmask box beside the Enrolment key field to reveal the key.
- Click on the [Cancel] button at the bottom of the page.
To CHANGE the enrolment key, the instructions are very similar. See Knowledgebase Article KB1156.