Set up mod plugin
Add FastPix-hosted videos to any Moodle course with the mod_fastpix activity plugin: upload and playback, watch tracking, completion thresholds, and automatic gradebook writeback.
The mod_fastpix plugin adds a FastPix Video activity type to Moodle. Teachers can upload a video or pull one from a URL directly from a course, set a completion threshold based on how much of the video a student has watched, and let Moodle write the grade automatically when the threshold is met.
mod_fastpix is a consumer plugin. It builds on local_fastpix, the foundation plugin that owns FastPix credentials, the HTTP gateway, the asset cache, webhook ingestion, and playback-token signing. mod_fastpix never talks to FastPix directly, every video operation goes through local_fastpix. On its own, mod_fastpix ships the activity edit form, the player view, the watch tracker, the six fraud checks, completion handling, gradebook integration, and backup and restore.
The audience for this guide is Moodle site administrators and teachers. A first-time setup takes about 10 minutes, assuming that local_fastpix is already connected.
Before you begin
Make sure that you have:
- A Moodle site running version 4.5 LTS or later.
- PHP 8.1 or later. The plugin is tested through PHP 8.3.
- Site administrator access to your Moodle dashboard.
local_fastpix1.0.0 or later, installed and connected to a FastPix account. The Test connection button on the FastPix settings page must return a greenAuthenticatedresult.- A short test video (MP4, under 100 MB) for verification.
NOTE:
You can’t installmod_fastpixstandalone. Moodle blocks the install with a dependency error untillocal_fastpixis present. If you haven’t set up the foundation plugin yet, see Fastpix local plugin guide first. The plugin has no runtime Composer dependencies.
Install the plugin
You can install mod_fastpix from the Moodle plugins directory or from a ZIP file.
Install from the Moodle plugins directory
- Sign in to Moodle as a site administrator.
- Go to Site administration > Plugins > Install plugins.
- Search for FastPix Video and follow the prompts.
Install from a ZIP file
- Download the latest release from the GitHub Releases page.
- Sign in to Moodle as a site administrator.
- Go to Site administration > Plugins > Install plugins.
- Drag the ZIP onto the drop zone, or select Choose a file to upload it. Don’t unzip the file first; Moodle installs the package directly from the ZIP.
- Select Install plugin from the ZIP file, then continue through the validation screen.
- On the Plugins requiring attention screen, select Upgrade Moodle database now.
- When the upgrade finishes, select Continue.
To confirm the install, go to Site administration > Plugins > Activity modules > Manage activities. FastPix Video appears in the list with the FastPix logo.
Add a video activity
Teachers add videos directly from a course. No admin involvement is needed once local_fastpix is connected.
- Open a course and turn Edit mode on.
- Select Add an activity or resource, then select FastPix Video. It appears under the Assessment group, because the activity supports completion and writes a grade.
- Enter a Name and an optional Description.
- Set the access policy and captions for this video. See Set media settings.
- Add the video in the Video source section. See Add the video.
- Set the playback, completion, and grade options. See Configure playback and Set completion and grading.
- Select Save and display.
IMPORTANT:
The video is uploaded to FastPix when you save the activity, not while you’re still filling in the form. If you choose a file and then leave without saving, nothing is uploaded.
Set media settings
The Media settings section sits above Video source: pick how the video is protected and captioned before you add it. These choices are applied when the video is uploaded to FastPix, not afterwards.
- Access policy — how playback is gated:
- Private (default, recommended): only signed-in learners can play.
- Public: anyone with the link can play.
- DRM: encrypted playback on licensed devices; the strongest protection. Selectable only when
local_fastpixhas DRM configured; otherwise saving the activity is rejected.
- Captions & transcript — off by default. Turn the toggle on, then choose one mode:
- Auto-generate: FastPix transcribes the audio in the Language you pick. Subtitles match the spoken language; they aren’t translated. English, Spanish, Italian, Portuguese, German, and French are fully supported; further languages are offered tagged (Beta).
- Upload .vtt file: drag in your own WebVTT subtitle file (one
.vttper activity).
Add the video
You can add a video by uploading a file or by pulling one from a URL.
Upload a video
In the Video source section, drag a file onto the drop zone or select it from your device. The upload runs in resumable chunks with a live progress bar, so large files survive a flaky connection. When the bar reaches 100%, the page shows the message Upload complete. Save the activity to finalize. Select Save and display to commit.
Uploading requires the mod/fastpix:uploadmedia capability, which editing teachers hold by default.
Pull from a URL
Instead of uploading, you can paste a direct video URL into the Video URL field and select Upload. FastPix fetches the file from the URL. A green confirmation means that the URL was accepted; select Save and display to commit.
local_fastpix includes an SSRF guard that rejects malformed or unreachable URLs.
Configure playback
In the Playback options section, set how the player behaves for this activity. Both settings are optional.
Set completion and grading
Completion and grading work through Moodle’s standard activity-completion and grade APIs. The FastPix activity adds one custom completion condition.
- In the Activity completion section, set Completion tracking to Show activity as complete when conditions are met.
- Select Students must watch the video and enter a percentage. The default is
90%. - In the Grade section, set the maximum grade. The default is
100.
When a student crosses the completion threshold, Moodle marks the activity complete and writes the grade once, at the maximum, through Moodle’s standard grade API. Watching past the threshold doesn’t rewrite the grade.
NOTE:
Completion is based on coverage, the unique seconds that a student actually watched, merged and deduplicated not on the position of the playhead. Dragging the timeline to the end doesn’t complete the activity, and rewatching the same minute counts only once.
Verify your installation
After you save the activity, run these checks to confirm that the integration is healthy.
- From the course, open the activity you just created. You should see a Preparing your video card. It swaps to the player automatically when the video is ready, usually within a minute.
- Switch to a student view through Switch role to > Student, or sign in as a test student in a different browser.
- Open the activity and play past the completion threshold. The activity should be marked complete.
- Open Grades for the course and confirm that the test student has a grade for the activity.
If any step fails, see Troubleshooting.
How playback and completion work
This section describes what students see and how the plugin tracks watch progress. You don’t need to configure any of this, it’s the default behavior of every FastPix Video activity.
What students see
- A modern adaptive player that works across browsers, mobile, and slow networks.
- A minimal progress indicator under the video, and a Completed marker after the threshold is met.
- Resume after refresh. Watch progress is saved server-side every 10 seconds and on tab close, so reopening the video on any device picks up where the student left off.
- While a freshly uploaded video is still transcoding, a Preparing your video card. It swaps to the player automatically when the video is ready.
How watch progress is tracked
The player posts watch progress to Moodle every 10 seconds and when the student closes the tab. Each callback updates the student’s coverage record, the set of unique seconds that they’ve actually watched.
Coverage drives completion. When a student’s coverage crosses the threshold percentage you set, Moodle marks the activity complete and writes the grade. Coverage only ever grows; rewinding to an already-watched section doesn’t change it, and seeking forward past unwatched content doesn’t count those seconds.
Fraud prevention
Each watch-progress callback runs six server-side checks, in order. A check that fails doesn’t silently block the student, it increments a per-attempt fraud counter and records a typed reason.
- Watched time can’t exceed the video duration.
- Watched time can’t exceed wall-clock time since the session started, with a 10-second tolerance.
- Coverage can’t decrease.
- A single callback’s gain can’t exceed the elapsed time, with a 10-second tolerance.
- The student’s view capability is re-verified on every callback.
- On activities with Disable seeking enabled, the server rejects any forward seek.
When the per-attempt fraud counter passes 20, the gradebook shows a badge on the student’s attempt. The badge is visible to anyone with the mod/fastpix:viewallattempts capability, so a teacher can review the attempt and decide what to do. Correction is a human decision, made with mod/fastpix:graderoverride.
View the watch report
Teachers with the mod/fastpix:viewallattempts capability can open a Watch report tab on any FastPix Video activity. The report shows how students are engaging with the video — it’s read-only and surfaces the watch data the plugin has already recorded, with no extra tracking and no calls to FastPix.
The report has two views:
- Per-video view. For a single activity, shows unique viewers, average watched percentage, completion rate, the biggest drop-off point, an engagement curve, and a per-student table.
- Per-user view. For a single student, shows their engagement across every FastPix Video activity in the course.
Both views can be exported to CSV.
Back up and restore courses
mod_fastpix supports Moodle’s standard course backup and restore. A backup captures the activity settings and the per-user attempt rows, and preserves the asset reference. It doesn’t capture the video bytes, which stay on FastPix.
- Restoring onto the same Moodle site, pointing at the same FastPix account, plays normally.
- Restoring onto a Moodle site that points at a different FastPix account shows Video unavailable, because the asset doesn’t exist in the new account. This is expected behavior, not a bug.
Deleting an activity, including through the recycle bin, soft-deletes the underlying asset through local_fastpix.
Privacy
mod_fastpix includes a full Moodle Privacy API provider. It declares every personal-data column in the attempt table - watch progress, seek count, fraud count, completion state, and session timestamps. GDPR export and per-user delete requests are handled from Moodle’s standard data-request UI.
For full details, go to Site administration > Users > Privacy and policies > Data registry in your Moodle site.
Troubleshooting
The video stays on “Preparing your video”
The asset hasn’t reached the ready state yet. Processing is asynchronous and depends on a webhook from FastPix being delivered to local_fastpix and drained by Moodle cron.
- Confirm that Moodle cron is configured and running. The ready notification is processed by a scheduled adhoc task.
- Confirm that the
local_fastpixwebhook is registered and that its signing secret is saved. Until the webhook arrives, the video can’t become playable.
The player is a blank box
The player web component didn’t load. This is usually a transient asset-loading issue, reload the page. If it persists, confirm that the page is served over HTTPS. DRM playback requires a secure context.
A video shows “Video unavailable”
The asset can’t be resolved. Common causes:
- The course was restored onto a Moodle site that points at a different FastPix account. This is expected behavior, see Back up and restore courses.
- The asset was deleted on the FastPix side.
Seek buttons still appear after I enable “Disable seeking”
Save the activity again so that the setting is written, then reload the player page. If you have a CSS or JS cache layer, purge Moodle caches at Site administration > Development > Purge caches.
The completion condition doesn’t appear on the form
Custom completion rules only show under Activity completion when Completion tracking is set to Show activity as complete when conditions are met. Confirm that completion is enabled at both the site level and the course level.
Private videos don’t play, but public ones do
A private or DRM asset needs a playback_id and a signed token, both provided by local_fastpix. If the asset is ready but won’t play, the issue is on the foundation-plugin side. Confirm that local_fastpix has minted its signing key and that the asset carries a playback_id.
What’s next
- Set up the foundation plugin: Fastpix local plugin.
- Explore the FastPix API documentation.
- Review the project status and known limitations:
STATUS.md. - Read the release notes:
CHANGELOG.md.