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

Performance: checking group enrolment key always iterates through all groups

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9
    • 1.9, 2.0
    • Enrolments
    • None
    • n/a
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE, MOODLE_20_STABLE

    Description

      low hanging fruit:

      check_group_entry in enrol.php has a loop on groups, currently it iterates all the groups all the time:

      foreach ($groups as $group) {
      if ( !empty($group->enrolmentkey) and (stripslashes($password) == $group->enrolmentkey) )

      { $ingroup = $group->id; }

      }

      maybe someone can put a break in when there is a match.

      Attachments

        Activity

          People

            poltawski Dan Poltawski
            wieloch Joe Wieloch
            Nobody Nobody
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              3/Mar/08