Archive for October, 2008

Language packs in Moodle

Friday, October 31st, 2008

If you make your own courseformat or plugin and you add a lang folder to that, make sure you always include the en_utf8 packs with all the strings. That is the source file from which Moodle determines the strings to be edited in the Moodle langauge editing setting.

Protocol for point upgrade

Friday, October 31st, 2008

Protocol for WJ point upgrade: Upgrade as usual do a normal upgrae as we do for other Moodle point upgrades Make sure all the customisations are still working 1. hide email address for everyone: line 116 in user/editlib.php should be 0 not 2 2. show / hide ip addresses in log: commnet line 321 in ...

Upgraded Moodle to 1.9.3

Friday, October 31st, 2008

upgraded Moodle of client to 1.9.3 to see if I can fix a bug. If custom profile fields are required you do not have to fill them in in the signup form. Bug should be fixed in 1.9.3, moreover you should add Choose... as the first option.

maildisplay = 0

Wednesday, October 29th, 2008

Problems with setting default maildisplay to hidden. I changed it in editlib.php of user but when a users signs up via the normal signup form, the value is not given so the database default is used. Changed database default value to 0 and now everything should be fine. That is quite ...

Upgrade client from 1.6 > 1.9

Sunday, October 19th, 2008

Upgrading client from Moodle 1.6 > 1.9, shouldn't be too hard and I guess I can upgrade without step-upgrading to 1.7 and 1.8 first. Based upgrade on this basic protocol: Upgrade client to 19 Added one more check before upgrading: check database is utf8 (Database Migration) All database tables were already in utf8 so that's ...

Moodle activity report

Thursday, October 16th, 2008

Moodle has a nice way to plugin mod results in the activity reports. Just add a function like this to your mods lib.php and moodle will pick it up: modname_user_outline($course, $user, $mod, $modinstance){} Did it for the feedback module, works great. Now looking how to get it into the book module. For ...

Issue Moodle 1.9.3

Wednesday, October 15th, 2008

There seems to be an issue with Moodle 1.9.3 . When installing, it hangs on admin tasks like logging in as admin and going to notifications. So for new installs I use 1.9.2, available on the shared server. NOTE: check out where the bug is. UDPATE: bug seems to be in Apache or ...

AWstats CentOS rpmforge

Wednesday, October 8th, 2008

Setup and configuration of AWstats from rpmforge on CentOS. Install awstats package: yum install awstats install Perl GeoIP to get country info yum install perl-Geo-IPfree Setup awstats config file: cp /etc/awstats/awstats.model.conf /etc/awstats/awstats.www.domain.tld.conf vi /etc/awstats/awstats.www.domain.tld.conf edit at least the following lines: LogFile="/var/log/httpd/access_log" SiteDomain="localhost.localdomain" LoadPlugin="geoipfree" (uncomment) and set them to the appropriate files Run awstats_updateall /usr/bin/awstats_updateall.pl now -awstatsprog=/var/www/awstats/awstats.pl and add to cron crontab -e 0 * * * * ...

Convert Apache logs from common to combined format

Wednesday, October 8th, 2008

Here's a nice post to convert Apache logs from the common to the combined format. AWstats needs the combined format to correctly parse the log files. Overview of commands 1. find where combined start and common ends: cat access.log | grep -n -m 1 "\\" \\"" 2. split the file there: csplit --prefix=access.log access.log numberfoundin1 3. ...

Updating database field

Wednesday, October 8th, 2008

Client wanted contents of db field to be exchanged. So x y somepattern z z should become somepattern x y z z Added column to the table alter table prefix_user add tmp_username varchar(100); alter table prefix_user add firstname_backup varchar(100); now update tmp_username based on firstname update prefix_user set firstname_backup = firstname where id = id; select ltrim(concat_ws(' ...