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

Role_unassign in enrol\ldap broken

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9
    • Component/s: Enrolments
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      in accesslib.php the function role_unassign creates an invalid select statement for the role_capabilities table

      this call:
      get_records_select('role_assignments', implode(' AND', $select)))

      ends up returning no results, as it references "roleid' instead of 'id'

      to fix it we need to change the line:
      $args = array('roleid', 'userid', 'groupid', 'contextid');
      to:
      $args = array('id', 'userid', 'groupid', 'contextid');

      (and define id as a var somewhere higher, maybe in the function call)

      Dan

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                danmarsden Dan Marsden
                Reporter:
                danmarsden Dan Marsden
                Participants:
                Component watchers:
                Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

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