Hi,
We've developped a CAS Module for Moodle based on the LDAP one. What is the procedure to submit this module to Moodle team ?
Yes there is !
Thanks, i've not seen the post before (to much mails).
I'll do the modifications soon in CVS.
Ok
The $CASLANGAGES modif is in CVS.
The comment modifications can't be done because i need the ldap lib.
Thanks and sorry for delay because of Hollidays with SUN and SEA.
Cheers
Romuald
You should already have been redirected to the CAS server. Click here to continue.
Then I get this error:
phpCAS 0.5.1-1 using server https://cas.upc.edu:443/login?/ (CAS 2.0)
But theorically the CAS version of Moodle is already 2.0 and not 0.5.1-1... anyone has that problem too?
As I say here (http://moodle.org/mod/forum/discuss.php?d=145788#p648619) the version of phpCAS has just been upgraded to the latest one, and the notices and warnings should be gone.
With respect to the version numbers, there's the phpCAS library version (latest is 1.1.0 right now), the JA-SIG CAS server version (latest is 3.4.2 right now), and the CAS protocol itself, which can be either 1.0 or 2.0 depending on the CAS server version you are using.
With the latest phpCAS library (which has just been committed to Moodle 1.9.x and 2.0) you should be able to use CAS 1.0 or 2.0 with any JA-SIG CAS server version up to the latest.
Saludos, Iñaki.
Well, i've complete my profile page.
It's complicated to do a demo Moodle CAS site because to connect to the plateform you have to be in the LDAP and recognize by the portal ESup.
We think to use the demo user of the portal to do a demonstration site but it's not our priority.
We've done it.
Ok, this is the Cas Module for Moodle in the state of the art.
There is only the files to add/replace for a 1.4.3 Moodle version. So just replace.
Go in Authentification admin and choose CAS. Next, just play.
Any feedback will be appreciate.
Thanks in advance.
Romuald
We've done a version for 1.5 but this cas module need the modification of login module too. This module have to be change for the 1.5.
The part of your ldap module i use is: .. All.
I've change the function auth_user_login. The other thing i've to change is the 'ldap' code you use by 'cas'.
In the auth_get_users of my 1.4.3+ version, i've done modifications, it could interest you. Fisrt I've clear returned text because i've people with ' in their name like N'GO MA. I've also add an else case to put the name of the attribute in the value if the attribute is not in LDAP. Like this, i can put fixed values in fields. For exemple, i haven't the country information in my LDAP. But i know that every user is french. So i put FX in the coutry attribute in the parameter screen and so, the country field of users take FX value.
foreach ($attrmap as $key=>$value){
if(isset($users[$ldapuser][$value][0])){
$user->$key=$users[$ldapuser][$value][0];
$user->$key = *addslashes(clean_text(stripslashes($user->$key), FORMAT_MOODLE));*
* }else{
//Modif RLR pour import LDAP
$user->$key=$value;
}
* } I hope it could help.
Romuald
I'm using the last build I think. It seem there's a bug. In auth_ldap_connect function:
foreach ($urls as $server){
$url = trim($url);
instead of:
foreach ($urls as $server){
$url = trim($server);
Ok,
Cas explain: Cas is a server for Single Sign On. The server is using an LDAP to do the authentication. When you connect to a 3Cassified" application, next you can go in any other "Cassified" application without login again. In our university we are using U-portal (e-sup version). So you connect to th portal. Next you can go to Moodle from the portal without new authentication phse. That's why i need to modify login Module.
-auth: in fact, my problem is that you use the word ldap in some functions. But for cas module word should be cas so i've to modify the code (in SQL statements for example).
- cas_use_cas. I can desactivate Cas to just use an ldap authentication. To use cas you need a Cas Server wich do the sso. If, for any reason this server is down, i can use directly the ldap. No SSO in this case, but Moodle acces with Moodle authentication .
-cas_create_user. I import users from my LDAP all night with filters. I don't want people, even if they are in the LDAP to connect to Moodle if not in this import. So you can connect to Moodle only if you are already in (by the import).
-The CAS module is in sourceforge. I've change my readme for the 1.5 to refer to it. The adresse is: http://esup-phpcas.sourceforge.net. I prefer to let it separeted. Easier to maintain, just a directory to copy.
Martin,
I've done little refactoring in Cas CVS, i think you can look what i've done and you will see the differences between Cas and LDAP functions ....
Todo:
- Refactoring /login
- Merging Cas and LDAP ?
- Clear the code
- Refactoring of parameters Screen (with LDAP last version)