version -[1.1.0]
Added
Media settings (mod_form.php)
- New Protection & captions section on the activity form.
- Access policy — Private / Public / DRM segmented control (default Private). DRM is only selectable when the site has DRM configured.
- Captions & transcript — a toggle with two modes: Auto-generate (language picker:
en/es/it/pt/de/fr, plus beta languages) or Upload .vtt (a drag-and-drop dropzone backed by the newmod_fastpix/captions_uploadAMD module, uploading to a Moodle draft area). - Three new columns on
mdl_fastpix—access_policy,captions_mode,language_code— with adb/upgrade.phpstep. These feedlocal_fastpix'screate_upload_sessionat upload time (the title is taken from the activity name).
Watch reports / analytics (report.php)
- A Watch report secondary-navigation tab on the activity, gated by
mod/fastpix:viewallattempts. - Per-video report — unique viewers, average watched %, completion rate, biggest drop-off, an engagement curve (inline SVG with a fixed 0–100 axis), and a per-student table (watch %, watch time, milestones, completed, last position, seeks, fraud flags).
- Per-user report — one student's engagement across every FastPix video in the course.
- CSV export on both reports via
\core\dataformat. - New
\mod_fastpix\report\watch_reportaggregation service, renderer methods, andreport_video/report_usertemplates. Display-only — no new tracking, no FastPix calls.
Asset reference counting
mod_fastpixnow registers a reference withlocal_fastpix(mod_fastpix:<activityid>) when an activity links a video, and releases it on delete or asset-swap, throughasset_lifecycle_service.local_fastpixsoft-deletes the asset only when its last reference is released. The calls are fail-safe — a missing or throwing service never blocks a save or delete.
Changed
Upload context (mod_form.php + amd/src/upload_widget.js)
- The upload widget now receives the course context id instead of the system context, and forwards
contextidtolocal_fastpix'screate_upload_session/create_url_pull_session. Upload permission (mod/fastpix:uploadmedia) is enforced at the course context, and uploads are tagged to their course. create_upload_sessionarguments updated to the new contract (contextid,title,accesspolicy,captionsmode,languagecode) and its no-underscore return fields (uploadurl/uploadid).local_fastpixdependency pinned to2026061500;releaseis now1.1.0.
JavaScript served locally — no CDN (Moodle Plugins Directory requirement)
- Player libraries are no longer loaded from a public CDN.
hls.js(1.6.16) and the@fastpix/resumable-uploadsSDK (1.0.5) are now vendored underthirdparty/and served from the Moodle site; both are declared in the newthirdpartylibs.xml. - The FastPix web player is served from
local_fastpix(its build embeds FastPix API endpoint literals, so it cannot live here per architecture rule A3).mod_fastpixconsumes its URL via\local_fastpix\service\playback_service::player_lib_url()— hence the dependency bump to2026061500.
Fixed
- Per-user watch report could resolve any site user by id.
report.phpnow restricts the per-user report target to users enrolled in the course (mod/fastpix:viewallattemptsholders only), closing a fullname-disclosure path on both the HTML and CSV outputs. - Course backup dropped three media settings.
access_policy,captions_mode, andlanguage_codewere not captured by the activity backup and silently reset to defaults on restore/duplicate; they are now included. - Teachers could not upload from the activity form. Upload permission was checked at the system context — where editing teachers hold no role — instead of the course context, so every upload was denied. It is now checked at the course context; students enrolled in the course still cannot upload or embed but can view.
- "Invalid parameter value detected" on upload. The widget was sending stale arguments (
filename,size) tocreate_upload_session; it now sends the requiredtitle/accesspolicy/captionsmode/languagecode, and reads theuploadurl/uploadidreturn fields. - Engagement chart auto-scaled instead of showing a fixed 0–100 range (Moodle's chart API passes the bound as Chart.js v2
ticks.min/max, which the bundled Chart.js v4 ignores). Replaced with an inline SVG locked to 0–100. - The "Watch report" link never rendered — the navigation callback short-circuited on
empty($PAGE->cm), which is always true for that magic property (moodle_pagehas__getbut no__issetforcm).