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

The Assign edit pdf conversion polling doesn't release the session lock

    XMLWordPrintable

Details

    • MOODLE_311_STABLE
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MDL-74911-master
    • Hide
      1. Ensure that the dummy file converter is installed:

        git clone https://github.com/catalyst/moodle-fileconverter_dummy files/converter/dummy
        

      2. Enable the dummy converter from Site administration -> Plugins -> File converters -> Manage file converters
      3. Ensure that you have installed Ghostscript on your server and configured it in the pathtogs config setting
      4. Create a test course with at least one user
      5. In the course, create an Assignment activity ensuring that the following are set:
        1. Feedback types -> Annotate PDF
      6. Press 'Save and Display' to return to the assignment
      7. Press 'View all submissions'
      8. Next to the user in the edit column Click Edit -> Edit submission
      9. Upload the CSV file attached to the tracker
      10. Click 'Save changes'
      11. Right click the 'Grade' button and select 'Open in new tab'
      12. Open the new tab
      13. Wait until the page displays "Generating the PDF"
      14. Switch to the previous tab
      15. Click 'Grade'
      16. Wait for the page to load and Confirm that this page loads and does not display any session lock errors
        1. Confirm that both tabs display "Generating the PDF"
      17. Wait until conversion is complete, generally ~30 seconds
        1. Confirm both tabs display the generated PDF and do not display any errors or popups
      Show
      Ensure that the dummy file converter is installed: git clone https://github.com/catalyst/moodle-fileconverter_dummy files/converter/dummy Enable the dummy converter from Site administration -> Plugins -> File converters -> Manage file converters Ensure that you have installed Ghostscript on your server and configured it in the pathtogs config setting Create a test course with at least one user In the course, create an Assignment activity ensuring that the following are set: Feedback types -> Annotate PDF Press 'Save and Display' to return to the assignment Press 'View all submissions' Next to the user in the edit column Click Edit -> Edit submission Upload the CSV file attached to the tracker Click 'Save changes' Right click the 'Grade' button and select 'Open in new tab' Open the new tab Wait until the page displays "Generating the PDF" Switch to the previous tab Click 'Grade' Wait for the page to load and Confirm that this page loads and does not display any session lock errors Confirm that both tabs display "Generating the PDF" Wait until conversion is complete, generally ~30 seconds Confirm both tabs display the generated PDF and do not display any errors or popups

    Description

      The problem

      When grading assignments using the PDF annotation method (assignfeedback_editpdf) if the submission requires conversion and it has not already been converted, when polling the conversion state the ajax call will initiate a document conversion. If this is a large document, it can take many minutes to convert.

      This would be OK except that it holds the user's session unnecessarily, meaning they cannot use the site (they will get 'unable to obtain session lock') until this conversion is complete.

      From the perspective of the user, they should be able to open documents and wait for them to convert while browsing other areas of the site for e.g. in another tab.

      How to reproduce

      • Ensure cron is OFF - this disables the scheduled conversion task
      • Create an assignment, and upload a large file submission that requires conversion e.g. a csv
      • Open the submission for grading in multiple tabs, this will cause a session lock while the assignment is converted in the users session (since it was not pre-converted via the scheduled task)

      The ideal solution / end goal

      • User is able to open an assignment in another tab / open it for grading and continue browsing side
      • User should also be able to open multiple assignments at once that need converting, they should all convert and complete independently

       

       

      Attachments

        Issue Links

          Activity

            People

              matthewhilton Matthew Hilton
              brendanheywood Brendan Heywood
              Brendan Heywood Brendan Heywood
              Andrew Lyons Andrew Lyons
              Angelia Dela Cruz Angelia Dela Cruz
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 7 hours, 15 minutes
                  7h 15m

                  Clockify

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