> For the complete documentation index, see [llms.txt](https://help.codegrade.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.codegrade.com/setup-assignment/other-features/running-secure-exams.md).

# 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&amp;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

<figure><img src="https://2172486256-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKAQsDlg_P20iQy3JDs%2Fuploads%2FKUmAuU2HcKSRWvS9wYvJ%2FScreenshot%202026-08-26%20at%2019.13.11.png?alt=media&amp;token=e9a412f1-a917-4819-97e2-b2c8d88cf8d4" alt=""><figcaption><p>Access Tab in Course Settings to manage exam course.</p></figcaption></figure>

{% hint style="warning" %}
**Missing the Access tab?**

* **Course Settings → Access** requires the **Edit access restrictions** permission.
* **Assignment Settings → Access** requires the **Edit assignment access restrictions** permission.

Permissions can be managed in **Course Settings → Permissions**.
{% endhint %}

Navigate to ***Course Settings → Access.*** The **Password & Lockdown** panel controls how students reach the course:

* **Password** — students must enter this password before they can see any course content. Passwords are stored in plaintext, so never reuse a password from another system.
* **IP Restriction** — restrict access to specific IPv4 addresses or CIDR ranges. Useful for on-site exams in a computer lab.
* **Exam environment** — the level of lockdown applied when a student enters the course.

### Choosing an exam environment

The **Exam environment** dropdown replaces the old Session Lockdown toggle. It has up to three options:

| Option                             | What it does                                                                                                                                                                    |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **No exam environment configured** | No lockdown. Students access the course normally.                                                                                                                               |
| **CodeGrade session lockdown**     | Entering the course isolates the student's session to this course. All their other active sessions are invalidated, and access to other courses and global features is blocked. |
| **Schoolyear secure browser**      | Everything session lockdown does, plus the student must be inside Schoolyear's secure exam browser, which locks down their whole computer.                                      |

{% hint style="warning" %}
**Note:** *Schoolyear secure browser* only appears if your institution has Schoolyear set up with CodeGrade. If you have a Schoolyear licence and don't see the option, contact CodeGrade support at <support@codegrade.com>.
{% endhint %}

#### Settings available with CodeGrade session lockdown

* **Idle Session Detection:** *(Enabled by default when Session Lockdown is turned on.)* Ends the exam session after 5 minutes of inactivity, even if the student's laptop stays unlocked. Each interaction extends the session by another 5 minutes, up to the cap set at entry. The setting is remembered if you toggle Session Lockdown off and on. Changing this setting mid-exam will not affect students who have already entered the exam.
* **Maximum entries per student**: Set how many times a student can enter the course (e.g., one entry). You can adjust per-student overrides in the entry log.
* **Entry Window**: Set the start and end date and time between which students are allowed to enter the exam. Entry attempts before the start time or after the end time are rejected. Changing the start time mid-exam will not affect students who have already entered. Changing the end time mid-exam will only affect students who have already entered if Idle Session Detection is also enabled for the exam.

Save your changes to apply them to the entire course.

<figure><img src="https://2172486256-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKAQsDlg_P20iQy3JDs%2Fuploads%2F44to93JjE7HVrDK7o01L%2FScreenshot%202026-08-26%20at%2018.53.24.png?alt=media&amp;token=0a4afb6e-9103-47c8-9a7f-117425d5aea0" alt="" width="563"><figcaption><p>Session Lockdown enabled and Idle Session Detection turned on for an exam course.</p></figcaption></figure>

#### Settings available with Schoolyear secure browser

You must set **Maximum entries per student** and the **Entry window start time** and **end time**.&#x20;

{% hint style="info" %}
**Set the entry window start time to the time your exam actually starts.** Students can prepare their Schoolyear browser 1 hour ahead of it, but this is the moment they are let into the course.
{% endhint %}

Alongside those you have:

* **Exam settings**: manage additional Schoolyear settings. Use if you need something Schoolyear offers that CodeGrade doesn't configure for you, for example allowing a third-party website during the exam.
* **Proctoring dashboard**: the Schoolyear dashboard to monitor the exam and to let students back in.
* **Exam environment integrity enforcement**: keep this enabled. It lets Schoolyear check the student's exam environment for tampering during the exam and act if it finds any. Turn it off only if students are hitting problems with the Schoolyear exam environment mid-exam.
  * When disabled, this verification is skipped, allowing exams to continue even if Schoolyear is temporarily unavailable or if API credentials expire.

{% hint style="success" %}
Idle session detection is always on when SchoolYear is configured.
{% endhint %}

<figure><img src="https://2172486256-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKAQsDlg_P20iQy3JDs%2Fuploads%2FQjJ5tOSSgQ8R6wEprwgE%2FScreenshot%202026-08-28%20at%2015.34.01.png?alt=media&amp;token=69b9851f-8180-4ee8-b2b4-c3565b2c3808" alt="" width="563"><figcaption><p>SchoolYear secure browser configured for an exam course.</p></figcaption></figure>

## 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.

{% hint style="info" %}
With Schoolyear configured, you can't give individual students their own entry window — everyone follows the course-wide one. Per-student **entry limit** overrides work as normal.
{% endhint %}

## 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.
* Tell students they can set up Schoolyear from an hour before, and that doing so won't start their exam early.
* If a student's browser crashes in SchoolYear exam, getting them back in takes two steps: raise their entry limit in the entry log, and give them a proctor key from the *Proctoring dashboard*.
* If Session Detection is turned on, let students know that stepping away from the exam for more than 5 minutes will end their session and require them to log back in.
* If both course-level and assignment-level restrictions are applied, course-level rules will apply broadly while assignment rules add further control.
* If a change to the entry window end time doesn't seem to affect students already taking the exam, check that Idle Session Detection is enabled — end time changes only apply to active sessions when it is on.

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.
