Thursday, April 16, 2009

Integration between Moodle and MOSS - Part 2

Part 2: Install Moodle

Welcome in part 2 of the article. In part1, I have provided an introduction to the Moodle-MOSS integration. In this part, I would explain the installation and configuration of Moodle.

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

A. Overview
This section describes the steps needed for installing Moodle using the Complete install packages for Windows. This package allows Moodle to be installed, along with the prerequisites that include a web server (Apache), database (MySQL) and scripting language (PHP).

It is important to note that this package is designed for new installations on a standalone computer. For a production environment it is a good practice to perform a manual installation. The reference section contains links to the corresponding installation guides.

Concerning the Moodle version to be used, we have chosen Moodle 1.8, because according to the documentation of the Moodle Integration Solution…
1- MIS works with Moodle 1.7 or 1.8
2- Upcoming releases might also be working with MIS but this can’t be guaranteed.
3- Older versions of Moodle are not supported.

After completing the Moodle installation, we need to configure the LDAP authentication and finally perform some smoke tests to make sure that all configurations have been performed correctly.

 

B. Downloads

  1. Browse http://download.moodle.org/windows/
  2. Click the Download link beside Moodle 1.8.8+.
  3. Save the file MoodleWindowsInstaller-latest-18.zip to a local directory.

 

C. Moodle Installation

  1. Create a folder for hosting the Moodle application. (e.g. called C:\Moodle1.8)
  2. Unpack the content of MoodleWindowsInstaller-latest-18.zip to C:\Moodle1.8.

Note

  • The extract process will create three files ("Start Moodle", "Stop Moodle", and "README") and a subfolder called "server".
  • Do NOT rename the "server" subfolder.
  • There will also be a folder under this server subfolder, called \moodle which holds the Moodle program.
  1. Stop the IIS Admin service (since Apache usually conflicts with IIS).
  2. Start the webserver using C:\Moodle1.8\Start Moodle.exe.

Note

  • If Moodle doesn’t start properly and display the message APACHE and MYSQL are running..., please refer to the Troubleshooting section for tips.
  • Once the Start Moodle.exe program is open, don't close the window for stopping it. Instead, use Stop Moodle.exe for that purpose.
  1. Start your web browser and type http://localhost. The initial install page will be displayed.
  2. Choose your preferred language (English) and click the Next button.

clip_image002

  1. A diagnostic report is displayed. If all the checks give a PASS, then you can click the Next button to continue. Otherwise, you should address some issues.

clip_image004

  1. Specify the Moodle paths, then click the Next button:
    1. Web Address: http://moodle-machine (Assuming that moodle-machine is the name of the machine hosting Moodle)
    2. Data Directory: C:\Moodle1.8\server/moodledata

image

Note

For the sake of better maintenance, it is recommended to use machine names instead of IP addresses during the installation and configuration of Moodle. For instance, when changing the IP of the host machine.

  1. Specify the database configurations, then click the Next button:
    1. Database: moodle
    2. Password: Password1
    3. Tables prefix: mdl_

clip_image008

  1. The install process checks the server it installs and finally displays the server environment screen. If all the checks give an OK, then you can click the Next button to continue. Otherwise, you should address some issues.

clip_image010

  1. On the Download language pack confirmation screen, click the Next button to continue.

clip_image012

  1. A message is displayed confirming the successful configuration of config.php. Click the Continue button to proceed.

clip_image014

  1. The Moodle copyright / license notices are displayed. Click the “Yes” button to continue.

clip_image016

  1. The current release information is shown. Check the unattended operations box. This will automatically advance through many screens. Click the Continue button to proceed.

clip_image018

  1. This process stops with the Admin user profile settings, which need to be filled out. Fill out the required fields and click on the Update profile button to continue.

clip_image020

  1. The next screen is the Front Page settings page. Each field contains a short description explaining what it is used for. Fill the settings as you wish and click on the Save changes button. Note that these settings can be updated later.

clip_image022

  1. This finishes the installation of Moodle. Type http://moodle-machine in your browser and Moodle will open.

clip_image024

D. Version Summary

