Integrating Moodle 2.0 with Alfresco to Manage Content for Business

Exclusive offer: get 50% off this eBook here
Moodle 2.0 for Business Beginner's Guide

Moodle 2.0 for Business Beginner's Guide — Save 50%

Implement Moodle in your business to streamline your interview, training, and internal communication processes

£18.99    £9.50
by Gavin Henrick Jason Cole Jeanne Cole | April 2011 | Beginner's Guides Moodle Open Source

Moodle 2.0 includes two important new points of integration with other open source products, the Repository integration and the Portfolio integration. This article by Jason Cole, Jeanne Cole and Gavin Henrick, authors of Moodle for Business: Beginner's Guide, introduces the integration of Moodle with Alfresco. Alfresco is an open source content management system that integrates well with Moodle and can act as Moodle's content repository.

In this article, we will:

  • Set up an Alfresco content repository and tie it in with Moodle


Moodle 2.0 for Business Beginner's Guide

Moodle 2.0 for Business Beginner's Guide

Implement Moodle in your business to streamline your interview, training, and internal communication processes

        Read more about this book      

(For more resources on Moodle, see here.)

The Repository integration allows admins to set up external content management systems and use them to complement Moodle's own file management system. Using this integration you can now manage content outside of Moodle and publish it to the system once the document or other content is ready. The Portfolio integration enables users to store their Moodle content in an external e-portfolio system to share with evaluators, peers, and others.

Managing content in repositories

The repository system of Moodle 2 allows you to store and manipulate content outside of Moodle and easily add it to courses. By managing content outside of Moodle, you can provide users with a more robust editing experience. Many organizations utilize workflows and approval processes to ensure the accuracy of the content used in the LMS. A content repository can help you manage that process, and then make the content available on Moodle when it is ready for final publication.

Using Alfresco to manage content

Alfresco is an open source, enterprise content management system, similar in many ways to Microsoft Sharepoint or EMC's Documentum. Alfresco has seen widespread adoption over the last few years as more people begin to recognize the advantages of open source software. We will start by installing Alfresco, then look at how to link it to Moodle and add content to a Moodle site. At the end of this section, we'll take a look at Alfresco's content conversion services as a tool to ensure content is reliably converted to web friendly formats.

Time for action - installing Alfresco on your test site

To get us started, we'll install Alfresco on our test system to experiment with the integration. Alfresco runs on a different architecture than Moodle. Alfresco requires a Java application server instead of PHP. Fortunately, there are installers available on the Alfresco site that include everything we will need to develop a test system on your local computer.

To install Alfresco, run through the following steps:

  1. Open your browser and go to http:\\ Go to the Downloads tab and select the Download Now button for Alfresco Document Management in the Community Edition column.
  2. Select the installer for your operating system and download it to your computer.
  3. Double-click on the installer (it may take a moment to get started).
  4. Select your language for the installer.
  5. Choose the database option you want to use. Use the included database, unless you have a good reason not to.
  6. When prompted, enter a database password. Be sure to write it down somewhere.
  7. The next screen will prompt you for an Alfresco admin password. Definitely write this down.
  8. The final screen will prompt you to choose the packages you want to install. Choose the defaults and click on Next. For the examples below, you will need to make sure that you have the OpenOffice component installed.

    Moodle 2.0 with Alfresco to Manage Content

  9. The installer will begin to run. This will probably take a while, so it may be time to go and get a cup of tea.
  10. Once the installer is complete, select Launch. This will take a while as well, so a second cup of tea might be in order.
  11. Once Alfresco has launched, you can configure the interface with Moodle.

What just happened

You now have a full-functioning open source enterprise content management system installed on your personal computer. Alfresco has a lot of power for manipulating and sharing documents, but we will only focus on a few features for now. There are a lot of books available to help you learn how to use the more advanced features in Alfresco (a few of them from this publisher as well).

Time for action - add a repository plugin to Moodle

To allow users to access your new Alfresco repository, you will need to configure Moodle to allow access to the repository. The new repository architecture of Moodle 2 enables developers to create plugins to connect Moodle with other systems. Each system will have its own type of plugin to allow a direct connection between Moodle and the system. To enable Moodle to talk to an external repository, we need to enable the plugin and any associated options.

