Nethserver-moodle package available for testing


I am very pleased to announce the immediate availability of nethserver-moodle package for you to install and test.

The nethserver-moodle package provides the basic integration necessary to run Moodle learning platform on NethServer 7.

To install nethserver-moodle package, run the following command as root:

yum install --enablerepo=nethforge-testing nethserver-moodle

To know more about nethserver-moodle package, see the README.rst file.

I want to thank you all for making this experience possible. Specially to @alefattorini and @robb for triggering the initial motivation, @stephdl for being such a great mentor in the process of developing the package itself, and @davidep for making the necessary adjustments and explaining the correct procedure of uploading packages to nethforge-testing repository.

Enjoy! :slight_smile:


@areguera, you are THE MAN… absolutely SUPERB!!!
You don’t know how happy I am right now.

@alefattorini: give this guy a medal! He deserves it!

1 Like


yeah :wink:

Totally agree!


I would be curious to see how the next american president could be recycled to motivate us :slight_smile:

BTW I set up a little dokuwiki page


yum install

this new version allows the authentication of Nethserver users in Moodle following you have installed openldap or samba4 AD. Members of the group staff are granted as ‘course creator’

One drawback, because moodle is an ogre, to do this feature I needed to import a database with the default password of admin -> password

administrator login : admin
administrator password : password

of course think to change it in the admin preference

If we don’t want a default password, the only way I found is to install moodle, and at the end, after the database creation by the web page, then issue manually in the terminal a signal-event to INSERT our modifications…not fancy :frowning:


Wow that’s a great news @education_team

Great effort @stephdl! I have to set up a new instance to test it.

Just a question: If I have a local domain called domain.local and I want my moodle accessable from the outside, Is it possible to use another domain for the moodle site? Let’s say I want to use (I have registered and can create a DNS record for the subdomain pointing to the local server.) What and where do I need to change Moodle and/or Apache configuration?

this is handed

db configuration setprop moodle apacheConf virtualhost host vhost.your.domain
signal-event nethserver-moodle-update;




some time to test moodle :slight_smile:

@stephdl @areguera
Finally found some time to do tests on the moodle module.
Unfortunately with the latest NS 7.4 this module looks like to be broken.
When installing and going to the webinterface post installation settings are needed.

But before being able to proceed I get some warning messages:
Other checks
Information Report Plugin Status
mysql_full_unicode_support#File_format this test must pass

Your database has tables using Antelope as the file format. Full UTF-8 support in MySQL and MariaDB requires the Barracuda file format. Please 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. Check
mysql_full_unicode_support#File_per_table this test must pass

For full support of UTF-8 both MySQL and MariaDB require you to change your MySQL setting ‘innodb_file_per_table’ to ‘ON’. See the documentation for further details. Check
mysql_full_unicode_support#Large_prefix this test must pass

For full support of UTF-8 both MySQL and MariaDB require you to change your MySQL setting ‘innodb_large_prefix’ to ‘ON’. See the documentation for further details.

The first warning is to switch from Antelope file format to Barracuda file format. If I look at the Moodle documentation, this should be possible with a moodle shipped tool:

When running this tool I get the following output: (executed from the /var/www/moodle/web directory)

[root@ns7 web]# php admin/cli/mysql_compressed_rows.php --list
PHP Warning: Creating default object from empty value in /var/www/moodle/web/config.php on line 17
PHP Notice: Undefined index: HTTP_HOST in /var/www/moodle/web/config.php on line 25

any help appreciated

/edit: also the rpm on nethforge-testing gives this behaviour. It would be nice if the rpm gets fixed. As it is now, the module is broken…

I managed to solve the errors that were thrown in the first config screen after installation.
I logged into mysql command prompt:

mysql -u root -p
when prompted for the password I pasted the password stored at /var/lib/nethserver/secrets/mysql

Then I was shown a mysql command prompt. I switched to the moodle database:

MariaDB [(none)]> use moodle
Database changed

Then entered the followong commands:
MariaDB [moodle]> SET SESSION sql_mode=STRICT_ALL_TABLES;
Query OK, 0 rows affected (0.00 sec)

MariaDB [moodle]> SET GLOBAL innodb_file_per_table=1;
Query OK, 0 rows affected (0.00 sec)

MariaDB [moodle]> SET GLOBAL innodb_file_format=Barracuda;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> set global innodb_large_prefix = ON;
Query OK, 0 rows affected (0.00 sec)

exit mysql prompt with

MariaDB [(none)]> quit;

Beware every command in mysqlprompt has the end with a ;

After that I get the plugin check page. And unfortunately there it stops again. After a few refreshes I only end up with a blank screen…

hi rob, nice you are investigating this and made some progress!

Reading this I wonder if moodle has problems with the current apache configuration

Setting $CFG->wwwroot correctly

This setting must be a fixed URL (a string constant) that points to your site. Do not try to set this with any PHP code that can generate a variable URL. This is not supported, can cause strange problems and will stop command line scripts working completely. If your site is accessed from different IP addresses this should be done with a split DNS, see Masquerading

Hi @mark_nl
thnx for the headsup. AFAIK I didn’t use a FQDN but the internal IP address of the (NS)server that is running Moodle.
I think what was happening is that the script adjusting the database for first use messed up. But I have no clue how to get around this. I tried several times now to get passed this step…

Oke, then we need to examine this lines of code

/usr/bin/mysql --defaults-file=/root/.my.cnf -e "CREATE DATABASE IF NOT EXISTS moodle;"

where --defaults-file=/root/.my.cnf catches my eye

Isn’t that default code for the default location where mysql/mariadb stores the database? (written in esmith code) just thinking out loud here… I am far from a module dev…

Me neither, but you know how to set-up moodle; Together we find a way to EDIT: debug fit it in the e-smith configuration layer. :grinning:

I’ll work on it and let’s share our results.

Thanks for the help so far.
In the meantime I am taking it 1 step further: The nethserver-moodle module is created based on Moodle 3.1. This is an older version of Moodle. Just a few months ago Moodle 3.4 was released with a LOT of extra goodies. But for Moodle 3.4 php7 or higher is needed. And there is no CentOS rpm for Moodle 3.4 yet.
So, I am back to installing by hand and adding nethserver-pgp-scl module to have php7+ available…
I will post a new howto on this later this weekend…


…don’t be like THAT!

On topic; thanks for this!! +1 on that medal!