Host Moodle 2 in Windows Azure


Over the past few weeks Microsoft have released the code to implement Moodle and Moodle 2 on Windows Azure saving you the cost of hardware, redundancy and data protection.


Using Windows Azure to host the website and SQL Azure for the database you now have another reason to move to the cloud and keep saving on it.

You can download the instructions on how to do is from Codeplex.


Moodle 2:

Note: These are in beta and should be treat as beta.  Ensure you read all the documentation on how it works before making a decision on implementing it as a beta and production.

Install Moodle 2 on Windows Server 2008 R2, PHP, IIS, MySQL


In recent months the next version of Moodle has been beta released to the general public on the Moodle website.   Moodle is an open source product and a new update to the currently 1.0 is always available.  There is almost a weekly update that a school can implement with a new feature.

A team who run the Moodle website have been working on the new 2.0 version of the product.  This is currently in Release Candidate 1 and does not have all the features for back end services.  One of these is the ability to use a Microsoft SQL Server.

Since April 2010 I have released 3 different whitepapers on how to implement Moodle on Windows Server 2008 both x86 and x64 and also building a high availability Moodle install on a Windows environment.

Now a release of Moodle 2 is available, I have write a step by step guide on how to implement Moodle 2 on a Windows Server 2008 R2, IIS, PHP, MySQL.

You can download it from here.


Integrating SharePoint and Moodle: But Why….?


I got a tweet from @moodlenews asking why would I want the documents I have in Moodle stored in a SharePoint document library.  Well it’s a very good question so I thought the fourth and final post on Integrating SharePoint and Moodle would be why we want to do this.

Edit the File

Once you have uploaded your file into Moodle the file is stored in a folder on the Moodle server.  This is great but it doesn’t allow you to edit the file.  By storing the file in a SharePoint document library you can easily find the file, change it and not have to worry about re-uploading the file again.


SharePoint allows you to keep versions of the document you are editing.  Over the academic years you may change the file several times, add and delete content but one day you’ll want to go back and view something you deleted.  SharePoint will allow you to revert back or just browse previous version.


If you are working as a team on a set of files for a module you can now upload them in Moodle and work together with them on SharePoint, tracking each others changes.


As the files are now being stored in SharePoint, SharePoint will search/crawl the files for the file name and content inside the document.  Using SharePoint as your central place to search you all your academic resources is a great learning tool for the learner to find what they are looking for.

Office Web Apps

Microsoft have been working hard on their Office Web Applications available for Word, Excel, PowerPoint and OneNote.  SharePoint 2010 also allows documents to be opened in the browser using the web apps.  The teacher can now open the document they want to change in the browser and simply make their quick change and save it back to the site with out having to upload and download again.



All these are great but you wouldn’t want your students to see the changes to document they are using in a course while you making changes.  You can check the files out to make changes, make changes over a few minutes, hours, months but until you check the file back in the users will see the original file you want them to see until you are ready to release those changes.

SharePoint 2010 Workspaces

SharePoint Workspaces allows you to download a document library and make changes from a machine that doesn’t have access to that SharePoint site at the time.  In other words you can now make changes to your Moodle course documents with out needing an internet connection.



If you have a process for releasing learning resources to students, you can take advantage of the approval process in SharePoint that will allow another colleague to check the files before you release them to all students.

View the how to guides on Integrating Moodle and SharePoint: Storing Moodle Documents in SharePoint Document Libraries

Integrating SharePoint and Moodle: Storing Moodle Docs in SharePoint: Part 1
Integrating SharePoint and Moodle: Storing Moodle Docs in SharePoint: Part 2
Integrating SharePoint and Moodle: Storing Moodle Docs in SharePoint: Part 3

Integrating SharePoint and Moodle: Storing Moodle Docs in SharePoint: Part 3


This blog post is part 1 of a series of 3 on how to integrate SharePoint and Moodle better.

Part 1: How to part 1
Part 2: How to part 2
Part 3: Recommended Changes (this post)



You if now navigate to the Document Library we created earlier in Internet Explorer you will see that there are folders in there.  This is where you documents will now be uploaded.



Moodle Cache

By default Moodle stores all its caching in the Moodle data location, so having completed this process you will find that a file is allows being written to as users logging onto the Moodle website.  Moodle can also write this cache into the Moodle database.  We are going to move the load off the SharePoint server and on top the database

To make this change log on to Moodle with an administrative user.  Using the navigation down the left hand side click on Server and then Session Handling.


When the page has loaded check ‘Use database for session information’.



In most of my Moodle implementation I have found that images don’t load properly when they have been uploaded through the Moodle document upload process.  If I’m honest, I don’t know why this is but here is how to fix it.

Log onto Moodle with an administrative user.   Using the navigation down the left hand side click on Server and then HTTP.


When the page has loaded uncheck ‘Use slash arguments’.


Remove Folders

One of the views in SharePoint is the ability to show folders.  This can help the user not to look through the strange folder structure the Moodle creates itself.  e.g. folders are called with a numeric number.

To create a new view that doesn’t have folder, open the document library in SharePoint 2010 and click on Modify this View.