To enable the Alfresco repository plug-in, go through the following steps:

  1. Login to Moodle as a Moodle admin.
  2. From the Site administration menu, select Plugins and then Repositories.
  3. The Manage repositories screen allows you to select from all of the available plugin repositories. For now, we will focus on the Alfresco repository. From the menu in the Active column, select Enabled and visible.

    The Alfresco plugin allows users in Moodle to add multiple instances of the repository. Most of the time, you will not want to allow users to add additional instances of the repository. As the admin, you can create a single site-wide instance of the repository plugin to allow users to link to Alfresco files. However, if you have more than one Alfresco instance, you can allow multiple users to create additional repositories at either the course level or the user level.

  4. Click the Save button to save the initial settings. This will return you to the Manage repositories page.
  5. Click on Settings under the Settings column to the right of the Alfresco repository row.
  6. This will take you back to the Alfresco settings page, but will provide an additional ability to add a repository instance at the site level.
  7. Click the Create a repository instance button at the bottom of the page.

    Moodle 2.0 with Alfresco to Manage Content

  8. Give the name of your Alfresco instance. If this is an institutional repository, give it the same name as you commonly use. For example, if you commonly refer to your Alfresco instance as the "ECM" (for Enterprise Content Management), name the Alfresco instance ECM.
  9. Add the URL of your Alfresco site. Be sure to point to the Alfresco Explorer, not the Share application. You will also need to add the API pointer at the end of the string. For example, if you are pointing to the locally installed Alfresco which we described in the preceding case, the URL should be
  10. Click on Save. You will now have an instance of Alfresco available for users to add content to their courses.

Moodle 2.0 with Alfresco to Manage Content

If you get the following error: Notice SOAP extension must be enabled for Alfresco plugin, then make sure that the SOAP library is enabled in your php.ini file. The location of the file will vary depending on the system you are using. Find the php.ini file and un-comment the extension=php_soap.dll line. Then restart Moodle and this should solve the error.

What just happened

You have just configured the Alfresco repository plugin to enable Moodle to talk to Alfresco. When you bring up the file picker in a course or at the site level, you should now see the Alfresco repository as an option.

Have a go hero

In the next article, we will configure the Google Docs plugin for Moodle, but there are a number of other plugins. Picasa and Flickr are two photo repositories on the web where many people share their photos. Wikimedia and YouTube are two very popular sources of media as well. Enable one or two of these additional plugins to practice configuring Moodle on your own.

Time for action - adding content to Alfresco

In Moodle 2, repository integrations are read-only. The Moodle design team decided the repository integration should only read from repositories, and the portfolio integration should save content to portfolio repositories. So you can't add content directly to Alfresco with the default plugin. To add content to the repository, we need to use the repository's own interface, then we can add it to Moodle. With Alfresco, that interface is either the Alfresco Explorer or Alfresco Share.

To add content to the repository using Share, run through the following steps:

  1. Go to your Alfresco share interface, found at http://<your Alfresco server>/share. If your Alfresco is on your local machine with the default install, go to
  2. Login with your username and password.
  3. Select the Repository link from the top of the page. This will display the folder structure for the default Alfresco repository.

  4. Select User Homes and then select your user space.
  5. From the menu above the file browser, select Upload.
  6. Click on the Select file(s) to upload button at the top of the Upload Files screen.
  7. Browse to find your file and then click on the Upload File(s) button.
  8. The file you selected should now appear in the file browser.

What just happened

You have now added a file to your Alfresco repository. We've explored a very simple example of adding a single file with no workflow or approval needed. You can use Share to create content, share it with colleagues, and use versioning and other features to manage the content creation process.

Have a go hero

Now that you've added a simple file to Alfresco Share, try some of the other features. Check out a file for editing, change it and check it back in for others to use, or create some content directly in Share.

Moodle 2.0 for Business Beginner's Guide Implement Moodle in your business to streamline your interview, training, and internal communication processes
Published: May 2011
eBook Price: £18.99
Book Price: £30.99
See more
Select your format and quantity:
        Read more about this book      

(For more resources on Moodle, see here.)

Time for action - Adding content from Alfresco to Moodle

