I am at my wits' end with this. I have tried everything I can think of (which, given my lack of imagination, isn't much!) and I'm getting nowhere.
Moodle 2.4.7, CentOS 6.4, MySQL 5.1.69, PHP 5.3.27 for test server
Moodle 2.4.6+, Windows Server 2012, MySQL 5.1.68, PHP 5.3.24 for production server
First, a bit of background: The College where I work creates a new Moodle each year, and keeps 3 past years' Moodles available to current students. This allows them to look through past years' lecture notes, assignments, quizzes and results etc. For our 'current year' Moodle, we have LDAP controlling subject (Moodle: course) enrollments. So at this time last year I loaded a CSV flatfile of the 2012 subject enrollments into the 2012 Moodle, which means that students see their 2012 subjects if they log on to the 2012 Moodle.
Now I am trying to load this year's subject enrollments, and NOTHING IS WORKING!
I have tried every possible combination of users::username, users::id and users::idnumber and course::shortname, course::id and course::idnumber. In our case, course::shortname and course::idnumber are identical, so if it uses either of those, it should match.
The Site administration->Plugins->Enrollments->Flat file (CSV) page says it should be users::idnumber and course::idnumber, but I tried the others because it wasn't happy. I initially had a problem with using the wrong line breaks, but that's now sorted. I tried enclosing all fields in quotes, not just the user::idnumber, but that made no difference.
When I use either user::username or user::id, the Cron output gives "Unknown user idnumber or deleted user…".
When I use user::idnumber, both options for course give "Line incorrectly formatted - ignoring". The user::idnumber field contains the LDAP string (e.g. CN=10076746,OU=MooreUsers,O=Moore,C=AU), and since it contains commas it is enclosed in quotes. The fact that it doesn't say "Unknown user idnumber…" leads me to believe that it is correctly receiving the user::id, but not matter what else I supply it gives me "Line incorrectly formatted…".
Here are a few sample lines (user::idnumber, course::idnumber):
add,student,"CN=10076746,OU=MooreUsers,O=Moore,C=AU",BS141
add,student,"CN=10071420,OU=MooreUsers,O=Moore,C=AU",BS121
add,student,"CN=10070683,OU=MooreUsers,O=Moore,C=AU",CM102
add,student,"CN=10082482,OU=MooreUsers,O=Moore,C=AU",BS141
I would value comments and suggestions from those any who use flatfile enrollment successfully.
Cheers,
Rob