Uploaded image for project: 'Moodle QA'
  1. Moodle QA
  2. MDLQA-15457 Moodle 3.11 QA
  3. MDLQA-16046

CLONE - An admin can set either ghostscript or pdftoppm to be used for converting PDF to PNG files




      This test requires Ghostscript and Poppler to be installed on the server. You also need a large PDF file (the larger the better as you will then notice a greater time difference).

      1. Log in as admin, go to Site administration > Server > System paths.
      2. Verify that the Path to ghostscript setting points to your local gs path (be sure it is correctly set).
      3. Verify that Path to pdftoppm setting is empty.
      4. Verify the queue of conversions is empty (table assignfeedback_editpdf_queue 
      5. Create a course and add an assignment with default options and Feedback types: Annotate PDF.
      6. Log out then log in as a student, and submit the PDF file to the assignment.
      7. Verify the database table assignfeedback_editpdf_queue has 1 record
      8. Run the scheduled task:

        php admin/cli/scheduled_task.php --execute='\assignfeedback_editpdf\task\convert_submissions'

        This execution will use gs to generate PNG files from your PDF file. Record the total execution time.

      9. Log out then log in as admin again and go to grade the submission.
      10. Verify that you see the submission content.
      11. Go to Site administration > Server > System paths and add your local pdftoppm path to the_Path to pdftoppm_ setting (be sure it is correctly set).
      12. Repeat steps 6-10 using the same file (remove and add it again) and the same assignment.
      13. Mention in a comment the pdftoppm time and the gs time.


        Issue Links



              cescobedo Carlos Escobedo
              0 Vote for this issue
              1 Start watching this issue