> ## Documentation Index
> Fetch the complete documentation index at: https://help.studystash.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Moodle rollout: opt-in

> Add StudyStash only to courses in your CSV opt-in list.

Compare the [rollout approaches](https://help.studystash.com/integrations/moodle-course-sync) before choosing a plugin.

## Before you begin

* Moodle 4.0+ (version `>= 2022041900`).
* Administrator access with `moodle/site:config` permission.
* A [preconfigured StudyStash LTI tool](https://help.studystash.com/integrations/moodle.md).
* Cron running in Moodle.
* The plugin ZIP from your Customer Success Manager.

## 1. Install the plugin

Open `https://<your-moodle-instance>/admin/tool/installaddon/index.php`.

Select **Choose a file…** and upload the ZIP from your Customer Success Manager. Select **Show more…** and set **Plugin type** to **Local plugin (local)**.

![Upload the plugin ZIP and select Local plugin.](https://mintcdn.com/studystash-help/UbXlxW0z5agaJ_Cy/assets/93847554/94076930-plugin-installer.png?fit=max\&auto=format\&n=UbXlxW0z5agaJ_Cy\&q=85\&s=ab34f1c39f399bc4f1d58262eac4b6f3)

Upload the plugin ZIP and select Local plugin.

Select **Install plugin from the ZIP file**. Select **Continue** after validation, then **Continue** after the server checks.

At the plugins check, select **Upgrade Moodle database now**.

![Complete the plugin installation with the Moodle database upgrade.](https://mintcdn.com/studystash-help/FFz54l9hIeIDPaHl/assets/107282435/107479086-image-20260316-005318.png?fit=max\&auto=format\&n=FFz54l9hIeIDPaHl\&q=85\&s=b4c7fe70485ee0ac79c93aedd0588691)

Complete the plugin installation with the Moodle database upgrade.

If an **Upgrading to new version** message appears, select **Continue**.

## 2. Configure the plugin

Use these settings:

| Setting | Value | Required? |
| - | - | - |
| LTI preconfigured tool type ID | Select the correct StudyStash LTI Activity Module | Yes |
| StudyStash activity name | StudyStash | No |
| Placement in General section | Bottom | No |

![Select the StudyStash tool and choose the activity settings.](https://mintcdn.com/studystash-help/UbXlxW0z5agaJ_Cy/assets/93847554/94076937-new-settings.png?fit=max\&auto=format\&n=UbXlxW0z5agaJ_Cy\&q=85\&s=b883baaf648cfe582ee07d3102a989ee)

Select the StudyStash tool and choose the activity settings.

Select **Save changes**, then open `https://<your-moodle-instance>/local/studystash_optin/index.php`.

![Open the rollout plugin to manage courses and sync tasks.](https://mintcdn.com/studystash-help/FFz54l9hIeIDPaHl/assets/107282435/106987534-image-20260316-004242.png?fit=max\&auto=format\&n=FFz54l9hIeIDPaHl\&q=85\&s=eb7ebe3fe96caeea7434e0021168860e)

Open the rollout plugin to manage courses and sync tasks.

## 3. Choose courses with a CSV

Open **Opt-In Courses** and select **Download CSV template**.

![Use the Opt-In Courses tab to upload your course list.](https://mintcdn.com/studystash-help/FFz54l9hIeIDPaHl/assets/107282435/107479078-image-20260316-004330.png?fit=max\&auto=format\&n=FFz54l9hIeIDPaHl\&q=85\&s=108277c2acb8f61cbbdfc9ff39d191f1)

Use the Opt-In Courses tab to upload your course list.

Enter one **Course ID number** or **Short name** per row. A header row is not required. For example:

```text theme={null}
SHORTCOURSE-ID-111
SHORTCOURSE-ID-222
```

Select **Choose File** to upload the CSV, then **Preview CSV**. Check that every row is valid and matches the intended course.

![Review the matched course details before applying the list.](https://mintcdn.com/studystash-help/FFz54l9hIeIDPaHl/assets/107282435/106987542-image-20260316-005709.png?fit=max\&auto=format\&n=FFz54l9hIeIDPaHl\&q=85\&s=6cc892df7d4563e6e806f08e4881c353)

Review the matched course details before applying the list.

Select **Apply opt-in list** when the preview is correct.

## 4. Preview the sync

On **Status**, select **Dry Run** and wait for the task to finish. Larger course lists may take longer.

![Run a preview before changing course activities.](https://mintcdn.com/studystash-help/UbXlxW0z5agaJ_Cy/assets/93847554/93847611-image-20260217-235418.png?fit=max\&auto=format\&n=UbXlxW0z5agaJ_Cy\&q=85\&s=e58911b6e9d4a718b9ea3e19f746988c)

Run a preview before changing course activities.

Open **Logs** and check the planned behaviour for each course before continuing.

## 5. Sync the courses

When the preview is correct, return to **Status** and select **Sync StudyStash to Courses** to apply the changes.

![Run the sync after checking the dry-run logs.](https://mintcdn.com/studystash-help/FFz54l9hIeIDPaHl/assets/107282435/107479093-image-20260316-010418.png?fit=max\&auto=format\&n=FFz54l9hIeIDPaHl\&q=85\&s=49b1058ac8d0b7071b6d02e4f6f44d81)

Run the sync after checking the dry-run logs.

## Update the course list

> [accordion] Remove a course from the opt-in list
>
> Upload a replacement CSV containing only the courses you want to keep. Each upload replaces the existing opt-in list.
>
> This changes the selection for future syncs; it is not an instruction to delete an existing course activity.

> [accordion] Course ID or Course ID number?
>
> Use the **Course ID number** or **Short name** in your CSV.
>
> | Field | Meaning |
> | - | - |
> | Course ID | Moodle's internal, system-generated identifier. It is assigned when the course is created and cannot normally be changed. |
> | Course ID number | An optional, editable field set by an administrator or course creator, often used to match a course with an external system. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.