By A Web Design
When a course is created, students can only be enrolled manually for that course. This means that either the Manager or Teacher has to create the students account with Moodle and subsequently manually enroll that student for the course.
Students that visit the Home page of the Moodle website and see a course that they wish to enroll for cannot.
To empower students to create their own account with Moodle and enroll for courses of their choice, do the following:
Login to Moodle as Administrator.
From the Moodle Admin menu, navigate through - Site administration -> Courses –> Add/edit courses, the screen as shown in diagram 1, will be displayed in the Browser.

Diagram 1
Click Programming. The Course(s) under the category Programming will be displayed as shown in diagram 2

Diagram 2
NOTE: This
icon appears for the PHP Programming course because at the time of any course creation, managers / teaches can manually enroll any student that has an account on the Moodle website.
Students must be allowed to enroll themselves for any course available to them. To achieve this click on the icon
( Enrolled users ), the screen as shown in diagram 3 will be displayed in the Browser.

Diagram 3
Click on Enrolment Methods in the left hand column as shown in diagram 3. The screen as shown in diagram 4 will be displayed in the Browser.

Diagram 4
Click on the Add method drop down list box and select Self enrolment as shown in diagram 5.

Diagram 5
On select of Self enrolment, the screen as shown in diagram 6 will be displayed in the Browser.

Diagram 6
Fill in the Self enrolment form.
Set the Allow self enrolment option to Yes.
NOTE: If the Enrolment period checkbox is not activated, the course can be enrolled for as long as the course exists.
NOTE: If the Enrolment period checkbox is activated, and a Start date and End date specified then that course can be enrolled for only during the specified period.
Click on the Add method as shown in diagram 6. The screen as shown in diagram 7 will be displayed in the Browser.

Diagram 7
This shows that self enrolment has been activated for the particular course.
To verify this open another Browser tab and go in to the Moodle Home page. You should see that self enrolment is active for that particular course on the home page as shown in diagram 8.

Diagram 8