I am experimenting with Moodle as a backend to Drupal for course management, but I've run into two limitations and I wonder if anyone is able to offer solutions...

1) The drupal_moodle module was written a long time ago for Drupal 4.5 and has yet to be upgraded by the maintainer. I tried to upgrade it and got the forms API changes to work, but ultimately I don't know what I'm doing and the module still doesn't seem to fully work...it's permission system doesn't work in 4.7 and I keep getting a "string offset as array" error common to many 4.7 module upgrades. Anyone think they are up for upgrading this...it's a tiny bit of code for someone that knows what they are doing. The module can be found here.

2) From what I can tell, this module doesn't actually facilitate single user login, and it puts moodle into an I-Frame inside Drupal. This all seems rather Hokey. Anyone know of more seamlessly integrated solutions?

On the positive site, Moodle has amazing functionality and flexibility with respect to database integration. I've got it authenticating from my Drupal users table!

Comments

bonobo’s picture

What specific functionality are you looking to combine? What functionality do you want on the Drupal side, and what functionality do you want from the Moodle side?

The goals of the site will help determine the best approach to the integration -- ie, do you just want to share users, or users and content, or some combination of users and content and files (particularly if you're using the latest version of Moodle, that comes with podcasts enabled)?

Cheers,

Bill

-------
http://www.funnymonkey.com
Tools for Teachers

Andrupal’s picture

1) Ultimately I'd like to use our existing student programming database tables to automatically create and manage a shared Drupal/Moodle user base. (I want Drupal to be the front end for the purposes of whole-community communication and to use its flexibility to run database queries, search student schedules, and for teacher contact tools...these I've already built.)

2) I'd like the backend Moodle courses to automatically populate from an external table that contains student ID info and course sections. From what I can tell, the latest version of Moodle can do this. I just need a table with the right fields and a way to share the same session, somehow.

3) After Drupal sign in, I don't want them to have to login again or "join" classes or import class lists, because this kind of habit change just won't happen in my lifetime. I want logged in teachers and students to be able to easily link from Drupal to their Moodle course pages, where they can use gradebooks, post homework, run forum discussions and course blogs, add resources, and easily contact all students in their classes.

For now, I just want to try the Drupal-Moodle integration module with 4.7 so I can see what it does and perhaps modify it. Any interest in helping with the upgrade?

bonobo’s picture

Sorry about the slow reply -- I've been slammed with other things the last couple days --

RE 1: I'd probably recommend incorporating this functionality into separate modules -- this way, you could compartmentalize the functionality, and separate the course management/usermanagement functions from the community functions. Another option for this would be to use Elgg for the learner community/school intranet (check elgg.net for details of the Elgg/Moodle integration) and use a Drupal site as the front end for your course management -- this has the added advantage of separating users/sites by job -- not every user will need access to manage users, while most users will be part of your learning community -- separate sites simplifies security.

RE 2: I'd need to look at the Moodle db structure to give you anything useful here -- I haven't had the time since I saw your post -- sorry.

RE 3: SSO via OpenID. Content sharing/linking via Elgg/Moodle integration, or between Drupal and Moodle via imported rss feeds.

RE helping to upgrade the drupal/moodle module? It's something worth talking about, but, really, I think the iframe approach (to quote someone whose opinion I trust) "seems rather Hokey." :)

I'm working on something that's a little more seamless -- feel free to contact me off-forum, as it sounds like we're working on the same issues.

Cheers,

Bill

-------
http://www.funnymonkey.com
Tools for Teachers

simillibus’s picture

Am wondering if any progress has been made on the integration script in Drupal 4.7.x version?

re the iframe - the moodle/postnuke and moodle/mambo integration scripts (both at http://download.moodle.org/modules/integrations.php) offer the option of iframe v/s new window. Might provide a jumping off place for modifying the moodle-drupal code.

thanks -
Will

mbria’s picture

I don't want to start here a discussion about the goodness and the badness of the iframes, but I wanted to point that IMHO would be better a real DB integration instead of an iframe.

Any case, I recognize an iframe is a good start.

Cheers,

m.

Visigotik’s picture

To get the module working with drupal 4.7 edit moodle.module and replace function moodle_settings with:

/**
 * Implementation of hook_settings
 */
function moodle_settings() {
  $form['moodle_dir'] = array (
    '#type' => 'textfield',
    '#title' => t('Location of Moodle'),
    '#description' => t('Path to your Moodle directory. Please include a trailing slash ("/").'),
    '#default_value' => variable_get('moodle_dir', 'moodle/'),
    '#size' => 64,
    '#maxlength' => 64,   	
  );
  $form['moodle_error_mode'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Error logging'),
    '#default_value' =>  variable_get('moodle_error_mode', array(1)),
    '#options' => array(1 => t('Watchdog'), 2 => t('Output to the browser'))
  );
  return $form;
}

Hope this helps.

ulyx451’s picture

Vary tanks Visigotik now the module work but when I am connected to the page of moodle this does not come loaded, but it comes recharged the page that it does not found. The path is correct, moodle work very good in your directory, what mistake?

syedasad’s picture

Cas Nuy updated drupal the Drupal / Moodle integration module to work with 4.7.

More info at http://drupal.org/node/80982