At the end of each term, your course will automatically hide on the Course end date listed in Moodle. However, if you have a student who has received an incomplete, you may want that student to have access to the hidden course to complete the outstanding work.
Instead of making the course visible to all students, OLET suggests you assign the incomplete role to the student to view/access the hidden course. Once the student has completed the work you can remove the incomplete role.
NOTE: Check with your department chair or handbook for incomplete policies as they differ from department to department.