Book Image

Moodle 1.9 E-Learning Course Development

Book Image

Moodle 1.9 E-Learning Course Development

Overview of this book

Table of Contents (16 chapters)
Moodle 1.9
Credits
About the Author
About the Reviewers
Preface
10
Extending and Administering Moodle
Index

The Moodle Architecture


Moodle runs on any web server that supports the PHP programming language, and a database. It works best, and there is more support, when running on the Apache web server with a MySQL database. These requirements, Apache, PHP, and MySQL are common to almost all commercial web hosts, even the low-cost ones.

The Moodle learning management system resides in three places on your web host:

  • The application occupies one directory, with many subdirectories for the various modules.

  • Data files students and teachers upload, such as photos and assignments submitted by students, reside in the Moodle data directory.

  • Course materials that you create with Moodle (web pages, quizzes, workshops, lessons, and so on), grades, user information, and user logs reside in the Moodle database.

The Moodle Application Directory

The following screenshot shows you my Moodle application directory. Without even knowing much about Moodle, you can guess the function of several directories. For example, the admin directory holds the PHP code that creates the administrative pages, the lang directory holds translations of the Moodle interface, and the mod directory holds the various modules:

The index.php file is the Moodle Home Page. If a student were browsing my Moodle site, the first page the student would read is the http://moodle.williamrice.com/index.php file.

In my site, the free course Basic Botany for Foragers happens to be course number 4. Only the Moodle system knows it as course number 4. We know it as Basic Botany for Foragers. When a student enters that course, the URL in the student's browser reads http://moodle.williamrice.com/moodle/course/view.php?id=4. In the previous screenshot, you can see that /course is one of the directories in my Moodle installation. As the user navigates around the site, different .php pages do the work of presenting information.

As each of Moodle's core components and modules is in its own subdirectory, the software can be easily updated by replacing old files with new ones. You should periodically check the http://www.moodle.org website for news about updates and bug fixes.

The Moodle Data Directory

Moodle stores the files uploaded by the users in a data directory. This directory should not be accessible to the general public over the Web. That is, you should not be able to type in the URL for this directory and access it using a web browser. You can protect it either by using an .htaccess file, or by placing the directory outside the web server's documents directory.

In my installation, the previous screenshot shows you that the web document directory for moodle.williamrice.com is /www/moodle. Therefore, I placed the data directory outside /www/moodle, in /www/moodledata:

On my server, the directory /www/moodledata corresponds to the subdomain www.moodledata.williamrice.com. This subdomain is protected from open access by a .htaccess file. The directory /www/www corresponds to the root domain, www.williamrice.com.

The Moodle Database

While the Moodle data directory stores files uploaded by students, the Moodle database stores most of the information in your Moodle site. The database stores objects that you create using Moodle. For example, Moodle enables you to create web pages for your courses. The actual HTML code of these web pages is stored in the database. Links that you add to a course, the settings, and content of forums and wikis, quizzes created with Moodle are all examples of data stored in the Moodle database.

The three parts of Moodle—application, data directory, and database—work together to create your learning site. Chapter 9 talks about backing up and disaster recovery, which is an obvious application of this knowledge. However, knowing how the three parts work together is helpful while upgrading, troubleshooting, and moving your site between servers.