This section summarizes the versions of the different software included in the Complete install packages for Windows:

  • Moodle Windows Installer: 2008050400
    • Xampp Lite: 1.7.0
    • Apache 2: 2.11
    • PHP: 5.2.8
    • MySQL: 5.1.30
    • Moodle 1.8.8+ (Build: 20090325) (2007021580).

 

E. LDAP Configuration

This section contains the steps needed for configuring the LDAP authentication for Moodle.

PHP LDAP module
  1. Browse http://moodle-machine/admin/phpinfo.php and login as admin.
  2. Search for ldap and make sure that the LDAP Support is enabled.
  3. If not, you can refer to the following page for installing and enabling the PHP LDAP module: http://docs.moodle.org/en/Active_Directory
Active Directory configurations
  1. Connect to the Active Directory server.
  2. Browse Start > Administrative Tools > Active Directory Users and Computers.
  3. Under Users, create a new user for the binding to LDAP with the following data:
    1. First Name: LDAP
    2. Last name: User
    3. Full Name: ldapuser
    4. User logon name: ldapuser
    5. Password: Password
    6. Password Never Expires
  4. Create a new organizational unit to hold all the Moodle users:
    • In the console tree, right-click on domain node.
    • Point to New, and then click Organizational Unit.
    • Type moodleusers as the name of the organizational unit.
    • Add some users to this organizational unit.
  5. Create a new group containing the Teachers:
    • Right-click on the moodleusers node.
    • Point to New, and then click Group.
    • Type Teachers as the group name and click OK.
    • Add a subset of the moodle users to this group.
Getting the DNs for Contexts and Creators

For a proper binding to the LDAP, any object is identified by a so-called Distinguished Name (DN).

In this section, you should specify the DN values for the objects created in the previous section:

  • The LDAP User.
  • The moodleusers organizational unit.
  • The Teachers security group.

Note

The LDAP Browser is a very nice tool for browsing and analyzing LDAP directories easily and effectively.

You can download the LDAP browser from the following URL: http://www.ldapadministrator.com/download.htm

When you try to install the software, it asks you to install the MS Core XML services first, if they are not already installed.

You can download the MS Core XML Services from the following URL: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=993c0bcf-3bcf-4009-be21-27e85e1857b1

Moodle configurations
  1. Login to Moodle as admin.
  2. From the Site Administration box, browse Users > Authentication.
  3. In the table that appears, enable the LDAP Server option by clicking on the closed eye to make it open.
  4. Click on the corresponding Settings link.
  5. Fill the proper values for the LDAP server settings parameters. The following table should help.

Field name

Remarks

Value

LDAP Server Settings

Host URL

Some people have trouble connecting with the “ldap://server-URL” syntax, especially on MS Windows servers. In this case, one can use “server-URL” only.

moss-machine

Version

Unless you are using a really old LDAP server, version 3 is the one you should choose.

3

LDAP Encoding

Specify encoding used by LDAP server. Most probably utf-8.

utf-8

Bind settings

Hide passwords

 

Yes

Distinguished Name

This is the distinguished name of the bind user defined above.

CN=ldapuser, CN=Users, DC=mydomain, DC=com

Password

This is the password of the bind user.

Password1

User lookup settings

User type

 

MS ActiveDirectory

Contexts

The DN of the container where all Moodle users are found.

OU=moodleusers, DC=mydomain, DC=com

Search subcontexts

 

No

Dereference aliases

 

No

User attribute

 

sAMAccountName

Member attribute

This parameter is optional. So unless you need something special, you don't need to fill this in.

 

Member attribute uses dn

This parameter is optional. So unless you need something special, you don't need to fill this in.

 

Object class

This parameter is optional. So unless you need something special, you don't need to fill this in.

 

Force change password

Force change password

 

No

Use standard Change Password Page

 

No

Password Format

 

Plain text

Password change URL

   

LDAP password expiration settings

Expiration

 

No

Expiration warning

 

10

Expiration attribute

   

Grace logins

 

No

Grace login attribute

   

Enable user creation

Create users externally

 

No

Context for new users

   

Course creator

Creators

The DN of the Teachers group.

