Monthly Archives: July 2016

Moodle, how to convert InnoDB tables to Barracuda.

I recently installed Moodle 3.0, everything was going to plan until I noticed that Moodle was giving me the warning below:

 

“Your database has tables using Antelope as the file format. You are recommended to convert the tables to the Barracuda file format. See the documentation Administration via command lineĀ for details of a tool for converting InnoDB tables to Barracuda.”

 

As the warning alludes to, there is a simple script that you can run that will correct the issue for you. However, there is a caveat, you need to give your moodle database user super permissions, something that I did not wish to do.

 

You can convert your file format by running the commands directly on the DB using your main administrator account.

 

USE YOURDB;
SET SESSION sql_mode=STRICT_ALL_TABLES;
SET GLOBAL innodb_file_per_table=1;
SET GLOBAL innodb_file_format=Barracuda;
ALTER TABLE mdl_certificate ROW_FORMAT=Compressed;
ALTER TABLE mdl_data ROW_FORMAT=Compressed;
ALTER TABLE mdl_data_fields ROW_FORMAT=Compressed;
ALTER TABLE mdl_enrol_paypal ROW_FORMAT=Compressed;
ALTER TABLE mdl_lti ROW_FORMAT=Compressed;
ALTER TABLE mdl_user ROW_FORMAT=Compressed;
ALTER TABLE mdl_user_info_field ROW_FORMAT=Compressed;

Once you have ran the above commands the warning on the Moodle site will no longer show.

Maintain and upgrade Moodle with Git on CentOs

Git is a software development versioning control system. Using Git with Moodle will allow you to easily upgrade and maintain your Moodle site. First you will need to install Git by running the command:

 

sudo yum install git

 

Once Git is installed move into your web server document root. To move to the standard web server document root in CentOs enter the following command:

 

cd /var/www/html

 

Next we will clone a local version of Moodle by entering the following command:

 

git clone git://git.moodle.org/moodle.git

 

Once this command is finished, move into the moodle directory it creates by entering the command:

 

cd moodle

 

You can list Moodle branches available by entering the following command:

 

git branch -a

 

You can then select the branch which you want to track, here we will track Moodle 3.0:

 

git branch –track MOODLE_30_STABLE origin/MOODLE_30_STABLE

 

We can now checkout this Moodle branch:

 

git checkout MOODLE_30_STABLE

 

You are now using Git to maintain your Moodle site. If you need to update your moodle site you can navigate into your Moodle directory by typing:

 

cd /var/www/html/moodle

 

Once here you just need to run the command:

 

git pull

 

That’s all there is to downloading and updating Moodle using Git!