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

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.7.2, 1.8, 1.9
    • Fix Version/s: 1.9
    • Labels:
      None
    • Affected Branches:
      MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      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

            Assignee:
            skodak Petr Skoda
            Reporter:
            poltawski Dan Poltawski
            Tester:
            Nobody
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            3 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              3/Mar/08