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

Insufficient error handling for unoconv

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Testing instructions:

      1. As Admin go to Site administration > Plugins > Document converters > Manage document converters
      2. Click on Enable Unoconv
      3. Click on the Unoconv Settings link
      4. Click on the Test unoconv path (ensure the unoconv path is properly configured).
      5. If not, configure Unoconv following documentation instructions: https://docs.moodle.org/34/en/Universal_Office_Converter_(unoconv)
      6. Create / use Moodle Course
      7. Add an Assignment with File submissions ticked
      8. As a Student, submit an assignment document (.docx, .doc, .jpg, .odt, etc..)
      9. As Admin, tail the Apache error log file for any errors (e.g. /var/log/apache2/error.log)
      10. As an Admin, grade the submitted assigned and check the document conversion for any failures
      11. Repeat from Step 8. using any known input files that causes unoconv conversion failures files and this should generate an error log message in the /var/log/apache2/error.log file
      Show
      Testing instructions: As Admin go to Site administration > Plugins > Document converters > Manage document converters Click on Enable Unoconv Click on the Unoconv Settings link Click on the Test unoconv path (ensure the unoconv path is properly configured). If not, configure Unoconv following documentation instructions: https://docs.moodle.org/34/en/Universal_Office_Converter_(unoconv ) Create / use Moodle Course Add an Assignment with File submissions ticked As a Student, submit an assignment document (.docx, .doc, .jpg, .odt, etc..) As Admin, tail the Apache error log file for any errors (e.g. /var/log/apache2/error.log) As an Admin, grade the submitted assigned and check the document conversion for any failures Repeat from Step 8. using any known input files that causes unoconv conversion failures files and this should generate an error log message in the /var/log/apache2/error.log file
    • Affected Branches:
      MOODLE_31_STABLE
    • Pull Master Branch:
      MDL-54554-master
    • Story Points:
      5
    • Sprint:
      Activity Sprint 2

      Description

      In lib/filestorage/file_storage.php the function create_converted_document is used to call unoconv via a PHP exec() call. The return value is not checked and the $output array is set but never used.

      I don't know if the intention was to revisit this before release but as it stands any problem with unoconv is going to fail silently (nothing logged) which isn't a good thing.

      In order to avoid meltdown in the support forums, this needs to be as robust as it possibly can be.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                71 Vote for this issue
                Watchers:
                58 Start watching this issue

                Dates

                • Created:
                  Updated: