enrol_ldap_template

enrol_ldap_template

by I. Musich -
အကြောင်းပြန်မှု အရေအတွက်: 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
ပျှမ်းမျှအဆင့်သတ်မှတ်ချက်များ: -
I. Musich ထံသို့ အကြောင်းပြန်ရာတွင်

Re: enrol_ldap_template

by I. Musich -
I found solution for blocks with auto creation over LDAP.
You have to put require_once($CFG->dirroot.'/lib/blocklib.php');
in enrol_ldap_sync.php. (http://moodle.org/mod/forum/discuss.php?d=58207).

Still a question: Does your login page freezes when moodle is doing enrol_ldap_sync.php
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.
I. Musich ထံသို့ အကြောင်းပြန်ရာတွင်

Re: enrol_ldap_template

by Iñaki Arenaza -
Core developers ၏ ရုပ်ပုံ Documentation writers ၏ ရုပ်ပုံ Particularly helpful Moodlers ၏ ရုပ်ပုံ Peer reviewers ၏ ရုပ်ပုံ 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.

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
I. Musich ထံသို့ အကြောင်းပြန်ရာတွင်

Re: enrol_ldap_template

by Iñaki Arenaza -
Core developers ၏ ရုပ်ပုံ Documentation writers ၏ ရုပ်ပုံ Particularly helpful Moodlers ၏ ရုပ်ပုံ Peer reviewers ၏ ရုပ်ပုံ Plugin developers ၏ ရုပ်ပုံ

""I seem to remember that Martin Langhoff has posted something along these lines in the past. [...]"

It seems knowing the magic words helps finding the post faster ပြုံး Here you have it:

http://moodle.org/mod/forum/discuss.php?d=13211#p63595

Saludos. Iñaki.

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 မျက်စိတစ်ဖက်မှိတ်
Martín Langhoff ထံသို့ အကြောင်းပြန်ရာတွင်

Re: enrol_ldap_template

by Iñaki Arenaza -
Core developers ၏ ရုပ်ပုံ Documentation writers ၏ ရုပ်ပုံ Particularly helpful Moodlers ၏ ရုပ်ပုံ Peer reviewers ၏ ရုပ်ပုံ 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 ပြုံး

Saludos. Iñaki.

(buenos días en Nueva Zelanda, me voy a dormir que son las 23:55 aquí en España မျက်စိတစ်ဖက်မှိတ်