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

Close session early in mod_assign_output_fragment_gradingpanel

XMLWordPrintable

    • MOODLE_402_STABLE, MOODLE_403_STABLE, MOODLE_404_STABLE
    • MOODLE_403_STABLE, MOODLE_404_STABLE
    • MDL-81611_403_STABLE
    • MDL-81611_404_STABLE
    • MDL-81611_main
    • Hide
      • Log in as admin
      • Go Admin -> Development -> Debugging and ensure debugging is set to DEBUG_NORMAL or higher.
      • On your server, run `tail -f /var/log/error.log` where /var/log/error.log is the file your PHP error logs to go.
      • Go to Admin -> Development -> Make test course and create a size XS course, which includes a user and an assignment.
      • Go to the test course and open the assignment.
      • Click the "Grade" button.
      • Wait for the page to load the grading form, which does a call to the fragment function.
      • Confirm that the error log does not contain an error like "Script /lib/ajax/service.php mutated the session after it was closed"
      Show
      Log in as admin Go Admin -> Development -> Debugging and ensure debugging is set to DEBUG_NORMAL or higher. On your server, run `tail -f /var/log/error.log` where /var/log/error.log is the file your PHP error logs to go. Go to Admin -> Development -> Make test course and create a size XS course, which includes a user and an assignment. Go to the test course and open the assignment. Click the "Grade" button. Wait for the page to load the grading form, which does a call to the fragment function. Confirm that the error log does not contain an error like "Script /lib/ajax/service.php mutated the session after it was closed"

      mod_assign_output_fragment_gradingpanel can be slow because rendering the fragment may involve converting a PDF to images for annotation. This can result in core_get_fragement web service holding a long session lock. However, this fragment does not write to the user's session, so it is not necessary for it to hold the lock.

      We should call \core\session\manager::write_close() early in this fragment callback to release the session lock.

            marxjohnson Mark Johnson
            marxjohnson Mark Johnson
            vladaskidanovas vladaskidanovas
            Huong Nguyen Huong Nguyen
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 47 minutes
                1h 47m

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