Moodle

From Hostek.com Wiki
Jump to: navigation, search


Introduction

Moodle is a Content Management System which is designed to be a VLE (Virtual Learning Environment).
It is a free web application that is specifically designed to create effective online learning courses for educators.
Official Site

Installation

Download, Upload, and Extraction

  1. Navigate to http://download.moodle.org/ and download the latest .zip bundle of Moodle by clicking the 'Download' link under the 'zip' column on the very right.
  2. Once downloaded, upload the .zip file through a FTP program of your choice to the /public_html/ directory - we recommend uploading with a third-party FTP program like Filezilla which you may find here.
  3. After the .zip file has been uploaded, navigate to the file manager within cPanel.
  4. Navigate to the /public_html/ folder within the cPanel file manager, right-click the .zip Moodle file you uploaded and click 'Extract'. Select 'Ok' on the prompt that appears.
  5. Your Moodle install has now been successfully extracted.

Creating the Moodle MySQL Database

  1. Log into your cPanel account and click 'MySQL Database Wizard' icon to begin the database creation process.
  2. On the screen that follows, choose a name for your Moodle database. Note that your cPanel username will always be appended to the title followed by an underscore (Ex: username_moodle). Click 'Next Step'.
    • NOTE: Make sure to write down or copy the database name for future use - we will need it for the Moodle Installation.
  3. Next, select a username and password for the Moodle database. Make sure to write down and store this username/password in a safe place. Once filled out, click 'Create User'.
  4. On the next screen, click the box labeled 'ALL PRIVLIGES'. This will grant the database user all privileges to access the database you're creating. Congratulations! The database has been created and a user assigned.

Installing Moodle

  1. Navigate to your site by typing your URL with /moodle/ appended to the URL. (Example: http://yoursite.com/moodle - where yoursite.com is your Moodle domain.)
  2. You should be redirected to http://noblews.net/moodle/install.php where you may select a language. Click 'Next >>' when ready to continue.
  3. The next page is a file path confirmation - because we uploaded all of the files already we can just select 'Next >>' to continue.
  4. As a database driver, 'Improved MySQL (native/mysqli)' should be the default option and the one we want to select. Click 'Next >>' to continue.
  5. The 'Database settings' page we've arrived on is where we will be using the DB info we wrote down in the previous chapter. Below is an example of information that fits the required format:
    • Database host: localhost (Default: localhost - Do not change.)
    • Database name: username_moodledb (Default: moodle - Change to the Database Name you created in Step 2 of 'Creating the Moodle MySQL Database'.)
    • Database user: username_moodleuser (Default: blank - Change to the Database Username you created in Step 3 of 'Creating the Moodle MySQL Database'.)
    • Database password: ********* (Default: blank - Change to the Password you created in Step 3 of 'Creating the Moodle MySQL Database'.)
    • Tables prefix: mdl_ (Default: mdl - You can change this to whatever you'd like your database tables to be prefixed with. If you're unsure, you may use the default 'mdl_'.)
    • Database Port: 3306 (Default: blank - Change to port 3306.)
    • Unix Socket: -- (Do not fill out this portion.)
  6. After Moodle unpacks into the database (this may take a while, expect a white screen for a few moments), you now see the Moodle license page. Click 'Continue'.
  7. Next, Moodle will perform a check on all minimum requirements needed for Moodle to function correctly. If you are on a shared cPanel server, most or all of these checks should be installed and enabled. If they are, you should be prompted 'Your server environment meets all minimum requirements' and you can click 'Continue'. If not, please create a support ticket at http://support.hostek.com/ and we'll be glad to help.
  8. Moodle will now enable and install all plugins needed for Moodle to function. There should be 'Success' under every module listed here. If there is, navigate to http://yoursite.com/moodle/admin/ where yoursite.com is your own domain. Let this page load fully. Once the page has loaded, scroll to the bottom and click 'Upgrade Moodle Database now'.
  9. Next, click continue to set up the admin profile for Moodle. We strongly recommend changing the username from 'admin' to something more custom so that brute force attacks are deterred.
  10. The next step involves setting up your Moodle front page. From here forward, things should be relatively simple and custom for your site. If you ever have any questions, please do let us know via our 24/7 Live Chat, phone support or ticket system at http://support.hostek.com/.


Updating Moodle

To find out what the most recent version of Moodle is available you can check here.
You will need to check the documentation for the moodle version you are going to upgrade to to make sure you can upgrade straight to that version.
For Example, you can only upgrade to Moodle version 2.4 if you are currently using Moodle version 2.2 or later.

Moodle's 3 Key Steps to Upgrade

  1. Back up everything to your site.
    This includes all your Files and your Database.
  2. You will replace the Existing Files with the New Versions Files.
  3. You will just need to Browse to your Moodles Installation Admin directory to initiate the upgrade process.
    Then you will follow the remaining prompts you receive.

Current Moodle Upgrade Documentation Pages


Moodle Performance Tweaks & Tips

Moodle can be made to run faster and in a better environment with some simple tweaks to the server that it is hosted on.

Here are some techniques we have tested, and found to be beneficial to Moodle installs.

Setting up the environment

There are a few changes that will need to be set up for Moodle to run in the environment that it was made for.

  1. Moodle is made to be hosted on a Linux environment. The application can run on windows, but this article currently only supports the tweaking of Moodle installs on Linux.
  2. Moodle wants you to make sure that hide PHP errors on the site when it is in production. "Enabling the PHP setting display_errors is not recommended on production sites because some error messages may reveal sensitive information about your server."
    • Note: This would be turned off in the "php.ini." Since you want and easy to edit php.ini, You will want to use the "php.ini Settings" tool in cPanel for the Moodle site. Access the tool, and enable the use of a custom php.ini. Once that is done, change "Display Errors" to "Off" and save.
  3. Newer versions of Moodle will need PHP to be built in version 5.4. If you are not sure what version you are on, contact support and we will be happy to let you know this information.
  4. Turn on mod_deflate. This can be done by making sure that the Apache build you are in has the "Deflate" module selected, and then adding the following rules to the site's .htaccess file:
<ifModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml
</ifmodule>
  • Enable mod_expires for the site. If this is not turned on for the server (It should be by default) then you will need to add it to the Apache build. One thing that has been noticed, is that this kind of caching can create problems during upgrades, you need to remove the caching directives one week before any upgrade. Add this within the .htaccess file.
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType image/gif "access plus 1 week"
ExpiresByType image/jpeg "access plus 1 week"
ExpiresByType image/png "access plus 1 week"
ExpiresByType text/css "access plus 1 week"
ExpiresByType text/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
ExpiresByType text/xml "access plus 1 seconds"
</IfModule>

Caching

Xcache, eAccelerator, and memcache are available on Linux server and can easily be implemented with rebuilding the Apache instance using the "EasyApache" tool in WHM.
From our experience, and from outside sources, it seems that the caching system "APC" another caching application that works well with the Moodle environment. It is not included in the EasyApache builder, but it can be added to the PHP instance manually. Please contact support if you wish to use this plugin.
Moodle has some of it's own caching tools that are usable as well. They can be found on the Moodle site.
http://docs.moodle.org/24/en/Caching
Moodle also has some performance recommendations of their own. They can also be found on the Moodle site.
http://docs.moodle.org/23/en/Performance_recommendations