Moodle Installation
for moodle users or teachers
- Moodle - A Free, Open Source Course Management System for Online Learning(MoodleDocs, 中文MoodleDocs,forums, Files included old versions of Moodle, CVS)
- Moodle 討論區:
- Moodle線上教學
- 課程: Moodle平台使用123 (需註冊為會員)
- Moodle 1.5.3 架站錄影教學 Thanks! 歐展嘉老師
for moodle site administrators or developes
- PHP Cross Reference of Moodle([xRef]): Moodle 2.2, Moodle 1.9.9
- Release Notes
- Moodle Technical Documentation (phpdocumentor)
- Moodle tracker(search issues)
Contents
- 1 Who use Moodle
- 2 install web server ex: AppServ or XAMPP
- 3 install Moodle
- 4 upgrade Moodle
- 5 backup Moodle
- 6 secure the phpMyadmin
- 7 modify the translation file
- 8 optional
- 9 other notes
- 10 References
Who use Moodle[edit]
- or my bookmarks tagged with moodle+courses
install web server ex: AppServ or XAMPP[edit]
download AppServ 2.4.x from AppServ Open Project
- select custom to check some options of installation
- (Apache) Server Name: domain name or IP or localhost
- (MySQL) change the password
download XAMPP from http://www.apachefriends.org/
install Moodle[edit]
official document: http://docs.moodle.org/en/Installing_Moodle
AppServ[edit]
download appserv AddOns for Moodle from AppServ Open Project
- install appserv-AddOns-Moodle-1.5.exe
- default: admin, passwd: admin {moodle}/config.php
- http://localhost/moodle
XAMPP[edit]
in php.ini (xampp/php/php.ini or check the location of file by using the phpinfo() function ), unmark the curl extension
extension=php_curl.dll
in moodle\lang\en_utf8\countries.php
$string['TW'] = 'Taiwan, Province Of China'; change to $string['TW'] = 'Taiwan';
upgrade Moodle[edit]
- Subscribe the latest announcement of Moodle Security Procedures forum
- backup data
- backup the (MySQL) data file
- backup the {moodle data} files
- backup the moodle php files those you modified
- download the latest version of moodle
- (optional) Restart the server to refresh the cache and load the lang pack normally.
- run the {moodle}/install.php
- note: the path of data should be file:\\aaa\\data at MS Windows
- move the {moodle}/theme/{cstomized theme files}
backup Moodle[edit]
- moodle php or webpage files
- moodledata files which uploaded by users
- moodle database
debug Moodle[edit]
SQL syntax
SELECT * FROM `mdl_config` WHERE `name` LIKE '%debug%'
value of
- debug: Debug messages
- 0 (NONE: Do not show any errors or warnings) ->
- 6143 (ALL: Show all reasonable PHP debug messages)
not 1
- 38911 (DEVELOPER: extra Moodle debug messages for developers)
- debugdisplay: Display debug messages
- 0 (No)
- 1 (Yes)
- debugpageinfo: Show page information
- perfdebug: Performance info
Some moodle sites will not allowed to login the "Site Administration" page after enable to "Display debug messages (debugdisplay)" because the error message block the normal display of moodle page. Highly recommend, left one browser tab on the "Debugging" setting page if you can not access the database. [Moodle 1.8.1]
secure the phpMyadmin[edit]
- password protected: change the root password
系統設定 » Variables[edit]
- lang: en -> zhtw_utf-8 (Recommend: Download the lang pack from official website by yourself not your moodle.)
- langlist: en, zh_tw_utf8; If you want to view different language version of moodle, you can add lang parameter in the URL address as follows:
English: http://moodle.site/?lang=en Traditional Chinese: http://moodle.site/?lang=zh_tw_utf8
- (optional) slasharguments: file.php?file=/pic.jpg
- smtphosts: ISP?
- enablerssfeeds: 是
- {moodle}/config.php
$CFG->dirroot = 'C:\AppServ\www\moodle'; -> $CFG->dirroot = "c:\appserv\www\moodle";
secure the config.php[edit]
- in windows, setting the "read-only" permission of the config.php file
cron.php maintenance script[edit]
method1 (require the admin permission)[edit]
- download from http://moodle.org/download/modules/moodle-cron-for-windows.zip
- add the URL of path/to/cron.php to HKEY_LOCAL_MACHINE\SOFTWARE\MoodleCron\Sites
- 新增 -> 字串值
- more on Moodle docs: Cron
method2 (not require the admin permission)[edit]
- download the wget for windows[1][2]
- create the cron.bat as follows
REM -- run Moodle cron job FOR /F "tokens=1-8 delims=/:. " %%J IN ("%date% %time%") DO SET timestamp=%%M-%%L-%%K_at_%%N.%%O.%%P wget http://path.to/cron.php -q -O Moodle_cron_%timestamp%.txt
- add to the scheduled tasks (程式集 -> 附屬應用程式 -> 系統工具 -> 排定的工作)
- (optional) If you do not want to see the pop-up prompt window, you may need to install hstart. And add the following path to your scheduled tasks
path/to/hstart.exe /NOCONSOLE /IDLE path/to/cron.bat
開放訪客註冊[edit]
- Administration / Users / Authentication / Manage authentication
- Self registration: Email-based self-registration (Moodle 1.9.7)
Message: Enabling the PHP setting display_errors is not recommended on production sites because some error messages may reveal sensitive information about your server.[edit]
- find php.ini file
original: display_errors = On after: display_errors = Off
- restart the apache service
modify the translation file[edit]
optional[edit]
setup the default course block for new course[edit]
- suggest to add the Messages block
- ref: [1]
move the data to another HD[edit]
- C:\AppServ\apache\conf\httpd.conf
move the webpages to another hard disk
DocumentRoot "C:/AppServ/www" -> DocumentRoot "D:/www"
- restart apache service
- modify {moodle}/config.php
insert the tracking script[edit]
- modify the {moodle}/theme/{default_theme_name}/footer.html
- insert the tracking script ex: Google analytics codes
other notes[edit]
Moodle Assign roles for 1.7.x[edit]
Moodle Assign roles for 1.7.x
Moodle wiki syntax (markup)[edit]
- CamelWord
- Free link
[Free_link]
- or
[Description | Free_link]
forgot the specified theme[edit]
SELECT `value` FROM mdl_config WHERE `name` = 'theme' /*execute SQL command in Moodle 1.99+ database*/;