CN=Teachers, OU=moodleusers, DC=mydomain, DC=com

Cron synchronization script

Removed ext user

 

Keep internal

Data Mapping

First name

 

givenName

Surname

 

sn

Email address

 

mail

Phone 1

This parameter is optional. So unless you need something special, you don't need to fill this in.

 

Phone 2

This parameter is optional. So unless you need something special, you don't need to fill this in.

 

Institution

This parameter is optional. So unless you need something special, you don't need to fill this in.

 

Department

This parameter is optional. So unless you need something special, you don't need to fill this in.

 

Address

This parameter is optional. So unless you need something special, you don't need to fill this in.

 

City/town

 

l

Country

 

c

Description

 

description

ID Number

This parameter is optional. So unless you need something special, you don't need to fill this in.

 

Language

This parameter is optional. So unless you need something special, you don't need to fill this in.

 

Import Users

Run the import users script located under \server\moodle\auth\ldap\auth_ldap_sync_users.php

  1. Open the Command Prompt window
  2. Type in the following command:

C:\Moodle1.8\server\php\php.exe -f C:\Moodle1.8\server\moodle\auth\ldap\auth_ldap_sync_users.php

  1. The result should look similar to this:

PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Moodle1.8\server\php\ext\php_pdf.dll' - The specified module could not be found.
in Unknown on line 0
Configuring temp table
Creating temp table mdl_extuser
Connecting to ldap...
+ 4 users
Got 4 records from LDAP
No updates to be done
User entries to add: 4
Inserted user moodle.student1 id 3
Inserted user moodle.student2 id 4
Inserted user moodle.teacher1 id 5
Inserted user moodle.teacher2 id 6

F. Smoke Tests

  1. Login to Moodle using the admin user and check that the Active Directory users have been imported successfully.
  2. Create some courses.
  3. Assign teachers and students to the different courses.
  4. From the Site Administration block, browse on Front Page > Front Page Settings.
  5. Check the parameter Include a topic section and click the Save changes button.
  6. On the Front Page, click on the Turn editing on button.
  7. You should see a small edit link appear on the left side of the middle column.
  8. Click the edit link and type a welcome message.
  9. Add the Latest News and Online Users blocks.
  10. Add some topics to the Latest News block.
  11. Click the Turn editing off button.

G. Troubleshooting

Error in binding to port 80

When running Start Moodle.exe, you might get an error message that port 80 is already in use and finally the application shuts down.

Perform the following checks:

  1. Is Apache already running?
    1. => No action is needed!
  2. Is the IIS Admin service running?
    1. => Stop it.
  3. Is Skype running?
    1. => Exit Skype or change the port settings in Skype as follows
    2. Browse Tools > Options.
    3. Click the Connection tab.
    4. Uncheck the option: Use port 80 and 443 for incoming connections.
    5. Click Save.
  4. Check for another application which may be using port 80 as follows:
    1. Open the Command Prompt window
    2. Type in the following command: netstat -o -n -a | findstr 0.0:80
    3. The result should look similar to this:

TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 870

    1. The last column is the process ID (or PID)
    2. Open the Task Manager
    3. Go to Processes tab and browse View > Select Columns….
    4. In the Select Process Page Columns dialog, select the checkbox for PID (Process Identifier), and click OK.
    5. Match the PID number returned from the netstat command to identify the application running on port 80

Run Moodle on a port other than port 80

If you need to let Apache listen on another port than 80, you should perform the following steps:

  • Open the file httpd.conf under C:\Moodle1.8\server\apache\conf and change the port from 80 to 8080.
  • Change line 53 as follows: Listen 8080
  • Change line 169 as follows: ServerName localhost:8080

The application does not start

The msvcr71.dll library file is required, in order to run Xampp.
Check if it exists under the following path: C:\Windows\system32.
If you don’t find it, then you should download it and place it in C:\Moodle1.8\server\apache\bin.

 

H. References

Download Standard Moodle Packages
http://download.moodle.org/

Installing Moodle
http://docs.moodle.org/en/Installing_Moodle

Windows installation
http://docs.moodle.org/en/Windows_installation

