version - [1.1.0]
Course-aware uploads and a course-context permission fix.
Added
courseidis recorded on each upload session (new column on
local_fastpix_upload_session), stamped when the upload starts, so the
editor video picker can list a teacher's videos scoped to the current
course.upload_service::list_ready_for_course()returns a user's ready,
non-DRM videos for a course.
Changed
- The upload web services —
create_upload_session,
create_url_pull_session, andget_upload_status— now take a required
contextidand authorisemod/fastpix:uploadmediaagainst the course
context (validate_context()plusrequire_capability()on the course
context resolved withget_course_context()) instead of the system
context.
Fixed
- Editing teachers were wrongly denied upload: the capability was checked at
the system context, where the course-levelmod/fastpix:uploadmedianever
grants, so only site administrators succeeded (by bypassing capability
checks). Permission is now evaluated at the course context — enrolled
editing teachers can upload, and enrolled students are correctly blocked
from uploading or embedding while still able to view. - URL-pulled videos now honour the activity's Media settings. The
create_url_pull_sessionweb service andupload_servicemethod accept and
forwardtitle,accesspolicy,captionsmodeandlanguagecode(parity
withcreate_upload_session) instead of falling back to defaults. Access
policy and the DRM gate behave as for direct uploads. The new web-service
parameters are optional (VALUE_DEFAULT), so existing callers remain
compatible. - URL-pulled videos are now titled correctly. Because FastPix does not reliably
echo the title on the URL-pull create-media webhook, the projector now falls
back to the titlelocal_fastpixrecorded on the matching upload session
(a local lookup, no gateway call) instead of naming the asset "Asset <id>". - A media that FAILS before any "created" event (e.g. a bad URL pull) is now
recorded aserroredinstead of being dropped as an "unknown asset". The
projector treatsvideo.media.failedas a row-insert trigger, so the upload no
longer stays stuck on "Preparing" forever. (The user-facing "failed" message is
rendered bymod_fastpix.)