Now that you've added some content into Alfresco, it's time to add that content to your Moodle course.

  1. Login to Moodle as a user with course editing privileges.
  2. Turn on Editing Mode and select File from the Add a resource.. menu in the course section where you want the link to appear.
  3. Give the file a name. Remember the name will be the link the user selects to get the file, so be descriptive.
  4. Add a description of the file.
  5. In the Content section, click the Add.. button to bring up the file browser.
  6. Select the Alfresco repository you previously created.
  7. Login to Alfresco using your Alfresco username and password.
  8. Browse through the available Alfresco spaces to find your user folder and the file you want to add.
  9. Select the file by clicking on the link.
  10. On the next screen, you can rename the file to save it locally, edit the author name, and select a copyright license for the file.
  11. Click on Select this File.
  12. You can choose a display option, whether the file appears in a pop-up window, and who can view the file and when.

A note about the Alfresco plugin
When you link to a file in Alfresco, Moodle makes a copy of the file and stores it locally. This increases system reliability as Moodle does not require the Alfresco server to be available to run. However, once the document has been copied to Moodle, it isn't updated if the copy on Alfresco is edited.

What just happened

You have now copied your file from Alfresco to Moodle for use in your course. You can now download or view the file as you would do normally.

Now we are going to explore one of the features of Alfresco—content conversion services. Alfresco has a number of powerful features that are beyond the scope of this article, but we thought we'd give you some basics to help you explore some of the features of Alfresco. For web publishing in Moodle, you can use Alfresco to automatically convert content to web friendly formats in a regular format.

Time for action - creating a content conversion space

To start, we need a place to store the converted files. An Alfresco Space is the equivalent of a file folder on your desktop, but it can have attached rules and workflows. We need to create a Space in our user area to start the process and we'll need to use the Alfresco Explorer to set that up and create the rule.

  1. Login to the Alfresco Explorer interface. The URL for Explorer is: http://<Your Alfresco URL>/alfresco.
  2. Navigate to your user home space by clicking on My Home on the left hand side.
  3. Create a Space in your home folder by selecting the Create menu and selecting Create Space.
  4. Give your new Space a name. I like to use descriptive names like Word, PDF, and HTML.
  5. Next, provide a title for your space. The title will be displayed in the place of the name.
  6. Fill in the description field with a useful description.
  7. Select the icon you want to use for your space.
  8. Click on the Create Space button on the right.

What just happened

You have now created a space in Alfresco for the content conversion rule to store the converted content. You can use Spaces as content organizers, much like folders on your desktop. In this case, we are using it for Alfresco, but there's nothing to keep us from using it as a regular folder as well.

Time for action - adding a content rule to a space

Once you've created your space, you need to add a place to put your converted content and a content rule to tell Alfresco how to convert your content.

  1. From within Alfresco Explorer, click on your newly created space.
  2. Select Create Space from the Create menu. We are now going to create a space to hold the transformed files.
  3. Name your new Space PDFs, add a description, and choose an icon.
  4. Select Create Space.
  5. You will now see the Word to PDF space with the new PDFs Space.
  6. From the More Actions menu, choose Manage Content Rules.
  7. Select the Create Rule button at the top of the screen.

  8. On the next page, you will set the conditions that will trigger the rule. For this rule, set the Select Condition to Content of mimetype. This will trigger the rule if content of a certain type is added to the space.
  9. Next, select the Set Values and click on the Add button to set the file type. On the Set Values page, select Microsoft Word from the Set Condition Values list.
  10. Click on Ok to save the conditions. You will then see the condition added to the rule. You can add multiple conditions to help better filter your search.
  11. Click on Next to go to the Actions page.
  12. From the Select Action menu, select Transform and copy content.
  13. Select the Set Values and Add to set the target file type.
  14. In the Set action values form, select Adobe PDF as the required format.
  15. Set the transformed files destination by selecting the Click here to select the destination link.
  16. Navigate to the PDFs space you just created. Click the green + to the right of the PDF folder to add it to the rule. Click on Ok on the Set action values page. Then click on Next.

    Moodle 2.0 with Alfresco to Manage Content

  17. The final step is to enter details. For the Type select Items are created or enter this folder. This triggers the rule when a file of the right mimetype is added to the folder.
  18. Give your rule a title such as Word to PDF.
  19. There are three options in the Other Options section below. For this example, we will leave all the checkboxes blank, but it's useful to know what they mean.
  20. The Apply rule to sub spaces will apply the rule to subfolders in the Word to PDF folder. So if you create a new folder, the same rule will convert any new Word files to PDF.
  21. The Run rule in background option will run the rule as a background process and create the PDF file when it is ready. Running in the background can speed up the user interface, but may cause confusion as the PDF will not be immediately available.
  22. The final option, Disable Rule, will allow you to turn off the rule if you need to disable it, without deleting the rule.
  23. Click on Next.
  24. The final screen shows you the rule summary. Review the summary to make sure everything looks right and click on Finish.