Toward the bottom of the page, expand Folders and then check Show All Item without folders.


You document library should now look like this.


Integrating SharePoint and Moodle: Storing Moodle Docs in SharePoint: Part 2


This blog post is part 1 of a series of 3 on how to integrate SharePoint and Moodle better.

Part 1: How to part 1
Part 2: How to part 2 (this post)
Part 3: Recommended Changes

Enable Feature

For the Moodle OS to open a WebDAV enabled folder, the Desktop Experience Feature must be enabled.  Do this by adding this feature.


Changes required to Moodle PHP files

I have copied the next step from the Integrating Moodle and SharePoint Better document produced by Microsoft which talks about how to integrate the product better should you be running it on a Windows Server using Apache.

Changes to Moodle PHP Files
There are two changes to make to Moodle PHP files. First, it’s important to prevent Moodle from
creating an administrative file called .htaccess that is not a valid SharePoint file. This file prevents
unauthorized access to the Moodle dataroot folder. Because we will use SharePoint Server to store
files, we will also use SharePoint’s authentication system, and thus can safely prevent the .htaccess
file from being created.
Second, we need to add our own file upload function. This function supports versioning by
preventing Moodle from simply overwriting old files when it uploads files to SharePoint.
Important If a PHP accelerator is present, it may be necessary to either temporarily turn off
the PHP accelerator, or force a purge of the accelerator’s cache, for the changes you make
to take effect. Procedures for temporarily disabling a PHP accelerator and for cache purging
vary by accelerator.
Prevent Moodle from creating an .htaccess file
1. Open the Moodle file setuplib.php from within server/moodle/lib.
2. Search for .htaccess, then comment out the following code:

Note An alternative to editing the setuplib.php file is to create a SharePoint event handler

that intercepts the file create event and handles it appropriately.

Changes to config.php

Navigate to the root of your Moodle website through Windows Explorer.  Normally this would be c:inetpubwwwroot

Open config.php with notepad and search for docroot and change this location to the same URL we saved during the creation of the document library in SharePoint.  At the moment there are only 2 backlashes for the location.  You need to make this 3.

Navigate to c:inetpubwwwroot and open the file config.php in notepad.

Within the file search for $CFG->dataroot. Change this to sp2010sitesmoodlemoodledocs. Note that this is three backslashes.


Click to go to part 3 and recommendation of integrating Moodle and SharePoint

Integrating SharePoint and Moodle: Storing Moodle Docs in SharePoint: Part 1


Over the years the last year I have had many conversation on how to make SharePoint and Moodle better together and in recent posts I have how to install Moodle on a 32bit and how to install Moodle on 64bit operating systems.

In the current version of Moodle any documents, assignments or images are stored in a folder on the local server.  But why can’t we store these files in a SharePoint Document Library so any changes to these documents can be done easily with version controlling or using office web app.  Documents can also be searched and index allowing teachers and students to easily find resource they want.

Back in April Microsoft released a white on how to bring SharePoint and Moodle better together but this only if you are going to run the Moodle website using Apache.   On the page there are a few comments and unanswered questions on how to integrate Moodle running on IIS with SharePoint 2010.

Following the 3 whitepapers on implementing Moodle on 3 different types of Microsoft environments, I thought I would add how to do this through IIS and changing the same code as Microsoft have recommended for it to work.  The following instruction assume you have setup Moodle with IIS as per the whitepapers above.

This blog post is part 1 of a series of 3 on how to integrate SharePoint and Moodle better.

Part 1: How to part 1 (this post)
Part 2: How to part 2
Part 3: Recommended Changes

Accounts Required

SharePoint uses Active Directory to authenticate its users.  For Moodle to write documents to a SharePoint library it will require write access to that document library.  To do this create a Active Directory user called md_admin.  This user will be required to run the IIS website as well authenticated with SharePoint.

Create a new Active Directory user called md_admin.  This user will be required to run the IIS website and will also need permission to the SharePoint document library

SharePoint Configuration

Navigate to the location of where you want your Moodle documents to be stored in SharePoint.  Click on Site Actions and then on New Document Library.  Call your library MoodleDocs or something to your pleasing.  You need to make sure the md_admin user account has write access to this library to ensure the whole process works.

The upload process will move files through the upload process in Moodle to SharePoint through WebDav.  To find out the webdav URL of your site click on the Windows Explorer from the SharePoint Ribbon.


Copy the path of the folder location eg. sp2010sitesmoodlemoodledocs


Later in the process we will be editing some of the Moodle PHP files and will need this URL.

Permissions to Moodle Root

The website will soon be changed for the md_admin user to run the web service but we also need to make sure the user has read permission of the Moodle PHP files.

Navigate to c:inetpub and right click on wwwroot and select properties

Select the Security tab and add the user md_admin with read permissions.


Changes to IIS

As mentioned in the previous step we need to change the web service that runs the website.  This username will connect to SharePoint to upload the files, hence why you will need to use the md_admin username.

Open Internet Information Services Manager and expand the left navigation until you see default website.  Select the default website.  Using the right panel select Authentication which is in the IIS group