Complete install packages for Windows
http://docs.moodle.org/en/Complete_install_packages_for_Windows

Installation FAQ
http://docs.moodle.org/en/Installation_FAQ

Installation problems forum
http://moodle.org/mod/forum/view.php?id=28

LDAP authentication
http://docs.moodle.org/en/LDAP_authentication

Active Directory
http://docs.moodle.org/en/Active_Directory

LDAP Properties for CSVDE and VBScript
http://www.computerperformance.co.uk/Logon/LDAP_attributes_active_directory.htm

LDAP Namespace Structure
http://www.informit.com/articles/article.aspx?p=101405&seqNum=7

Front Page Customization in Moodle
http://www.packtpub.com/article/front-page-customization-in-moodle

Integration between Moodle and MOSS - Part 1

Part 1: Introduction to Moodle-MOSS integration

My team has recently integrated Moodle and MOSS using the Moodle web parts hosted on Codeplex. I think this integration would play a key role when developing SharePoint portals for schools and universities.

In this article, I provide a step-by-step guide for installing and configuring the different software packages. The article is divided into four parts:
Part 1: Introduction to Moodle-MOSS integration
Part 2: Install Moodle
Part 3: Install the Moodle Integration Solution
Part 4: Zoom on the Moodle web parts
Part 5: Extension Thoughts

A. What is Moodle?
Moodle is a free and open source e-learning software platform, also known as a Course Management System (CMS), Learning Management System (LMS), or Virtual Learning Environment (VLE). Moodle is designed to help educators create effective online learning sites.

For more details about Moodle, see also...
About Moodle
http://docs.moodle.org/en/About_Moodle

Moodle on Wikipedia
http://docs.moodle.org/en/About_Moodle

Teacher documentation
http://docs.moodle.org/en/Teacher_documentation

Administrator documentation
http://docs.moodle.org/en/Administrator_documentation

Developer documentation
http://docs.moodle.org/en/Development:Developer_documentation

Moodle FAQ
http://docs.moodle.org/en/Category:FAQ

Moodle Tutorials
http://www.moodletutorials.org/

B. Why to integrate Moodle and MOSS?
Simply, to make use of the best of two worlds...

  • Moodle is a powerful education system.
  • MOSS is a powerful portal framework.
  • Mix them together and you have a powerful Education Portal.

C. How to integrate Moodle and MOSS?
This section illustrates the architecture for implementing the solution.

The first diagram represents the technology mapping needed for fulfilling the application servers required to build up the system.

image

The second diagram shows the physical architecture of the solution. For simplicity, we have used two servers: one playing the roles of the Domain Controller and MOSS system and the second playing the role of the Moodle system.

image

Monday, April 13, 2009

Content Editor WP: Add a video to a MOSS site

A. Introduction Today, I would like to present a great role of the Content Editor Web Part, namely I would use it to embed a video on a MOSS site. For this article, I am going to use a very interesting video that I have just watched on TED.

B. Get a video from TED 1. Browse http://www.ted.com/. 2. Search for a video that you would like to share with your colleagues on MOSS. I have chosen Nathan Wolfe: A jungle search for the next pandemic virus. 3. Browse the video and click the Share button.

image 4. Click the Copy button beside the Embed this video field.

image 5. Save the copied text to any temporary text file.

C. Add the video on the MOSS site 1. Browse the MOSS site on which you would like to share the video. 2. Click Site Actions > Edit Page.

image3. Click Add a Web Part, scroll down till you find the Content Editor web part, select it and click the Add button.

image4. Click the Open the tool pane link.

image5. Click the Source Editor button.

image6. Paste the Embedding Code, which you have saved earlier on in a temporary text file. And click the Save button. 7. Unfold the Appearance node and write a descriptive title for the Content Editor Web Part.

image

8. Click the OK button to save the configurations of the Content Editor web part. 9. Click the Exit Edit Mode button on the upper right corner of the page. 10. Now all your colleagues can watch the video whenever they visit this page.

image

D. References Add a YouTube Video to SharePoint 2007 by Lee Reed http://www.endusersharepoint.com/?p=1284