To add an exam to a course, add an exam activity to the course content composition and configure it to be proctored. For the details, see Adding proctored activities to compositions.