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

# Moodle Plugin: Syncing StudyStash to Courses (Opt-Out Mode)

> This plugin syncs StudyStash with all Moodle courses by default, except for those that are explicitly excluded.

**FOR ADMINISTRATORS**

<Warning>
  This plugin syncs StudyStash with all Moodle courses by default, except for those that are explicitly excluded. If you prefer an [**opt-in approach**](/integrations/moodle-opt-in-sync), where only selected courses are synced, you can follow the guide here.
</Warning>

## **Purpose**

**StudyStash Course Sync** is a Moodle local plugin that helps administrators roll out the StudyStash LTI activity across courses at scale.

Instead of enabling StudyStash manually in each course, the plugin queues a sync task that checks every eligible course and adds the StudyStash activity only where it is missing. It is safe to run multiple times: courses that already contain the configured StudyStash activity are skipped, and only new or missing courses are updated. Admins can also exclude selected courses from sync and preview the result using a dry run before making live changes.

<table>
  <tbody>
    <tr>
      <th>
        <p><strong>Action</strong></p>
      </th>

      <th>
        <p><strong>Explanation</strong></p>
      </th>
    </tr>

    <tr>
      <td>
        <p>Dry Run</p>
      </td>

      <td>
        <p>Previews which courses would get StudyStash based on current config/exclusions.</p>
      </td>
    </tr>

    <tr>
      <td>
        <p>Sync StudyStash to Courses</p>
      </td>

      <td>
        <p>Enables StudyStash in eligible courses that do not already have it.</p>
      </td>
    </tr>

    <tr>
      <td>
        <p>Course exclusions</p>
      </td>

      <td>
        <p>Lets admins choose courses that must be skipped by sync.</p>
      </td>
    </tr>
  </tbody>
</table>

## **Prerequisites**

* Moodle version must be `>= 2022041900` (Moodle 4.0+)

* Administrative access (`moodle/site:config`) to your Moodle Instance

* A valid preconfigured LTI tool for StudyStash already exists

* Cron running within Moodle

* Your Customer Success Manager has provided the Plugin via a ZIP file

## **Step 1: Installing the plugin**

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

2. Upload the ZIP file provided to you by StudyStash by pressing “Choose a file…”

3. Press “Show more…”

4. Set the “Plugin type” to be “Local plugin (local)”

<Frame className="ss-screenshot" caption={"**Figure 1.** Moodle Plugin: Syncing StudyStash to Courses (Opt-Out Mode) — screenshot 1"}>
  <img loading="lazy" src="https://mintcdn.com/studystash-help/UbXlxW0z5agaJ_Cy/assets/93847554/94076930-plugin-installer.png?fit=max&auto=format&n=UbXlxW0z5agaJ_Cy&q=85&s=ab34f1c39f399bc4f1d58262eac4b6f3" alt="Moodle Plugin: Syncing StudyStash to Courses (Opt-Out Mode) — screenshot 1" width="2814" height="1481" data-path="assets/93847554/94076930-plugin-installer.png" />
</Frame>

5. Press “Install plugin from the ZIP file”

6. After the validation message, press “Continue”

7. After the server checks message, press “Continue”

8. After the plugins check message, press “Upgrade Moodle database now”<br />

   <Frame className="ss-screenshot" caption={"**Figure 2.** Moodle Plugin: Syncing StudyStash to Courses (Opt-Out Mode) — screenshot 2"}>
     <img loading="lazy" src="https://mintcdn.com/studystash-help/UbXlxW0z5agaJ_Cy/assets/93847554/93847574-plugins-requiring-attention.png?fit=max&auto=format&n=UbXlxW0z5agaJ_Cy&q=85&s=ebadfc89bd1eee13a9f94a7033535064" alt="Moodle Plugin: Syncing StudyStash to Courses (Opt-Out Mode) — screenshot 2" width="2644" height="820" data-path="assets/93847554/93847574-plugins-requiring-attention.png" />
   </Frame>

9. If an “Upgrading to new version” message appears, press “Continue”

***

## **Step 2: Configuring the plugin**

After installing the plugin (step 1), you will be required to configure the new settings that are available.

<Frame className="ss-screenshot" caption={"**Figure 3.** Moodle Plugin: Syncing StudyStash to Courses (Opt-Out Mode) — screenshot 3"}>
  <img loading="lazy" src="https://mintcdn.com/studystash-help/UbXlxW0z5agaJ_Cy/assets/93847554/94076937-new-settings.png?fit=max&auto=format&n=UbXlxW0z5agaJ_Cy&q=85&s=b883baaf648cfe582ee07d3102a989ee" alt="Moodle Plugin: Syncing StudyStash to Courses (Opt-Out Mode) — screenshot 3" width="2223" height="548" data-path="assets/93847554/94076937-new-settings.png" />
