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

Upload users enrolls badly formed users and reports no errors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.9
    • 1.7.1
    • Enrolments
    • None
    • MOODLE_17_STABLE
    • MOODLE_19_STABLE

      A client had a semi colon and quotes in one user name, causing upload users to fail. Problem is, Moodle reported that all users were enrolled. What actually happened was only some users were enrolled, and the script failed after the bad entry.

      Fix: Moodle should throw an error if Upload users encounters badly formatted file.

      Example file:
      username,password,firstname,lastname,email,course1,role1
      test,demo,fred,jones,user@nowhere.com,FS99,3
      hello,hello,Hello,World,"hello@world.com;
      hello@mail.com",FS99,3"

      The report from this upload reads:

      247 , test User updated

      -->Enrolled in course "FS99"

      User: 249 = hello

      -->Enrolled in course "FS99"

      User: 250 = hello@mail.com\"

      -->Enrolled in course "FS99"

      New users: 2

      Users updated: 1

      Errors: 0

      This is in 1.7+

      The test user actually does not get enrolled, while the two parts of the badly formed user account get both created and enrolled in the FS99 course with roleid #3.

      Fixing the upload script fixed the problem, but it would be great if the report would give an error message, and why does it enroll the broken user accounts?

            skodak Petr Skoda
            michaelp Michael Penney (Inactive)
            Nobody Nobody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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