Wednesday, May 6, 2009

Integration between Moodle and MOSS - Part 3

Part 3: Install the Moodle Integration Solution

Welcome in part 3 of the article. In part 1, I have provided an introduction to the Moodle-MOSS integration. In part 2, I explained the installation and configuration of Moodle. And in this part, I would describe the installation and configuration of the different software packages building the Moodle web parts.

The next parts would be: Part 4: Zoom on the Moodle web parts Part 5: Extension Thoughts

A. Overview

This section describes the steps needed for installing the Moodle Integration Solution (MIS). MIS will enable you to access core Moodle data from within your MOSS portal.

MIS consists of several web parts, a web service and a data access layer. The data access layer is responsible for connecting the web service with the underlying database used for storing the Moodle data. The web service provides a SOAP interface accessed by the web parts to retrieve data out of the Moodle system. Furthermore, the web service relies on a Common Internet File System (CIFS)/Server Message Block (SMB) connection for document exchange between the MOSS and Moodle systems.

The installation process starts with some prerequisites, then we proceed to the installation of the MIS package and finally we should perform some smoke tests to make sure that all configurations have been performed correctly.

B. Downloads

  1. Browse http://dev.mysql.com/downloads/connector/odbc/5.1.html
  2. Download the Windows MSI Installer of the MySQL ODBC Connector. And save it to a local directory.
  3. Browse http://www.codeplex.com/Moodle2003WP/Release/ProjectReleases.aspx?ReleaseId=3986
  4. Click the Moodle SharePoint Install to download the Installer.zip file.

C. Prerequisistes

  1. Install and configure MOSS on a different machine (moss-machine) than Moodle (moodle-machine). MOSS should use Active Directory for authentication. For a step-by-step guide, please refer to How to install SharePoint Server 2007 on a single machine in the References section.
  2. Share the following folder on the Moodle machine (moodle-machine): C:\Moodle1.8\server\moodledata. It should be accessible from the MOSS machine for Everyone with Read/Write access.
  3. Allow remote access to the MySQL database as follows:
    1. On the Moodle machine, open the Command Prompt window and follow these commands.
    2. Browse to the folder containing mysql.exe:
    3. Try to connect to the DB using the host machine name:
    4. Connect to the DB using the localhost:
    5. Allow the root to access the DB remotely from any host:
    6. Close the connection:
    7. Try to connect to the DB again using the host machine name:
    8. Close the connection:

D. Installation of MySQL ODBC Connector

Note

- The MySQL ODBC connector is used to access the Moodle database. In a production system, it is recommend to use the MySQL .NET connector instead of the ODBC connector since there are known issues with the MySQL ODBC driver on Windows.

- We tried to use the MySQL 5.1 .NET connector, but the web service failed to work. The web service was checking for Mysql.data.dll version 1.0.8.0, which is not the same version of the dll installed by the.NET connector.

- We haven’t investigated further in this issue and simply used the ODBC connector for the sake of getting the integrated system up and running as a Proof-Of-Concept.

  1. On the MOSS machine, double-click mysql-connector-odbc-5.1.5-win32.msi, in order to start the installation of the MySQL ODBC Connetor.
  1. A Welcome screen is displayed. Click Next to continue.

clip_image002

  1. On the Setup type page, select Typical and click Next.

clip_image004

  1. A summary page gets displayed. Click the Install button, in order to start the installation.

clip_image006

  1. A final page indicates that the wizard has completed. Click the Finish button to exit the installation.

clip_image008

  1. Browse Start > Administrative Tools > Data Sources (ODBC).
  2. On the User DSN tab, click the Add button.
  3. Select MySQL ODBC 5.1 Driver and click the Finish button.
  4. Fill the connection data and click the Test button:
    • Data Source Name: Moodle System
    • Server: moodle-machine
    • Port: 3306
    • User: root
    • Password: Password1

clip_image010

E. Installation of MIS

Note