What just happened

You have now created a rule in Alfresco that will automatically convert Word files into PDF. When a new Word file is added to the space, Alfresco will automatically make a copy and convert it to PDF. Test your new rule.

Time for action - testing your new rule

Now that you have created a rule, we should test it to make sure it is working.

  1. Open the Word to PDF space in the Alfresco Explorer
  2. Click on the Add Content button in the upper-right area of the explorer.
  3. Browse and find a Word file you want to convert.
  4. Click on OK.
  5. You can leave all of the options on the Modify Content Properties page at their defaults and click on OK.
  6. Your Word file should now be added to the Word to PDF space. If you look in the PDF space, you should see the PDF version of the Word file.

What just happened

You have just tested your new rule for converting Word files to PDF. Moving forward, you should be able to simply add Word files to the folder and then link to the PDF version within Moodle.


There are a number of conversion services available in Alfresco. You can convert a number of different Office files to a variety of formats, including PDF and HTML. You can also convert images loaded on to the system into a standard web friendly format.

Further resources on this subject:

Moodle 2.0 for Business Beginner's Guide Implement Moodle in your business to streamline your interview, training, and internal communication processes
Published: May 2011
eBook Price: £18.99
Book Price: £30.99
See more
Select your format and quantity:

About the Author :

Gavin Henrick

Gavin Henrick has worked with technology in business, learning and development for over 10 years. He has been consulting on using Moodle, Mahara and other open-source applications for the last 4 years. He has run several websites and runs his own blog ( He is a regular speaker at a number of Moodlemoots and conferences on the use of Moodle in the corporate space focusing on practical examples of usage.

Gavin recently joined the the Moodle Partner Remote-Learner and is based out of Canada working with a range of organisations in Canada and Europe.

Jason Cole

Jason Cole, Ph.D is the Chief Operating Officer for Remote-Learner, US, an official Moodle partner providing hosting, support and instructional design services. Jason oversees Remote-Learner’s daily operations, providing technical services to over 1,100 clients, from small non-profit organizations to Fortune 500 companies.

Jason started using Moodle at San Francisco State University in 2003 when he led the transition from Blackboard to Moodle. Later, he led the implementation of Moodle at the Open University in the UK, currently one of the top three largest Moodle deployments in the world. Over the ensuing 2 years he successfully architected a system that currently supports over 225,000 student users with multiple enrollments.

Jason is the co-author of Using Moodle (c2006 & 2007) published by O'Reilly Community Press, and has been the organizer of several successful Moodle Conferences in the US and UK.

Jeanne Cole

Jeanne Cole is a Senior Project Manager for Remote-Learner US. She is an experienced Moodle course developer and project manager who has migrated hundreds of courses from other learning management systems to Moodle, as well as created courses from client materials. She also has experience managing projects applying multiple open source products to meet a wide variety of client needs.
Prior to her Moodle career, Jeanne worked as a project engineer / manager for contractors in the US and UK.

Books From Packt

Moodle Administration
Moodle Administration

Moodle Security
Moodle Security

Moodle 1.9 for Design and Technology
Moodle 1.9 for Design and Technology

Moodle JavaScript Cookbook
Moodle JavaScript Cookbook

Moodle 2.0 Multimedia Cookbook: RAW
Moodle 2.0 Multimedia Cookbook: RAW

Moodle 1.9 Top Extensions Cookbook
Moodle 1.9 Top Extensions Cookbook

Moodle 1.9 Theme Design: Beginner's Guide
Moodle 1.9 Theme Design: Beginner's Guide

Moodle as a Curriculum and Information Management System
Moodle as a Curriculum and Information Management System

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software