CMS integrations: Moodle 1.8.3/Drupal 5.6 Integration - Successfull

CMS integrations: Moodle 1.8.3/Drupal 5.6 Integration - Successfull

ved Leang Chumsoben -
Antal besvarelser: 26
Hello all,

I just would like to share that, I have successfully integrate Moodle 1.8.3 into Drupal 5.6. Thank to the information on this Wiki's page (even it's not so detailwink).

For those who are not yet clear about the final result of the integration (like me at the first time), you can see my testing screenshot here.

And would it be OK to edit the version of Moodle and Drupal in that Wiki's page?

Cheer from Cambodia,
Soben
Gennemsnitsbedømmelse: -
I svar til Leang Chumsoben

Re: CMS integrations: Moodle 1.8.3/Drupal 5.6 Integration - Successfull

ved OBIOMA ANYANWU -
Hi,

I'm excited to see your post. I also believe that there are so many of us out there who would be glad to see it to.

I'm not sure about editing the wiki page, but I am sure that you can post the details in this forum and many will be more than glad to make use of it.

I'm also anxiously waiting for the details myself. I've been working on this integration all week long and almost no success. I even had to install phpedu as an alternative, but with no success. Kindly be of assistance.

Waiting to hear from you soon. Cheers.
I svar til OBIOMA ANYANWU

Re: CMS integrations: Moodle 1.8.3/Drupal 5.6 Integration - Successfull

ved Leang Chumsoben -
Hi,

I'm so glad to see that other people find this post useful and I'm happy to post all the details as following:

  • Download the Moodle module for Drupal from here (as mentioned on the wiki)
  • Extract and put moodle.module and moodle.info in /modules/ folder of Drupal.
  • Put index_dr.php to the root of Moodle directory (I forgot to mention that we need a working Moodle installation). Then follow the instruction in the install.txt of drupal_moodle module.
  • Now on Moodle site, set the Authentication method to External Database, and fill in the credentials from Drupal database:
    • auth_dbname => Database name of the Drupal database
    • auth_dbuser => Database user you used when setting up Drupal
    • auth_dbpass => Database password you used when setting up Drupal
    • auth_dbtable => Usertable from Drupal , most likely 'users'
    • auth_dbfielduser => Thefieldname containing the username most likley 'name'
    • auth_dbfieldpass => Thefieldname containing the password most likley 'pass'
    • Keep the password format to PLAIN
