import users to the moodle database

import users to the moodle database

by Raissa Jiofack -
Number of replies: 2

hello I am working on a project related to moodle and a Notes Management System. 

it is a question of transferring all the information presented on the student users of this system to moodle. I would like you please to know all the tables concerned by this transfer as well as the technique to be used to be able to do it (the source codes to modify for the collaboration with this external system). The information relating to students in this system are: 

user ID, teacher_id, special_id, registration number, E-mail username, password, telephone (telephone number) ,role (which can be administrator, student or teacher), state (which can be active or inactive). 

I am using moodle 3.9.2. thank you. 

Average of ratings: -
In reply to Raissa Jiofack

Re: import users to the moodle database

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I would strongly advise against manipulating Moodle's database from an external system.

Like your other question, I would investigate Moodle's web services API which will do what you need (safely).

https://docs.moodle.org/dev/Web_services
Average of ratings: Useful (1)
In reply to Howard Miller

Re: import users to the moodle database

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Even if you do use Moodle webservices (which I agree you definitely should be doing here), you may struggle with translating some of the concepts onto a Moodle system.

For example, 'teacher_id' - that would imply there is some sort of relationship in the external system between students and teachers - in Moodle, the closest I can think of would be a student enrolled on a course and a teacher also enrolled on a course. I don't know what 'special_id' is, so you'd have to explain more, or figure out for yourself what that would mean in Moodle. In Moodle terms, a 'role' is only relevant for a single course, not the whole site - a user can be a 'teacher' on one course, but a 'student' on another.
Average of ratings: Useful (2)