# Running Secure Exams

Ensuring a secure and fair exam environment is essential. CodeGrade allows you to conduct exams with confidence by offering robust access controls. By setting up a dedicated exam course, you can manage all restrictions at the course level, ensuring every exam runs smoothly and securely.

<figure><img src="https://2172486256-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKAQsDlg_P20iQy3JDs%2Fuploads%2FKNXPt1RBNByLZRuxAArG%2FScreenshot%202026-04-07%20at%2011.03.27.png?alt=media&#x26;token=7e706387-280d-4daa-939c-0627c22f27e9" alt=""><figcaption><p><em>Student view of an active exam session with Session Lockdown enabled</em></p></figcaption></figure>

## Step 1: Set Up an Exam Course

Create a dedicated course specifically for exams. This provides a centralized place for all exam access controls.

## Step 2: Manage Course-Level Access Restrictions

Navigate to ***Course Settings → Access***

Here, you can configure:

* **Password Protection**: A course-level password that students must enter to access the course.
* **IP Restriction**: Limit access to certain IPv4 addresses or ranges.
* **Session Lockdown**: When enabled, students are restricted to this course and cannot access other courses or platform features such as search or snippets. Any attempt to do so will result in token or access-related errors.
* **Entry Limits**: Set how many times a student can enter the course (e.g., one entry). You can adjust per-student overrides in the entry log.

Save your changes to apply them to the entire course.

## Step 3: Monitor and Adjust Entries

In the same ***Access*** section, you’ll find the entry log. It shows:

* Each student’s name and username
* The number of successful entries
* The limit set for them

You can override or reset limits if needed.

## Step 4: Assignment-Level Access (Optional)

If necessary, you can also set access restrictions for individual assignments. Navigate to ***Assignment Settings → Access***

Here, you can add assignment-specific password or IP restrictions if required.

## Best Practices

* Use IP restrictions for on-site exams (e.g., campus networks).
* Share passwords securely, just before the exam.
* Use “Student View” to test the entire setup—confirm that session lockdown and restrictions work as expected.
* If both course-level and assignment-level restrictions are applied, course-level rules will apply broadly while assignment rules add further control.

For students, once they start the exam course, their session is locked. Any attempt to switch courses or reuse a session will lead to access errors, ensuring a secure, focused exam environment.
