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

Better error handling needed around ghostscript

XMLWordPrintable

    • MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE
    • MOODLE_31_STABLE, MOODLE_32_STABLE
    • MDL-55762-master
    • Hide
      1. It is difficult to replicate this issue without a partially corrupted pdf, so we will need to hack some code.
      2. As a student upload a pdf file to an assignment that has atleast 4-5 pages.
      3. As teacher go and grade the student, make sure you can comment/annotate on pdf without any issues. (No regressions)
      4. Run

        php admin/tool/task/cli/schedule_task.php --execute=\\assignfeedback_editpdf\\task\\convert_submissions

        and ensure no errors are generated.

      5. Apply this commit to force replicate the issue - https://github.com/ankitagarwal/moodle/commit/79daae1432740f1335c978654f3912cde3da5cc1
      6. Now try grading again as teacher. On third page of the pdf you should see a localised error message.
      7. Try to run the task again, there should not be any errors.
      Show
      It is difficult to replicate this issue without a partially corrupted pdf, so we will need to hack some code. As a student upload a pdf file to an assignment that has atleast 4-5 pages. As teacher go and grade the student, make sure you can comment/annotate on pdf without any issues. (No regressions) Run php admin/tool/task/cli/schedule_task.php --execute=\\assignfeedback_editpdf\\task\\convert_submissions and ensure no errors are generated. Apply this commit to force replicate the issue - https://github.com/ankitagarwal/moodle/commit/79daae1432740f1335c978654f3912cde3da5cc1 Now try grading again as teacher. On third page of the pdf you should see a localised error message. Try to run the task again, there should not be any errors.
    • 3.3 sprint 4

      Right now, if ghostscript fails to convert a PDF page to an image for the PDF grader, some weird behaviours happen. The first time you do it, you get a popup saying that the conversion couldn't happen. If you view it again, you get all the pages up to the one that couldn't render (if the pdf is 10 pages, and page 3 can't be rendered, then you will see pages 1 and 2, with no indication there should be more)

      If the conversion task (\assignfeedback_editpdf\task\convert_submissions) hits one if these, it just globally fails, and can't continue at all.

      Note that there isn't a problem when the markups are composited back for the student to download, we are only seeing it when moodle is trying to display the temporary images of the pages for the PDF markup interface.

            ankit_frenz Ankit Agarwal
            emerrill Eric Merrill
            Jake Dallimore Jake Dallimore
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Mark Nelson Mark Nelson
            Votes:
            10 Vote for this issue
            Watchers:
            18 Start watching this issue

              Created:
              Updated:
              Resolved:

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