Moodle integrate with SRS system

Moodle integrate with SRS system

by Anthan Ren -
Number of replies: 7

Hi all,

Is there anyone have experience about integrating with SRS(Student Record System)?

I try to export all course from our SRS system and import into Moodle database in database level but failed.

I inserted into course data into table mdl_course including shortname,fullname,category,summary,enrolment_1,enrolment_1_role,enrolment_1_enrolperiod,role_student, however, there are some error in the Moodle page and told me it's error in the code.

Currently, we're using course upload function to do integration but we want this process automatically.

Thanks everyonesmile 

Average of ratings: -
In reply to Anthan Ren

Re: Moodle integrate with SRS system

by Olumuyiwa Taiwo -
Picture of Plugin developers

Hi Anthan,

It appears you're trying to insert data into mdl_course table, based on the names of the corresponding columns in the course upload CSV file. The fields enrolment_1,enrolment_1_role,enrolment_1_enrolperiod,role_student are not present as such in any table in the Moodle database. Instead, they are used to populate the mdl_role_names table. That's why you get an error when you try and insert them into the mdl_course table.

In order to study/understand how course upload work and get some ideas for your automation, you should take a look at the course upload tool at admin/tool/uploadcourse/index.php and follow the functions called from there. Once you understand that, you can write your automation script using the ideas there.

It's worth mentioning that in general you should avoid inserting data directly into the Moodle database. It's much better to use the relevant function from Moodle's API to perform the operation you're trying to achieve. Secondly, you should write your integration as a plugin - in this case you probably want to write it as an Admin Tool plugin.

Good luck!

Average of ratings: Useful (1)
In reply to Olumuyiwa Taiwo

回复: Re: Moodle integrate with SRS system

by Anthan Ren -
Hi Olumuyiwa,


Thanks for your suggestions, I tried to debug the upload course function in the admin/tool/uploadcourse/index.php and found there are many talbes I need to check.

Yes, as you said, I'm studying the plugin and try to use the Moodle's API.

Thanks again.

Anthan

In reply to Anthan Ren

Re: Moodle integrate with SRS system

by Richard Oelmann -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

You may also want to take a look at the core 'external database' enrolment plugin, as that has the ability to link to an external database and create new courses automatically based on that external database, as well as to enrol the students on those courses

Richard

Average of ratings: Useful (2)
In reply to Richard Oelmann

回复: Re: Moodle integrate with SRS system

by Anthan Ren -

Thanks Richard.

Do you said this plugin (Admin tools: Automatic enrolment in groups) https://moodle.org/plugins/tool_groupautoenrol ?

If not, would mind to share some info. with me?

Thanks again for your help.

Anthan

In reply to Anthan Ren

Re: 回复: Re: Moodle integrate with SRS system

by Richard Oelmann -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

No, I was referring to the core function

https://docs.moodle.org/30/en/External_database_enrolment

You dont need to install a plugin from the database, Moodle will do this kind of thing as part of its core features. Provided you can access tables or a report from your SRS database, then set those links as per the documentation above and you can create courses and enrol users on them.

R

Average of ratings: Useful (1)
In reply to Richard Oelmann

回复: Re: 回复: Re: Moodle integrate with SRS system

by Anthan Ren -

Hi Richard,

I'm studying this core plugin and having a further question about this plugin.

May I use this plugin to import the user data from our SRS to Moodle because the enrollment need all user data are prepared before when I use this External database enrolment plugin.

If not, is there any other plugin just like this one for user data importing?

Thanks again for your always helping.