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

Set readonlysession => true for core_enrol_get_potential_users

XMLWordPrintable

    • MOODLE_402_STABLE, MOODLE_403_STABLE, MOODLE_404_STABLE
    • MOODLE_405_STABLE
    • MDL-81609_main
    • Hide
      1. In config.php, set `$CFG->enable_read_only_sessions_debug = true;`
      2. On your server, run `tail -f /var/log/error.log` where /var/log/error.log is the file your PHP error logs to go.
      3. Go to Admin -> Development -> Make test course and create a size L course.
      4. Go to Admin -> Development -> Make test course and create a size XS course.
      5. On the XS course, go to the Participants page.
      6. Click "Enrol users"
      7. In the "Select users" field, type "a" and wait for the search to complete.
      8. Check the error log output on your server. Confirm there are no messages like " Script defined READ_ONLY_SESSION but the following SESSION attributes were changed".
      Show
      In config.php, set `$CFG->enable_read_only_sessions_debug = true;` 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 L course. Go to Admin -> Development -> Make test course and create a size XS course. On the XS course, go to the Participants page. Click "Enrol users" In the "Select users" field, type "a" and wait for the search to complete. Check the error log output on your server. Confirm there are no messages like " Script defined READ_ONLY_SESSION but the following SESSION attributes were changed".

      core_enrol_get_potential_users, the external function called when searching for new users to enrol on the Participants page, can take a long time on a site with a large number of users. Currently this request holds a session lock, but it doesn't need one as it doesn't make any changes to the session.

      We should add 'readonlysession' => true to the external function definition.

            marxjohnson Mark Johnson
            marxjohnson Mark Johnson
            vladaskidanovas vladaskidanovas
            Andrew Lyons Andrew Lyons
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 5 minutes
                2h 5m

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