I am currently running Moodle 1.8.2 (on Linux). I am using the flat file enrollment plugin to create the roles for all our students/faculty. This has worked perfectly until I want to run some unenrolls. As we're now in our add/drop period I have a need to run removes for students in courses. According to the Flatfile enrollment plugin I use the following format:
To add a student:
add, student, ,
To remove a student:
del, student, ,
Well, the add works just fine (imported about 3000 students/faculty to their respective courses). Now I want to remove some students from their courses using the format above. I get the following error for each line in my feed.
:Unknown operation in field 1 - ignoring line
This enrollment feed contains all del entries. Again, my feed with all add lines works fine (and picks up courses that students have since added since the last time I ran the enrollment feed. I've tried using delete instead of del with no luck. Any ideas?????
Hummm, this is really strange. 'del' is the right keyword according to the code (I've had a look at it).
Just to see what's going on, you could edit .../enrol/flatfile/enrol.php and search for line 149 (in 1.8.2+) that reads:
$this->log .= "Unknown operation in field 1 - ignoring line\n";
and change it to:
$this->log .= "Unknown operation in field 1 -" . $fields[0] . "- ignoring line\n";
That will log what operation Moodle thinks you specified, instead of 'del' and allow us to track the error down.
Saludos. Iñaki.
Grrrr... I found the problem. While I can have a space between fields in the add
add, student, ,
I can NOT have a space in the del feed
del,student,,
As soon I I removed the space after the commas it ran fine. Thanks for your response!!
add, student, ,
I can NOT have a space in the del feed
del,student,,
As soon I I removed the space after the commas it ran fine. Thanks for your response!!