external_db_authentication

  • Now on Drupal site:
    • initialize & activate the Moodle module (Site Building > Modules)
    • Set the path to the moodle directory containing a final forward slash, so something like "/moodle/". Just go to Site Configuration > Moodle Module. In my case, the path is "../moodle/" as I have Drupal (http://localhost/drupal) and Moodle (http://localhost/moodle) installed on the same level on Webserver.
    • You may also need to grant the "authenticated user" role the permission to access the Moodle Module (User Management > Access control), otherwise only Admin can access it.
  • You can now login to Drupal and access the Moodle link. Your Drupal's user account should be login to Moodle automatically.
Ok, these are what I did. Hope it will be helpful.big grin

Have a nice weekend.
Soben
I svar til Leang Chumsoben

Re: CMS integrations: Moodle 1.8.3/Drupal 5.6 Integration - Successfull

ved Walter Garcia-Fontes -
It hasn't worked out for me. I installed Moodle 1.8.4 successfully and have a running Drupal 5.6 installation. Drupal sites in a subdir for itself (that is http://myserver/drupal) and moodle on a dir there (http://myserver/drupal/moodle).
My only doubt with the instructions was if index_dr.php had to be renamed to index.php, but browsing the module I pressume it has to be left as is.
I activated the module in Drupal and put index_dr.php in the moodle dir. I set up the module to
/moodle/
as I understand that this is relative to the drupal installation, and if moolde is a subdir within the drupal root it should be like that (I also tried "moodle/" without the first slash but it didn't work).
But when I click on the "moodle" link in drupal I'm carried to the moodle screen but the user is not logged in.

I svar til Leang Chumsoben

Re: CMS integrations: Moodle 1.8.3/Drupal 5.6 Integration - Successfull

ved Klaus Brune -
Just thought I'd pass along some extra info for anyone who might need it...

I've gotten this to work successfully...
  1. Only when the Moodle installation is a subfolder of the Drupal installation.
  2. The password format is MD5, not Plain text.
  3. There is an extra field not shown in the form above... Drupal's user table stores the email address in a field called mail
Specifically, the folders would be something like...

Drupal: example.com
Moodle: example.com/classrooms

Some room for more work definitely exists. And numerous questions are raised...
  1. How exactly does Moodle interact with the external database? Is it read-only?
  2. How are blocked/deactivated users handled? There seems to be no code in place for that.
  3. Drupal has a provision for creating profiles with extended data, and that would seem to be the idea place to enter the extra information that Moodle wants, such as address, phone, additional contact info, etc. The trouble is, Drupal stores these in yet another two tables dedicated to profile info. Warning - Techno-Speak imminent - it seems to me the way to do this, assuming the availability of a more recent version of MySQL, would be to create a VIEW that combines the information from the profile tables and user tables, and then present that to Moodle. Of course, that only works if the information is indeed one-way. See Item 1 above.
  4. Logging into Moodle via the external account information seems to be even more laborious for our potential student than simply creating a new Moodle account... the username and password are accepted, but we're immediately routed to the user profile, and quite a few more fields are "required" right up front compared to the email-based registration.
And on a different Drupal-related note, I would dearly LOVE to syncrhonize the course enrollments with Drupal's eCommerce add-in module and let it take care of all the transactions, course catalogs, etc. Then we'd get great features like affiliate tracking, bundled courses, discounts, coupons, etc.
I svar til Klaus Brune

Re: CMS integrations: Moodle 1.8.3/Drupal 5.6 Integration - Successfull

ved Walter Garcia-Fontes -
I have also to add that I finally made it work. I'm using it also as Klaus is suggesting, moodle lives in a subfolder of the drupal root. I had also a couple of comments:

1) I'm not able to pull out the profile information out of the drupal "users" table. I tried to fill some of the fields of the user's profile with username and email, just to simplify the entrance, and I guess the user would improve the profile later as he/she notices that it is not completily right.

2) It is better to call the moodle subfolder something different than "moodle", for instance you can call it "courses" (and of course adjust moodle settings accordingly). This has the advantage that links to your moodle from drupal will not mess up with the actual moodle, I mean http://www.example.com/moodle will point to the module and not to your actual site.

3) I find that to avoid confusions to the users, the logout from moodle should take you back to your drupal site or something neutral, and not to the moodle login screen. This is easily accomplished by changing login/logout.php within the moodle installation, at the beginning of this file I simply changed the redirection after logging out:

// can be overriden by auth plugins
// $redirect = $CFG->wwwroot.'/';

$redirect = '../logout.html';

where logout.html is a file in my moodle root that says something like "Thank you for using my Courses site, come back soon" and links to my drupal site if users want to go back there.

4) Clicks on your "moodle site's name" take users out of the drupal iframe, but this is not bad as they would like also to go out I guess if they are mainly working within moodle and not within drupal.

Overall it is perfectly usable, at least for a community site like mine, probably not for a production site.

I svar til Walter Garcia-Fontes

回應: Re: Moodle 1.8.3/Drupal 5.6 Integration - Successfull

ved Chiu Charlie -
I saw this thread and gave it a try on Moodle 1.9 and drupal 5.7. It woks fine with some variations.

1. I have to set in moodle's password using plain text (MD5 not working.)
2. When login to drupal and click Moodle module, it login the user set to auth. by External Database user. It works great.
3. The downsize is when logout from Drupal, Moodle's session still on (not terminated). I manual typed the moodle's URL and saw the user still in.

So any idea?

Chad
I svar til Chiu Charlie

Re: 回應: Re: Moodle 1.8.3/Drupal 5.6 Integration - Successfull

ved Aaron Friedman -
Chad,
I've been searching for this drupal_moodle.zip. I would like to try to install this in drupal, but moodle has taken down the file. If you still have this zip file and you are able, could you please send me a copy at afriedman111@gmail.com?
I would greatly appreciate it.

I svar til Klaus Brune

Re: Moodle 1.9/Drupal 6.x Integration - Successfull

