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

Upload users throws 'undefined variable' warning for roles with no assignable roles

    XMLWordPrintable

Details

    • MOODLE_37_STABLE
    • MOODLE_36_STABLE, MOODLE_37_STABLE
    • MDL-65654-master
    • Hide

      Prerequisites

      1. Developer debugging enabled

      Testing

      1. Create a new role "Demo role" with "demorole" shortname
        • Do not specify an archetype
        • Set "system" as a context
        • This role must have the "moodle/site:configview" and "moodle/site:uploadusers" capabilities allowed
      2. Create a new user and assign this role in system context
      3. Create a new course "Demo course" with "democourse" shortname
      4. Enable debug and display debug messages
      5. Log out
      6. Log in as the user who was assigned Demo role
      7. Navigate to Site administration => Users => Upload user
      8. Upload the attached CSV
      9. Press "Upload users" to preview
      10. Press "Upload users" to upload the users
        1. Confirm that no errors were shown
      Show
      Prerequisites Developer debugging enabled Testing Create a new role "Demo role" with "demorole" shortname Do not specify an archetype Set "system" as a context This role must have the "moodle/site:configview" and "moodle/site:uploadusers" capabilities allowed Create a new user and assign this role in system context Create a new course "Demo course" with "democourse" shortname Enable debug and display debug messages Log out Log in as the user who was assigned Demo role Navigate to Site administration => Users => Upload user Upload the attached CSV Press "Upload users" to preview Press "Upload users" to upload the users Confirm that no errors were shown

    Description

      When uploading users and current user role has no assignable roles a warning about undefined variable 'rolecache' is shown with debugging on.

      Attachments

        Activity

          People

            danielneis Daniel Neis Araujo
            danielneis Daniel Neis Araujo
            Marina Glancy Marina Glancy
            Andrew Lyons Andrew Lyons
            Andrew Lyons Andrew Lyons
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 50 minutes
                50m

                Clockify

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