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

# Connect Puddin to Moodle Using LTI 1.3 Integration

> Step-by-step guide to registering Puddin as a preconfigured LTI 1.3 external tool in Moodle 3.9+ for seamless SSO, assignment sync, and grade passback.

Connecting Puddin to Moodle lets your students launch writing sessions directly from Moodle assignments, signs them in automatically, and synchronises submission data back to Moodle's gradebook. The integration uses Moodle's built-in LTI 1.3 external tool framework, so no additional plugins are required beyond what ships with a standard Moodle installation.

<Note>
  Puddin supports Moodle **3.9 and later**. Moodle 4.x is fully supported. If you are running an older version, upgrade Moodle before proceeding — earlier releases do not include the LTI 1.3 implementation Puddin relies on.
</Note>

## Prerequisites

Before you begin, confirm that you have the following:

* Moodle 3.9 or later with site administrator access
* Access to the Puddin administrator panel (Settings → Integrations)
* Puddin's LTI 1.3 configuration values ready to copy (see [LTI Setup overview](/core/integrations/lti-setup))

## Setup steps

<Steps>
  <Step title="Open the Puddin Integrations panel">
    Sign in to Puddin as an administrator. Navigate to **Settings → Integrations** and locate the **Moodle / LTI 1.3** section. Keep this page open — you will copy values from it into Moodle throughout the following steps.

    Note down or keep ready the following values:

    * Tool URL (your Puddin instance URL)
    * Client ID
    * Public Keyset URL
    * Access Token URL
    * Authentication Request URL
  </Step>

  <Step title="Navigate to the External Tool settings in Moodle">
    Sign in to Moodle as a site administrator. From the top navigation, go to **Site Administration → Plugins → Activity modules → External tool → Manage tools**.

    You will see a list of any currently registered tools and an option to add a new preconfigured tool.
  </Step>

  <Step title="Create a new preconfigured tool">
    Click **Configure a tool manually** (or the equivalent button in your Moodle version). A configuration form opens.

    Set the **Tool name** to something your teachers will recognise, such as `Puddin`.

    Set the **LTI version** field to **LTI 1.3**.
  </Step>

  <Step title="Enter the Puddin Tool URL">
    In the **Tool URL** field, paste your Puddin instance URL from the Integrations panel. This is the base address of your Puddin deployment (for example, `https://youruni.puddin.app`).
  </Step>

  <Step title="Enter the LTI 1.3 configuration values">
    Fill in the remaining fields using the values from the Puddin Integrations panel:

    | Moodle field               | Puddin value to paste      |
    | -------------------------- | -------------------------- |
    | Client ID                  | Client ID                  |
    | Public keyset URL          | Public Keyset URL          |
    | Access token URL           | Access Token URL           |
    | Authentication request URL | Authentication Request URL |
    | Initiate login URL         | Authentication Request URL |

    <Tip>
      Moodle may label some fields slightly differently depending on the version. Match by purpose rather than exact label name if you are unsure.
    </Tip>
  </Step>

  <Step title="Configure services and privacy settings">
    Scroll to the **Services** section. Enable **IMS LTI Assignment and Grade Services** to allow Puddin to pass grades back to the Moodle gradebook.

    In the **Privacy** section, set both **Share launcher's name with tool** and **Share launcher's email with tool** to **Always**. Puddin uses these values to identify the student and link their session to the correct submission.
  </Step>

  <Step title="Save and retrieve the Platform values">
    Click **Save changes**. Moodle will now display a set of platform values for this tool registration (including a **Platform ID**, **Client ID confirmation**, and **Deployment ID**).

    Copy these values into the corresponding fields in the Puddin Integrations panel and click **Save** in Puddin to complete the two-way handshake.
  </Step>

  <Step title="Test the connection">
    Navigate to a test course in Moodle and add an **External tool** activity. Select Puddin from the preconfigured tools list. Open the activity as a student (use Moodle's **Switch role to Student** feature if needed) and confirm that:

    * You are redirected to Puddin and signed in automatically
    * The correct course name appears in Puddin
    * A test submission appears in the Puddin teacher dashboard
  </Step>
</Steps>

## Deploying Puddin to courses

Once the preconfigured tool is saved, any Moodle teacher can add Puddin to their course by inserting an **External tool** activity and selecting Puddin from the list. No further administrator action is required per course.

<Warning>
  If teachers do not see Puddin in the tool picker, check that the tool's **Show in activity chooser and as a preconfigured tool** option is enabled in the tool's settings. Site administrators can verify this from the Manage tools screen.
</Warning>

## Troubleshooting

If the launch fails or students see an error page, review the following:

* Confirm that the Authentication Request URL in Moodle exactly matches the value in the Puddin Integrations panel (no trailing slashes or typos).
* Verify that your Moodle instance can reach the Puddin domain over HTTPS. Firewall rules or proxy configurations occasionally block outbound requests.
* Check Moodle's **Site Administration → Reports → LTI logs** for detailed error messages.

For additional troubleshooting steps, see the [Troubleshooting guide](/core/troubleshooting).
