enrol_db_autocreate option missing for course creation

enrol_db_autocreate option missing for course creation

by Greg Merchant -
Number of replies: 4

We have setup an external db with course information for auto course creation. We have this successfully setup on our 1.9 site but can't get it to work on our new 2.2 site. According to the "current" documentation there should be a yes/no drop down list for "enrol_db_autocreate" in the external database settings page but such a thing doesn't exist in our settings menu. Has something replaced this? Any thoughts.

Also, in the install php file under enrol/database there is this entry

 85      unset_config('enrol_db_autocreate'); // replaced by new coruse temple sync
 86      if (isset($CFG->enrol_db_category)) {
 87          set_config('defaultcategory', $CFG->enrol_db_category, 'enrol_database');
 88          unset_config('enrol_db_category');

I'm not a programmer but this looks like this is undoing this option. Thoughts?

Greg

Average of ratings: -
In reply to Greg Merchant

Re: enrol_db_autocreate option missing for course creation

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
Hello,

in 2.x new courses are created when you fill in the external table with course details. The courses are crated when you execute the enrol/database/cli/sync.php script.

I was planning to add more options for configuration of cron actions and course creation during user login. It should be part of Moodle 2.3 and it might be even backported to some later Moodle 2.2.x

Petr
In reply to Petr Skoda

Re: enrol_db_autocreate option missing for course creation

by Carlos Sánchez Martín -

Hello Petr,

We authenticate and enroll via LDAP (being an external database), and it works, at least the auto-creation. The enrollment requires that users exist within our Moodle database, so we have to run a separate script to get them from our nested groups (because we don't want all AD users). What I am wondering is if some of these new stuff you are planning to add will include a more robust way of auto-creating the course with a template. I think it is a good idea, and I created a tracker for it last month, but maybe it could be related to this discussion. What do you think?

http://tracker.moodle.org/browse/MDL-30455 

Carlos

In reply to Petr Skoda

Re: enrol_db_autocreate option missing for course creation

by Greg Merchant -

Thanks Petr. Running the sync.php did the trick.

Greg

In reply to Petr Skoda

Re: enrol_db_autocreate option missing for course creation

by Scot Hacker -

It probably would be good to update the documenation in that case. I too spent a while looking for a documented setting on this panel... which doesn't exist. Thanks!