Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-82317

Audio recording file name does not include extension

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 4.1.12
    • Text editor Atto
    • None
    • MOODLE_401_STABLE

      For MDL-78391, the tester experienced issues with audio recordings. A patch was created for this issue and merged as part of MDL-78391, though no formal tracker was made for it.

      A change in MDL-78391 (pre-patch) added explicit checks for different formats (previously only '.webm' and '.oog' were supported).

          getFileExtension: function(type) {
              if (type === 'audio') {
      removed --> if (window.MediaRecorder.isTypeSupported('audio/webm')) {
                      return 'webm';
                  } else if (window.MediaRecorder.isTypeSupported('audio/ogg')) {
                      return 'ogg';
                  } else if (window.MediaRecorder.isTypeSupported('audio/mp4')) {
                      return 'mp4';
          }

      As part of the patch, support for retrieval of the 'audio/webm' extension was dropped.

       

      As such, when an audio recording is uploaded from Chrome (which uses .webm format), no file extension can be retrieved. As a result, the filename within the form data submitted upon upload does not contain the extension:

      ------WebKitFormBoundaryp1VtBXqGjjTRBV1p
      Content-Disposition: form-data; name="repo_upload_file"; filename="9939551983226087-audio."
      Content-Type: audio/webm
       
       
      ...file 

       

      This issue was mentioned here in MDL-80114 by another user too that may mean further implications of this change.

      Steps to replicate

      1. Open Chrome
      2. Navigate to 'admin/settings.php?section=manageeditors' and move Atto HTML editor to the top
      3. Create XS test course and navigate to it
      4. Open 'Assignment 1' settings > Feedback types and enable 'Feedback comments'
      5. Navigate to main 'Assignment 1' page and click 'Grade'
      6. Open Network tab
      7. Upload audio recording using Atto editor
      8. Confirm that 'Form data' 'filename' does not contain extension

       

       

            Unassigned Unassigned
            djarran Djarran Cotleanu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.