You will notice that Anonymous Authentication is Enabled.  Click Edit… in the Actions panel.


Click Set to change the anonymous user identity.


Fill in the details of the domain username you created earlier (md_admin).  You will need to put your domain name before this (domainmd_admin).

Click to go to part 2 of Integrating Moodle and SharePoint
Click to go to part 3 and recommendations of Integrating SharePoint and Moodle

Integrating SharePoint and Moodle: Moodle Webparts for SharePoint 2007


As a school we have decided to evaluate Moodle for a VLE for our school.  The main reasons we have done this is because of the course builder with built in quizs and SCORM builders.


I have to say they are very well built.  They are not page viewers like some companies make for their SharePoint webparts but these are written to look at the Moodle database and give you the information presented in a proper ASP webpart.  I’m very pleased to see this happen.

What caught my eye straight away and credit to the writer of this is the office presence by the names of the course.  One of the web parts is the moodle courses which lists all the available course and as you can see it (screen shot below) has the teachers name and then the office presence.  I think it is a shame that in Moodle itself doesn’t show this – because if the pupil was accessing the course, doing some work and they had an issue they could see the teacher straight away and ask them any questions.


In this post I’m going to mainly list the webparts with a screen shot – I’ve already started on another post to do with the install of them and I will also do a post on how to publish Moodle, SharePoint and the Moodle WebApps from the same URL through ISA.

Moodle: Welcome

Moodle messages is the built in online chat available in moodle.  Here you can see the message someone has sent you while you were away – the text they sent is ‘testing’

Moodle: Courses

In the Filter Option in this webpart you can select from My Course, Upcoming Courses and All Available Courses

Moodle: Online Users

Again this is more powerful in SharePoint than in Moodle as you can see their Office Presence as well.

Moodle: My Assignment

Moodle: Document Exchange

I do like this web part.  On the left you have your Moodle course, on the right hand side you have your SharePoint Document library.  This web part will allow you to transfer documents between both products.

There are some other webparts but they are very similar, depending on the user.

Here is the full list of the X Moodle WebParts

  • Moodle: Courses
  • Moodle: Document Exchange
  • Moodle: Messages
  • Moodle: My Assignment
  • Moodle: My Courses
  • Moodle: My Supervisied Assignements
  • Moodle: My Teaching Courses
  • Moodle: News and Announcements
  • Moodle: Online Colleagues
  • Moodle: Online Students
  • Moodle: Online Users
  • Moodle: Welcome

In the next few weeks I’ll do a post on how to install moodle and the webparts on a Windows System with SQL Server and also another post which I have been asked to do on how to publish it all through ISA on a single URL.

Implementing Moodle 1.9 on a Microsoft Highly Available Environment


In this whitepaper you will be instructed on how to install a Microsoft SQL Server 2008 R2 Cluster, 2 Web Front End Servers running Moodle 1.9 which are network load balanced and the configuration to run Moodle from a remote storage area.

Following the 2 other whitepapers released back in April, I have written another based on how to install Moodle 1.9 on a Microsoft High Available Environment using Microsoft Cluster and load balancing services.

Microsoft have a set of products that are designed to stay online for the maximum amount of time they can by either having a standby servers or sharing the load with another server.

Microsoft Clustering allows for 1 server to be running the services, in this case SQL Server 2008 R2 and have a server on standby ready to pick up those services.  The network load balancing role in Windows Server 2008 R2 allows for multiple servers to share the load of the website running on this set of servers.


Click here to download the document

If you are interested in reading on how to implement Moodle on a single Windows Server you can find more whitepapers here.

Implementing Moodle 1.9 on Windows Server 2008 x86

Implementing Moodle 1.9 on Windows Server 2008 R2 x64

Changes to WhitePaper: Moodle x64 PHP download


Since I publish the whitepapers on how to install Moodle on a Windows environment, to date (6th June 2010) they have been downloaded over 850 times.  I certainly hope you have found they very useful.

Over the next week I’ll be publish a 3rd Moodle whitepaper entitled ‘Implementing Moodle on a Windows High Availability Environment’ where we will go though and install Moodle on two web front ends, a SQL cluster and a SAN.

Since publishing the Installing Moodle on Windows Server 2008 R2 which is a 64 bit operating system the link to the download of PHP x64 has broke and the website you can download it from is no longer available.  I have tried to find somewhere else to download it but have not been able to do this.  Instead I have added to the Learning Gateway media section for download.  You can now get this from the link below.


Installing Moodle on Windows Server 2008 R2 x64, SQL, IIS


Its been a few weeks since I released my first whitepaper on how to implement Moodle on Windows Server 2008 x86, SQL Server 2008 and IIS 7.0 (click here to download and click here to view blog post) and I have very pleased with the number of downloads it has already.

Today I’m releasing my second but is very similar to the last.  This new whitepaper will talk you through how to implement in a 64 bit operating system using, Windows Server 2008 R2 x64, SQL Server 2008 Service Pack 2, x64 PHP and IIS 7.5.


I hope you enjoy reading and implementing this in your organisation.