Enrolment

 
 
Picture of Simon Bryan
Add enrolment plugins to course via SQL
 

Hi all,

I have migrated from 1.9 to 2.5 using a brand new 2.5 install and Backup/Restore of courses. 

Unfortunatley most if not all of teh courses ahve no enrolment methods attached, as there are 98 courses I was wondering if anyone knew which fields I need to set in which table in the MySQL database?

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: Add enrolment plugins to course via SQL
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

The PHP code that does this is in lib/enrollib.php, the add_instance method. https://github.com/moodle/moodle/blob/master/lib/enrollib.php#L1598

So, it looks like you just need to add a row to the enrol table.

As a check of this, set up enrolment for one of your courses manually through the Moodle UI, and verify what changes in the databse.

 
Average of ratings: -
Picture of Simon Bryan
Re: Add enrolment plugins to course via SQL
 

Thanks for that, I was more hoping it wuld be qa flag in the course database, by the time I setup teh data set to import I might as well bite the bullet and just use the UI.

 

cheers

 
Average of ratings: -