You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Moodle 4.5, using Questionnaire’s TinyMCE field to attach an audio/video recording shows a toast:
“Upload failed with error: {$a->error}” (this is due to an bug with how the error message is passed to the toast handler and is ultimately unrelated to the underlying problem)
The placeholder is not substituted, and the upload fails. Tracing shows the underlying problem is that the editor instance is initialised without file picker options, so moodle:filepickers is undefined. This prevents tiny_recordrtc from configuring the uploader and triggers the error path (which then displays the unsubstituted lang string).
Steps to reproduce:
Create or edit a Questionnaire.
In a TinyMCE editor field, attempt to insert an audio/video recording using the RecordRTC button.
Submit/attach the recording.
Actual result:
Upload fails; toast reads “Upload failed with error: {$a->error}” (placeholder not replaced).
JS trace shows base_recorder.js → uploadFile() passes undefined options to uploader.js (around line 100).
tinymce.activeEditor.settings['moodle:filepickers'] is undefined.
Expected result:
moodle:filepickers should contain the file repository options.
RecordRTC should successfully save the recording into the editor’s draft file area.