Wednesday, August 20, 2008

Moodle latex and dvips

If you go to filter settings and found /usr/bin/latex and /usr/bin/dvips is not installed, do a yum install tetex-latex

Now if you also have a red X next to convert binary your path is incorrect or you need to install gostscript or ImageMagic I installed ImageMagic and if fixed the problem.
yum install ImageMagick (It's case sensitive)

Saturday, August 2, 2008

How to turn debug on during upgrade

If you're upgrading moodle and it just saying processing assignment and it's not going anywhere, it's worth a shot to debug the process.

Go to config.php and add $CFG->debug=1;
Then setting debug to true in the mod/assignment/db/upgrade.php

Friday, July 25, 2008

Error while opening bat or ini file

Looks like there is trojan on the system and this happen. If you don't want to reinstall the system, simply scan the trojan and here is how to fix the error.

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile\shell\edit\command] = %SystemRoot%\System32\NOTEPAD.EXE %1"

Notice at the end, there is a single ". You need to remove that " and it should work like a charm.

PS: Above path is for the .bat. For .ini, you need to find inifile and so on.

Monday, July 21, 2008

In Cpanel, httpd can't start

If you use cpanel and happen httpd can't start with the error

root@s30 [~]# /etc/init.d/httpd start
[Tue Jul 1 04:21:41 2008] [info] mod_ssl:Compat: MAPPED 'SSLEnable' => 'SSLEngine on'
[Tue Jul 1 04:21:41 2008] [info] mod_ssl:Compat: MAPPED 'SSLLogFile
/usr/local/apache/domlogs/dis**********.org-ssl_data_log' => 'SSLLog
/usr/local/apache/domlogs/dis*******.org-ssl_data_log'
[Tue Jul 1 04:21:41 2008] [warn] NameVirtualHost 67.*.*.*:80 has no VirtualHosts
[Tue Jul 1 04:21:41 2008] [warn] NameVirtualHost 67.*.*.*:80 has no VirtualHosts
/etc/init.d/httpd: line 83: 5450 File size limit exceeded$HTTPD -DSSL
/etc/init.d/httpd start: httpd could not be started

Backup the file /usr/local/apache/domlogs/dis*****.org-ssl_data_log to other name and start the httpd. (Something to do with logrotate)

Sunday, July 20, 2008

5 Rules that differentiate Amateurs and Pros in investing

1. Always have cash handy on your portfolio, at least 10% of it. When there is a bear situation where the stocks are down, you can buy the stock at cheap price if and only if you have the money.

2. Pros are usually focus on the downside instead of the upside. Which means they look at the risk of their portfolio first, instead of thinking of the profit. Pros know this inevitability, so they buy companies with huge stock-repurchasing plans and healthy dividends, which protect their investments when that decline comes.

3. If you don’t know it, don’t buy it. Pros pass up investing in companies they don’t understand all the time because they’d rather hold on to their money.

4. There is such a thing as making too much money – might be a bit harder for amateurs to understand. But the bottom line is that making to much money is usually a sign that a portfolio is overexposed to one stock or sector. Think dot-com era, 1999-2000. Everyone was in tech. Everyone was making money hand-over-fist. Then everything collapsed. It never costs any money to take profits, so do it before it’s too late.

5. Earnings season produces the smallest profits and biggest losses of the year. Why? Because too many people – analysts and institutional investors – are making snap decisions based on the numbers. Investing during earnings season is too much of a gamble. And when you gamble, the house always wins.

Monday, July 7, 2008

How to fix the unaligned course in Moodle

After upgrading to 1.9, some of the text are aligned to the right.
To fix that, go to the current theme and open the css.
there's probably a .coursebox css entry somewhere in one of the styles.css files, probably styles_layout.css
and if there's a float entry for it, just delete

How to fix breadcrumb in moodle that say "Array"

Go to the current theme, and open header.html.
Find $navigation and remote the "" around it.