Click the gear icon button at the top right of your course page, select the Participants from the Navigation panel. The page for Participants will open.
Click the Enroll users button at the top right of the page.
Browse or search for the user with the dropdown menu next to Select users. Type in the box to search for users. Please use the search if you see the message Too many users to show... By default, Moodle shows up to 100 participants in the list. If you have more than 100 users, it can be difficult to enrol multiple users quickly.
Click the user to select them. The user will appear above the dropdown menu, indicating that the user is enrolled.
Use the Assign roles dropdown if you wish to change the role.
Click Show more to expand the enrolment options and set them as appropriate. These include the enrolment duration.
When you have finished, click the Enroll selected users and cohorts button.
The user will then appear in the list of enrolled users.