Moodle

Upload users enrolls badly formed users and reports no errors

Details

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

Description

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?

Issue Links

Activity

Hide
Petr Škoda (skodak) added a comment -

Should be fixed now in latest 1.9dev version,
thanks for the report.

Show
Petr Škoda (skodak) added a comment - Should be fixed now in latest 1.9dev version, thanks for the report.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: