LDAP Enrolment with template course

LDAP Enrolment with template course

by Alexander Schaber -
Number of replies: 3
Hello,

I've created a course, added two forums and a chat to that course, next I set it to be a template for all new courses.

Unfortunately after creating a new course I didnt find any forum nor chat added.

While testing, I got this output since I didn't map all neccessary data fields:

Creating Course Lehrer...Cannot create course: missing required data from the LDAP record!
stdClass::__set_state(array(
'category' => '1',
'password' => '',
'fullname' => NULL,
'shortname' => NULL,
'idnumber' => 'Lehrer',
'summary' => ' Template
',
'format' => 'topics',
'showgrades' => '1',
'modinfo' => 'a:3:{i:24;O:8:"stdClass":6:{s:2:"cm";i:24;s:3:"mod";s:5:"forum";s:7:"section";s:1:"0";s:4:"name";s:16:"Nachrichtenforum";s:7:"visible";s:1:"1";s:5:"extra";s:0:"";}i:26;O:8:"stdClass":6:{s:2:"cm";i:26;s:3:"mod";s:5:"forum";s:7:"section";s:1:"0";s:4:"name";s:16:"Diskussionsforum";s:7:"visible";s:1:"1";s:5:"extra";s:0:"";}i:27;O:8:"stdClass":6:{s:2:"cm";i:27;s:3:"mod";s:4:"chat";s:7:"section";s:1:"0";s:4:"name";s:4:"Chat";s:7:"visible";s:1:"1";s:5:"extra";s:0:"";}}',
'newsitems' => '5',
'teacher' => 'Trainer/in',
'teachers' => 'Trainer/innen',
'student' => 'Teilnehmer/in',
'students' => 'Teilnehmer/innen',
'guest' => '0',
'startdate' => '1200870000',
'enrolperiod' => '0',
'numsections' => '5',
'marker' => '0',
'maxbytes' => '16777216',
'showreports' => '0',
'visible' => '0',
'hiddensections' => '0',
'groupmode' => '0',
'groupmodeforce' => '0',
'lang' => '',
'theme' => '',
'cost' => '',
'currency' => 'USD',
'timecreated' => '1198178480',
'timemodified' => '1198178544',
'metacourse' => '0',
'requested' => '0',
'restrictmodules' => '0',
'expirynotify' => '0',
'expirythreshold' => '864000',
'notifystudents' => '0',
'enrollable' => '1',
'enrolstartdate' => '0',
'enrolenddate' => '0',
'enrol' => '',
'defaultrole' => '0',
))
failed

As you can see it does have the information about forums and the chat in modinfo, but it doesn't use them to create forums/chats for the new course.

Using Moodle 1.8.2 here.

Greetings
Alexander
Average of ratings: -
In reply to Alexander Schaber

Re: LDAP Enrolment with template course

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I'm afraid the template course creation it not what you'd expect. As of now, it doesn't completely copy the course content, just a few settings. That's why you see some references to your forums and chat, but not the forums and chat themselves. It doesn't copy blocks either.

I know it for a fact, as we are developing exactly this functionality for the external database enrolment plugin. Maybe we could have a look at what it would take to add it to the LDAP enrolment plugin too, but I can make no promises (we are a bit tight on both budget and time).

Saludos. Iñaki.

In reply to Iñaki Arenaza

Re: LDAP Enrolment with template course

by Barron Koralesky -


That would be great if the "template" course was more useful for automatic course creation via LDAP! Initially I had hoped that the settings, activities and layouts would be copied from the template, but they aren't. Keep us posted if this is being worked on. Thank you!
In reply to Iñaki Arenaza

Re: LDAP Enrolment with template course

by mathieu doe -
Are you still working on the external database plugin or do we have a chance to have it on the LDAP plugin ?

Kind regards