Hi to everybody. Can I un-enroll a user from a course using a flat file (CSV extension)??
Thanks very much
Thank you Patrick for the tip.
I tried it in the Upload Users page but it returned a message saying it does not support #operation. I am working on Moodle 1.8 - will that make a difference?
Maybe I am uploading at the wrong place?
Thanks again Patrick!
The Cron is now finding the flatfile (enrolment.txt) but now it does not execute because there is an issue with the userid field. The error message looks like this:
Flatfile enrol cron found file: /usr/www/users/skillshb/moodledata/1/enrolments
.txt
1: del student 4 High School Program :Unknown user idnumber in field 3 - ignoring line
The enrolment.txt file contains a test "student" that I enrolled and now want to unenrol as to test the process before doing it with real and a lot of students. I checked in the mdl_user file in the database to look up the student's userid - the only field I could find was "id" and she was "3" so I put that in. I do not have any idnumber field in my course and now I do not know where to look for the userid that the cron wants to find in the mdl_user table.
Any ideas? Thanks a million!
OK - it is working now:
In the example:
operation,role,userid,courseid
del, student, 8, CF101
del, student, 17, CF101
* "userid" refers to the idnumber field in the mdl_user table.
* "courseid" refers to the idnumber field in the mdl_course table.
In my test, the user I wanted to unenroll did not have an idnumber and the course also did not have an idnumber. I manually inserted the idnumbers in the relevant tables in the MSQL database and voilla when I ran the cron, the user miraculously dissapeared!
Thanks again for the help Patrick.
Patrick,
I want to load a csv file with the student and then in 4 week uneroll them also using a csv file.
How can I make this work?
Thank you,
Gordon
Is there a fieldname that will unenrol a student from a course? It just seem logical that if you can add a course in the CSV file by having the heading: course1, that there should be some way to put in an unenrol tag. I know it would make my life much easier if I could copy the same CSV file info for enrolling courses and paste them in another for unenrolling.
Any luck?