Wednesday, June 5, 2013

Login using manual user to Moodle with Cas authentication

http://moodleurlhere/login/index.php?authCAS=NOCAS&username=admin

Change the moodleurlhere with your domain name

Monday, March 4, 2013

Find largest file in moodledata

SELECT DISTINCT filename, filepath, FORMAT( (filesize /1024 /1024), 1 ) AS filesize_MB, contenthash, component
FROM `mdl_files`
ORDER BY filesize DESC
LIMIT 0 , 30

Thursday, December 20, 2012

Apache subfolder setup

This tutorial is explain how to setup a subfolder but the location is not inside the html folder, instead, it can be located parallel to the html


Alias /subdirectory /path/to/real/subdirectory

Wednesday, December 19, 2012

How to setup cron for ELIS RLIP

This tutorial is to set cron to run every 5 minutes for the ELIS RLIP block

#crontab -e

then enter line below
5 * * * *  nice php /mnt/data/www/pathtomoodle/blocks/rlip/rlip_cron.php >/dev/null 2>&1


Tuesday, November 13, 2012

How to remove IP manually from cpanel

1 Bring down the ip first
for example ifconfig eth0:cp3 xxx.xx.xx.xx netmask 255.255.255.0 down

2. Edit /etc/ips and remove the line with the corresponding ip

3. Run this command /etc/init.d/ipaliases restart

Thursday, October 11, 2012

Some example for httpd.conf



  DocumentRoot /path/to/domainname
  ServerName domainname
  redirect permanent / https://domainname/
 Alias /sandbox /path/to/domainname/sandbox



The above is just an example on how to setup the virtualhost on apache
The Alias is like a subfolder inside the public_html but you can put the folder in parallel to the public_html.

Thursday, September 6, 2012