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

Repeatedly try to unenrol users who haven't logged in for $CFG->longtimenosee

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.7.2, 1.8, 1.9
    • 1.9
    • None
    • MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
    • MOODLE_19_STABLE

    Description

      I was just trying to debug something in cron, and saw that the cron seemed to be repeately trying to delete unassign the same student enrolments.

      Looking into this, its the code which is trying to unenrol users who haven't been seen in $CFG->longtimenosee. This seems to be determined from user_lastaccess.

      When we unassign users using role_unassign, we don't remove the records from user_lastaccess.

      So at every cron where cleanup is triggered, we keep trying to unassign the same roles, again again and again..

      I don't know if the solution to this problem is to cleanup from user_lastaccess withing the role assignment functions, or do something more manual?

      Attachments

        Activity

          People

            skodak Petr Skoda
            poltawski Dan Poltawski
            Nobody Nobody
            Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Sara Arjona (@sarjona)
            Votes:
            3 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              3/Mar/08