ved Giridhar S -
Hello sir,,i have just integrated moodle and drupal for single authentication using external database option with quick api plugins and drupal moodle module, but when i click the link of moodle inside drupal it takes me to moodle without login,,i have to login manually using drupals username and password to moodle once again,
i need this to happen automatically.
plz explain me
I svar til Leang Chumsoben

Re: CMS integrations: Moodle 1.8.3/Drupal 5.6 Integration - Successfull

ved Paul Fu Jr -
Thank you for these instructions. Has anyone gotten moodle.module to work with Drupal 6.2?

Paul
I svar til Leang Chumsoben

Re: CMS integrations: Moodle 1.8.3/Drupal 5.6 Integration - Successfull

ved Lexmi Durga -
Hi Friend,

I found out some problem to follow your instruction


first 1: version problem, so i have changed your moodle.info like this

; $Id: openid_provider.info,v 1.4 2008/09/07 03:39:57 walkah Exp $
name = Moodle
description = "Limited iframe and SSO integration with Moodle."
core = 6.x

; Information added by drupal.org packaging script on 2008-08-19
version = "6.x-1.x-dev"
core = "6.x"
project = "moodle"
datestamp = "1220789337"


Second 1: warning: Missing argument 1 for moodle_menu() in /opt/lampp/htdocs/project/drupal/sites/all/modules/moodle/moodle.module on line 17

i have changed your function of function moodle_menu($may_cache)
like this

function moodle_menu() {
global $user;
$items = array();
$access = user_access('access moodle');


$items[] = array(
'path' => 'admin/settings/moodle',
'title' => t('Moodle module'),
'description' => t('Allows users to SSO in moodle.'),
'callback' => 'drupal_get_form',
'callback arguments' => 'moodle_settings',
'access' => user_access('administer site configuration'),
);
$items[] = array( 'path' => 'moodle',
'title' => t('Moodle'),
'callback' => 'moodle_page',
'access' => $access,
'type' => MENU_CALLBACK);
$items[] = array(
'path' => 'moodle',
'title' => t('Moodle'),
'callback' => 'moodle_page',
'access' => $access,
'type' => MENU_NORMAL_ITEM);


return $items;
}


these two problem was solved

but

i can't follow your last two instruction

