Canvas has several methods to restrict course access. By default once a course is published students will be able to view course materials. This knowledgebase article covers the various options instructors have to restrict student access.
As an instructor, you can change restrictions for student access in your course. These restrictions include the ability for students to view and participate in the course.
Restrict students from viewing course before start date: When a student enrolls in a future course, the course displays in the Future Enrollments section in the student Courses list. Once a course is published, the course displays an invitation to join the course, where the students can view course content at any time before the course begins. However, when the student restriction for the course start date is enabled, students cannot view a link to the course until the start date, even if the course is published.
Restrict students from viewing course after end date: Once a course has concluded, students can still view the course but all content is displayed in a read-only state. However, when the student restriction for the course end date is enabled, students can no longer view the course in the Courses list after the course has concluded. This setting can be used if your institution uses the course across multiple terms and want to restrict students from accessing prior content for future students, or if students have to re-enroll in the course.
The following Canvas guide provides a walkthrough on restricting view access; How do I restrict student access to a course before or after the course dates?
Restrict students from participating in the course between dates: If you do not want to let students participate in the course outside of the course dates, select the Users can only participate in the course between these dates checkbox . This checkbox ensures that students can only participate in the course between the specified dates (instructors and admins are not affected). If this checkbox is not selected, students can participate in the course before and after the start date. More details on setting course date restrictions can found in the Canvas user guide; How do term dates, course dates, and section dates work in Canvas.