## DiViS Parents CSV to IServ Elternverwaltung module ## This script takes two files, an IServ user export CSV and a DiViS student <> parents CSV and maps the parents to the IServ students, creating a third CSV file that can be imported into the IServ Elternverwaltung module. The IServ user export CSV is expected to have the following columns: `Account;Vorname;Nachname;Status;"Erstellt am";"Erstellt von";"Interne ID";Benutzertyp;Import-ID;Klasse/Information;E-Mail-Adresse;Gruppen` The student <> parents mapped CSV from DiViS should have the following columns: `"Schüler Vorname","Schüler Nachname","Eltern 1 Vorname","Eltern 1 Nachname","Eltern 2 Vorname","Eltern 2 Nachname"` The CSV exported by this script will have the following columns: `Nachname;Vorname;Kind-ID;Klasse` Status messages, information and errors are always written to `STDERR`, while the generated CSV will be exported to `STDOUT`, meaning you can redirect the `STDOUT` output of this script to a file to export the CSV and still be able to read any informational messages: `$ php ./IServ_Elternimport_Divis.php iserv-user-export.csv divis-parents-export.csv > Parents_Import.csv`