such as

  • Set the path to the moodle directory containing a final forward slash, so something like "/moodle/". Just go to Site Configuration > Moodle Module. In my case, the path is "../moodle/" as I have Drupal (http://localhost/drupal) and Moodle (http://localhost/moodle) installed on the same level on Webserver.
  • You may also need to grant the "authenticated user" role the permission to access the Moodle Module (User Management > Access control), otherwise only Admin can access it.


what i want to do? Please help me

my requirement is single login for drupal and moodle except open id

thanks

I svar til Lexmi Durga

Re: CMS integrations: Moodle 1.8.3/Drupal 5.6 Integration - Successfull

ved Robert Allerstorfer -
I'm not happy with Drupal's "moodle" module, so i wrote my own code that provides an easy and convenient way to switch from Drupal (tested with 6.9) to Moodle (tested with 1.9.4+) when logged in in Drupal. Works with all kinds of Moodle's authentication methods.

If someone is interested, i can explain how it works.
I svar til Robert Allerstorfer

Re: CMS integrations: Moodle 1.8.3/Drupal 5.6 Integration - Successfull

ved Jason Askegreen -
Please explain and provide download of new code if you can.

Thanks
I svar til Jason Askegreen

Re: CMS integrations: Moodle 1.8.3/Drupal 5.6 Integration - Successfull

ved Robert Allerstorfer -
Jason,

I created a separate thread "Moodle Block for Drupal 6.x" to show how it works.

I svar til Robert Allerstorfer

Re: CMS integrations: Moodle 1.8.3/Drupal 5.6 Integration - Successfull

ved José Álvarez Huete -
My dear friend:

could you show us the code? a link to download

Thanks in advance
I svar til José Álvarez Huete

Re: CMS integrations: Moodle 1.8.3/Drupal 5.6 Integration - Successfull

ved Robert Allerstorfer -
Hi José,

since my code does *not* work with Moodle 1.8.3 (as this thread's title would suppose), I posted the new stuff onto a separate thread with the proper title. So please post questions/comments regarding to my Drupal -> Moodle SSO solution to the proper thread.

Thank you.
I svar til Leang Chumsoben

Moodle 1.8.3/Drupal 6.1 not successid

ved Giridhar S -
Hello sir,

i got stucked with some problem that i need quick api plugin,, so plz tell me where can i download it,,

i have been updated the module for drupal 6.10, its working,,but the problem is quick api plugin..

pzl provide valid link,,,






I svar til Leang Chumsoben

Re: CMS integrations: Moodle 1.8.3/Drupal 5.6 Integration - Successfull

ved Rambabu Dola -
I am using drupal 6.10 and moodle 1.9 , with the steps mentioned above, but i haven't loggedin through drupal.
I svar til OBIOMA ANYANWU

Re: CMS integrations: Moodle 1.8.3/Drupal 5.6 Integration - Successfull

ved Shyamala Rajaram -

Has anyone tried Moodle Single Signon module? I am trying to integrate moodle 1.8 and Drupal 5.7. From what I gather in this Forum we could use the moodle.zip file provided and do the same. Will try it out. The Moodle SIngle Sigon sounds exciting, provides session integration as well. Installed it on the Drupal side, but unable to figure out what has to be done to complete the integration in the moodle side.



Shyamala

I svar til Shyamala Rajaram

Re: CMS integrations: Moodle 1.8.3/Drupal 5.6 Integration - Successfull

ved Robert Krüger -

Hello everybody.

I have a few questions?
As I've heard moodle will also connect to the drupal database for the authentification. So therefore moodle needs to know the username and the password. How is this arranged?
Is it a forward from drupal by post request (it seems so in the index_dr.php)? If so, isn't it a security risk?

What else are the features, supported by integration moodle in drupal?
Can I administer courses and content? Is there a seperate admin interface?

Thank you!
Robert

I svar til Robert Krüger

Re: CMS integrations: Moodle 1.8.3/Drupal 5.6 Integration - Successfull

ved Walter Garcia-Fontes -
For your first question I don't know how it works exactly, but moodle can query an external database for username and password, and the moodle module allows to pass the drupal authentification to moodle.

To your second question, if I understand correctly if you dissallow direct logins to moodle only people who got authentificated in drupal will be able to login with their accounts into moodle, so I don't see any other risks as non trusted users logging into moodle with student privileges. You could control this allowing only trusted drupal users to see the moodle connection. Do you think there is any other risk? In my setup I dissallowed direct logins to moodle.

I don't know of any other features of the moodle module or special adminitration of moodle within drupal, I administer moodle directly in moodle and the module is only to single sign on.
I svar til Leang Chumsoben

Re: CMS integrations: Moodle 1.8.3/Drupal 5.6 Integration - Successfull

ved Mike Finney -
This looks really neat... am I right in assuming that it requires Drupal to be the primary database... or can Moodle be the primary? Or will it work whether the person creates an account on either?

Thanks

Mike
I svar til Leang Chumsoben

Re: CMS integrations: Moodle 1.8.3/Drupal 5.6 Integration - Successfull

ved web dzinez -
The file in the integrations page is missing.

I get this error message:

Sorry, but the file you are looking for was not found! (http://download.moodle.org/modules/drupal_moodle.zip)

Please help!
I svar til web dzinez

Re: CMS integrations: Moodle 1.8.3/Drupal 5.6 Integration - Successfull

ved Martin Dunschen -
The module that integrates moodle into drupal is now available from drupal.org, follow this link
http://drupal.org/project/moodle

I've managed to integrate moodle 1.9.3 into drupal 6.9 using the development module, download from the link above.

The installation instructions are to be found in INSTALL.txt, included in the archive.




I svar til Leang Chumsoben

Re: CMS integrations: Moodle 1.8.3/Drupal 5.6 Integration - Successfull

ved umesh chavan -
hi ,

i have been using moodle for my institute for last one yr...now i feel to integrate drupal to moodle...is it possible?

according to you first drupal must be installed and then download drupal_moodle and configure.

in my case moodle is already configured. hoe to attach drupal...?


umesh