When I use FLAT Files to enrol a user in a course, the user/course mus exist or the moodle create then for me? What diference real between CVS and FLAT file ? I thinking about a solution to take some informations to external database with SQL and with php scripts create FLAT FILES or CVS to import end enrol users on moodle (external database plugin not work directly becouse my external database is to complex and can,t be modified) ; I wnat need what you think about the goals into to methods;
Manuel - I'm not sure what you mean by a FLAT file; however, when using a CSV (comma separated values) text file, as detailed in Upload_users you can include course enrollment data; however, the courses need to exist first. Currently there is no way to Mass Upload courses but it is on my to do list. Unfortunately I am back in school and in the midst of a very busy semester. I'm hoping things will be easier after February. I may have some time around Christmas to play with some code but it is unlikely I will have much time before then. Peace - Anthony
FLAT FILE is a enrolment plugin available in moodle 1.9.2 , this works like CVS file , but , I don,t understand if the user and course must exist and then just enrol ; But it,s Ok , so If I use CVS to upload user I just create a course before , the user will be created if not exist?
If I understand you correctly, yes, the CSV (comma separated values) file can be used to create new users. As you say, if the course exists then the enrollment will take place if that data is included in the file. Keep in mind that CVS (concurrent versioning software) refers to something completely different. I've not tested if adding the enrollment information when users and courses both exist. I would think in theory the enrollment information should be added as part of the updating the user but it is worth testing to verify. If it does not, just add an issue to the tracker and I will look into it. Peace - Anthony
Flat file is jargon for just a file, as opposed to a database.