There might be times when you want to restrict a student's access to your course. Rather than removing the student from the course (which also deletes all of that student's records or grades) you can simply deny access.
To do this enter your course, in the Control Panel, click on Users and Groups, then click on Users.
In the Users page, search the student who you want to restrict. You can search by Username, Last Name, First Name or Email. Click Go button to search.
The student will be listed below. To start the process to deny access, click on the down arrow next to the student username, click on Change User's Role in Course.
Change the course availability to No.
Click on Submit button to complete this action.
You will receive a massage like this.
You can see the student is not available to your course.