</Frame>

1. Enter the following settings:

<table>
  <tbody>
    <tr>
      <th>
        <p><strong>Setting</strong></p>
      </th>

      <th>
        <p><strong>Value</strong></p>
      </th>

      <th>
        <p><strong>Type</strong></p>
      </th>
    </tr>

    <tr>
      <td>
        <p>LTI preconfigured tool type ID</p>
      </td>

      <td>
        <p>Select the correct ‘StudyStash’ <em>LTI Activity Module</em> from the dropdown</p>
      </td>

      <td>
        <p>Required</p>
      </td>
    </tr>

    <tr>
      <td>
        <p>StudyStash activity name</p>
      </td>

      <td>
        <p>StudyStash</p>
      </td>

      <td>
        <p>Optional</p>
      </td>
    </tr>

    <tr>
      <td>
        <p>Placement in General section</p>
      </td>

      <td>
        <p>Bottom</p>
      </td>

      <td>
        <p>Optional</p>
      </td>
    </tr>
  </tbody>
</table>

2. Press the “Save changes” button

3. Go to `https://<your-moodle-instance>/local/studystash/index.php`<br />

   <Frame className="ss-screenshot" caption={"**Figure 4.** Moodle Plugin: Syncing StudyStash to Courses (Opt-Out Mode) — screenshot"}>
     <img loading="lazy" src="https://mintcdn.com/studystash-help/UbXlxW0z5agaJ_Cy/assets/93847554/93978670-image-20260217-235240.png?fit=max&auto=format&n=UbXlxW0z5agaJ_Cy&q=85&s=12018c443f6e04ae5d244cf534a5f557" alt="Moodle Plugin: Syncing StudyStash to Courses (Opt-Out Mode) — screenshot" width="2846" height="844" data-path="assets/93847554/93978670-image-20260217-235240.png" />
   </Frame>

4. Press the “Excluded Courses” tab, and optionally exclude any courses that shouldn’t be given the StudyStash Activity Module:<br />

   <Frame className="ss-screenshot" caption={"**Figure 5.** Moodle Plugin: Syncing StudyStash to Courses (Opt-Out Mode) — screenshot"}>
     <img loading="lazy" src="https://mintcdn.com/studystash-help/UbXlxW0z5agaJ_Cy/assets/93847554/93847605-image-20260217-235339.png?fit=max&auto=format&n=UbXlxW0z5agaJ_Cy&q=85&s=4bb6c7e3f36bff294366a75026c7a613" alt="Moodle Plugin: Syncing StudyStash to Courses (Opt-Out Mode) — screenshot" width="2856" height="1592" data-path="assets/93847554/93847605-image-20260217-235339.png" />
   </Frame>

   1. Using the filters, narrow the search for the courses you are aiming to exclude

   2. Select the checkbox for any courses that are to be excluded

   3. Press “Save excluded courses”

   4. Return to the “Status” tab

5. Optionally, you can Dry Run the sync:<br />

   <Frame className="ss-screenshot" caption={"**Figure 6.** Moodle Plugin: Syncing StudyStash to Courses (Opt-Out Mode) — screenshot"}>
     <img loading="lazy" src="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" alt="Moodle Plugin: Syncing StudyStash to Courses (Opt-Out Mode) — screenshot" width="2860" height="828" data-path="assets/93847554/93847611-image-20260217-235418.png" />
   </Frame>

   1. Press “Dry Run”, and wait a few seconds/minutes for the task to complete (depending on how many courses you have)

   2. Press the “Logs” tab

   3. Examine logs to ensure behavior is as expected for each course

6. To complete the sync for real, press “**Sync StudyStash to Courses**” on the “Status” tab:<br />

   <Frame className="ss-screenshot" caption={"**Figure 7.** Moodle Plugin: Syncing StudyStash to Courses (Opt-Out Mode) — screenshot"}>
     <img loading="lazy" src="https://mintcdn.com/studystash-help/UbXlxW0z5agaJ_Cy/assets/93847554/93978676-image-20260218-000003.png?fit=max&auto=format&n=UbXlxW0z5agaJ_Cy&q=85&s=c0db00be2abf42afd5cbc2775d627f06" alt="Moodle Plugin: Syncing StudyStash to Courses (Opt-Out Mode) — screenshot" width="393" height="183" data-path="assets/93847554/93978676-image-20260218-000003.png" />
   </Frame>


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