Skip to documentation

Documentation

LMS connectors

Moodle connector

Provision a Moodle web-service connection for facoolta using the official mobile-compatible API surface.

Prerequisites

  • A Moodle site served over HTTPS.
  • Administrator access to web-service and mobile-app settings.
  • A test user enrolled only in non-production courses for initial validation.
  • A documented owner who can revoke the token and review connector activity.

1. Enable web services

  1. Confirm the site URL

    Record the canonical Moodle origin, for example https://learn.example.edu. Do not include a course path or server.php in the base URL.

  2. Enable the supported service

    In Site administration, enable web services for mobile devices or a dedicated external service with the approved functions. Administration labels can vary by Moodle release.

  3. Review protocol access

    Enable REST only if the connector will use it and require HTTPS at the reverse proxy.

2. Issue a token

Create the token for the test user and the approved service. The token inherits both the service function list and the user’s capabilities, so a broad administrator token is not an acceptable shortcut.

3. Validate the connection

Call core_webservice_get_site_info from a protected terminal. A successful result identifies the site, user, Moodle release, and available service context. Delete the value from shell history if your environment records expanded commands.

Connection check
export MOODLE_BASE='https://learn.example.edu'
export MOODLE_TOKEN='replace-with-a-test-token'

curl --fail-with-body --get "$MOODLE_BASE/webservice/rest/server.php" \
  --data-urlencode "wstoken=$MOODLE_TOKEN" \
  --data-urlencode 'wsfunction=core_webservice_get_site_info' \
  --data-urlencode 'moodlewsrestformat=json'

After identity validation, test one course, one deadline, and one downloadable file. Confirm that a course the user cannot access is not returned.

Permissions

The exact Moodle function list depends on the release and campus policy. Approve functions by capability rather than copying an unrestricted service definition.

Identity
Read the connected user and site information.
Courses
Read only courses and enrollments visible to the connected user.
Calendar
Read assignment and event dates; preserve Moodle’s time-zone semantics.
Files
Read permitted course resources through Moodle file endpoints.

Troubleshooting

SymptomCheck
invalidtokenToken revocation, service assignment, user status, and canonical site origin.
Function unavailableThe function is not enabled for the token’s external service or Moodle release.
Missing coursesUser enrollment, visibility dates, suspended enrollment, and capability restrictions.
File download failsFile URL origin, token forwarding rules, redirect origin, and item-level permission.