Based on the Moodle database, you should choose the corresponding installer from the downloaded Installer.zip.

  1. Connect to the MOSS machine.
  2. Unpack Moodle SPS Installation Full ODBC.zip from Installer.zip.
  3. Execute Moodle SPS Installation Full ODBC.msi file.
  4. You will be greeted by a Welcome screen. Click the Next button.

clip_image012

  1. On the License Agreement page, select I Agree and click the Next button.

clip_image014

  1. On the Web Service installation details page, leave the default values and click the Next button.

clip_image016

  1. On the Database Connection Information page, specify the following parameters:
    • ODBC Driver Name: MySQL ODBC 5.1 Driver
    • Database Server Address: moodle-machine
    • Database Server Port: 3306

clip_image018

  1. On the Moodle Database Information page, specify the following parameters:
    • Moodle Database Name: Moodle
    • Database User: root
    • Database Password: Password1
    • Moodle Table Prefix: mdl_

clip_image020

  1. On the Network Information page, specify the following parameters:

clip_image022

  1. At this point the installer has enough information to perform the installation, click the Next button.

clip_image024

  1. A command console window will show the progress of the installation. When it finishes, it will ask you to Press Any Key To Continue.
  1. Press Enter and you would see the final page confirming that the Installation is complete. Click the Close button.

clip_image026

  1. Open Start > Administrative Tools > Internet Information Services (IIS) Manager.
  1. In the tree, browse Web Sites > WebServiceMoodleSPS. Click Permissions.

clip_image028

  1. Click the Add button, write Everyone and click OK.

clip_image030

  1. Select Full Control and click the OK button.

clip_image032

  1. In the tree, browse Web Sites > WebServiceMoodleSPS. Click Properties.

clip_image033

  1. On the ASP.NET tab, select 2.0.50727 for the ASP .NET version then click OK.

clip_image035

  1. Check that the Web Service is running properly by clicking on the WebServiceMoodleSPS node. Then right-click the MoodleWebService.asmx file and finally click Browse.

clip_image037

  1. Click the Execute link and check that a test has run successfully.

clip_image039

F. Version Summary

This section summarizes the versions of the different software packages:

  • MySQL ODBC Connector: 5.1
  • Moodle Integration Solution: 1.5

G. Smoke Tests

  1. Login to MOSS as a site collection administrator.
  2. Create a new subsite for adding the Moodle web parts.
  3. Browse Site Actions > Edit Page.
  4. Click the Add a Web Part button.
  5. Scroll down till you reach the Moodle web parts.

clip_image041

  1. Select the web parts that you wish to add to the page and click the Add button.
  2. Click the Exit Edit Mode at the top right corner of the page and view the web parts that you have just added.

clip_image043

H. Troubleshooting

The Moodle web parts display an error about an Unhandled Exception

When you browse the MOSS page hosting the Moodle web parts, the web parts display an error message about an unhandled exception.

There are several sources for this error. This section contains a list of checks that might be helpful for identifying the source of the problem:

  1. Modify the properties of any of the web parts throwing the exception. Under the Miscellaneous node, select Show Debug info. Click OK. Check the displayed debug info. This might give you a hint about the problem.
  2. Check that the Moodle system is running properly by logging to it.
  3. Check that the MySQL database is configured for remote access. (See section “C. Prerequisistes”)
  4. Check that MySQL ODBC connector is working properly. (See section “D. Installation of MySQL ODBC Connector”)
  5. Check that the Web Service is configured correctly and is running properly. (See section “E. Installation of MIS”)

I. References

How to install SharePoint Server 2007 on a single machine http://blogs.msdn.com/martinkearn/archive/2007/03/28/how-to-install-sharepoint-server-2007-on-a-single-machine.aspx

MySQL downloads http://dev.mysql.com/downloads/

SharePoint Web Parts for Moodle http://www.codeplex.com/Moodle2003WP

SharePoint-Moodle Unified (MSU) Project http://msu.codeplex.com/

SharePoint Moodle Web Parts http://www.sharepointblogs.com/ajp/archive/2009/02/16/sharepoint-moodle-web-parts.aspx