enrol_ldap_template

enrol_ldap_template

by I. Musich -
Number of replies: 7
Hi!

I need some help. I'm reading forum but I can't find any answers (maybe because of my bad English).

We use Moodle 1.7+ and LDAP for authentication and enrollment. And it works. Now I want to set Auto create course but it doesn't work.

I have inserted new course in LDAP (and user). When I login login page freez and I have to refresh to get in (not the biggest problem). When I finally get in and into new course it is a empty course with no blocks (the problem).

In enrol_ldap_template i put the name of my template course (is that the right way?). Can I give any more parameters? How does this work?

Goal: I want to create course with blocks as in my template course. Maybe even with some default content.

Can some one give me any directions how do you auto create course.

Thanks.

I. Musich
Average of ratings: -
In reply to I. Musich

Re: enrol_ldap_template

by I. Musich -
I still didn't get any answers but anyway. Can someone tell me, can I call enrol_ldap_sync.php over the internet. Why so?

I have created multimoodle (virual moodle), and now when I call enrol_ldap_sync.php from shell my moodle don't know which moodle to update.

But if I login with user that don't exists moodle and LDAP communicate OK (only problem is I still get empty course with no blocks (auto create course) - my previous post don't solve the problem in multimoodle environment).

Hope you understand what I want, and hope to get any answers.

p.s. I use moodle 1.7.1 on FreeBSD.

Thanks in advance.
In reply to I. Musich

Re: enrol_ldap_template

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

Can someone tell me, can I call enrol_ldap_sync.php over the internet. Why so?

You can't, unless you edit the code. The main reason is that this can be a long and heavy process (depending on the number of users in your LDAP tree and the number of your courses). So this might time-out half-way. The other reason is anybody can DoS your server by simply requesting that URL repeatedly.

I have created multimoodle (virual moodle), and now when I call enrol_ldap_sync.php from shell my moodle don't know which moodle to update.

It depends on how you have created your multimoodle. If you are using a sigle directory install and have tweaked your config.php to serve a different $CFG->wwwroot (and dataroot) depending on the virtual host name, then you need to tweak enrol_ldap_sync.php to use, for example, some environmental variable that you set in your cron jobs before executing enrol_ldap_sync.php

I seem to remember that Martin Langhoff has posted something along these lines in the past. Searching in the forum would be a good idea...

Saludos. Iñaki.

In reply to Iñaki Arenaza

Re: enrol_ldap_template

by I. Musich -
Thanks for your replay. I will try to fix my problem and I will report on my progress. Let the hacking begin wink (for me).

"I seem to remember that Martin Langhoff has posted something along these lines in the past. Searching in the forum would be a good idea..." - believed or not I search the forum many times but didn't find any useful thing. Hope now I will have better luck.

Thank you for your time. I will report my progress.

I.Musich
In reply to Iñaki Arenaza

Re: enrol_ldap_template

by Martín Langhoff -
Hola Iñaki!

Quick comment - IIRC enrol_ldap_sync.php refuses to run from the webserver, so you can't really DoS anyone.

And for searching for the multi-moodle setup, I thinkg good search keywords would be config.php and HTTP_HOST wink
In reply to Martín Langhoff

Re: enrol_ldap_template

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

Quick comment - IIRC enrol_ldap_sync.php refuses to run from the webserver, so you can't really DoS anyone.

Yep, this is exactly what I was saying: you cannot run it from the webserver, among other things, to prevent being DoS-ed smile

Saludos. Iñaki.

(buenos días en Nueva Zelanda, me voy a dormir que son las 23:55 aquí en España wink