Working on nethserver-moodle module

Very good points @stephdl. Here is an update with a few of your suggestions:

1 Like

you still miss a line in your spec file

Requires : php-soap, php-pecl-zendopcache, php-ldap

good work, these rpm will be needed to give a cache and use ldap

I didn’t include the lines intentionally because those are dependencies of the moodle package not the nethserver-moodle package. Shouldn’t those dependencies be in the moodle spec?

A lot of moodle implementations don’t use ldap authentication. They are just online services where you need to create an account in the moodle database. Or they use some kind of open authentication, facebook or G+.
The upstream maintainer probable left php-ldap out since it is not always used ??

If it is not in the epel package, we sure need those php packages…

These rpm are needed by moodle…it is the orange warnings you get at the installation that you stated we can pass safelly :slight_smile:

Php-ldap it is needed if we want to authenticate by ldap or samba4. It is the next nfr to do

Welcome in the new world! :heart_eyes: Thanks for accepting my invite to jump into the action! :top:

I have only a blank page with this rpm, do I’m alone ???

got it in fact you must respect the url in /var/www/moodle/web/config.php

$CFG->wwwroot = ‘https://ns7dev2.mysomainname/moodle’;

this url wasn’t reachable on my network

$CFG->wwwroot = ‘https://$SystemName.$DomainName/moodle’;

1 Like

The default URL in /var/www/moodle/web/config.php was http://localhost/moodle and it didn’t work when I tried to access the application from a host other than localhost itself. So it was necessary to reconfigure the default URL to match the FQDN of the host which is accessible from remote hosts. In my testing infrastructure the HTTP service is accessible using the server FQDN from both red and green networks.

Another issue to note here is that the URL in config.php must be specified using https:// and not http://. Otherwise CSS and Javascripts aren’t loaded. In this case the application doesn’t work as expected. It seems the URL in config.php must match the schema used to call the application in first place. In our case, the one set by Moodle Box at NethServer Applications.

I guess the default Moodle configuration (as distributed by EPEL) was conceived to be prepared in localhost by the system administrator and later customized (by the system administrator as well) so it can be served in a public address when ready. Note the fact that, initially, the /etc/httpd/conf.d/moodle.conf file doesn’t allow access from hosts other than localhost and we had to change it in order to do so.

How can we handle to choose te url we want moodle to be avaikable on?. I think this should be possible to define during install of the module.
For instance, when clicking the install button for moodle in software center, you first get a prompt to choose an url in the form of subdomain.domain.tld/moodle
It would be nice if a DNS entry is created for that url. Then Moodle would be accessable on that url from the local LAN. If you need external access you need to set an A or CNAME record in your DNS settings of your domain privider and forward on your gateway.
I only don’t know if this is possible if the NS where you install Moodle on is not the DNS server for your network…
Alternatively you could manually create the DNS entry for you LAN.

an action can be launched to create a new db property in the host database, but I guess that you cannot change the default url given at the installation. The fact that the stylesheet is not displayed is maybe a symptom for me…

else we could imagine $CFG->wwwroot = ${moodle}{newurl} || $SystemName.$DomaineName and trigger an action to create the new dns entry

Can you elaborate on why you can’t change the default url during install? It would be highly limiting if this is not possible. Imo you should be able to use any url and install moodle in a vhost for apache. The only thing to do is tell the document root for the moodle install.

I recall something similar with wordpress (If i’m not wrong) where the url is stored in the database and you cannot change it once created. The only manner is to change it manually by the wordpress settings.

But it is the development game now, a lot of problems that you won’t have if you watched the TV, however it is fun.

What database are you talking now? The esmith or the moodle mysql database?

all is stored under the mysql database with moodle

Ok, clear. But if it is the mysql database, then entering a custom url shouldn’t be the hardest thing, or is it?

1 Like

some new of the front, thank to @areguera who find the bug I pushed with my commit :slight_smile:

The rpm is near to be ready to go out, now the big part is the authentication against Samba4/ldap

1 Like

Package update here:


This package should do the following:

  • Correct the stylesheet issue
  • Force ssl redirection

If you can confirm this package does the expected, a new tag will be created for the related changes.


That’s a HUGE achievement Alain :slight_smile:
You should push your rpm on our testing repo @davidep will be happy to help you :wink:

1 Like

Wow already a (working) rpm for moodle. This is a huge step forward to make NS a kickass education platform.