Moodle Installation: Difference between revisions

From LemonWiki共筆
Jump to navigation Jump to search
m (Text replacement - "== reference ==" to "== References ==")
 
(35 intermediate revisions by one other user not shown)
Line 1: Line 1:
== about Moodle ==
for moodle users or teachers
* [http://moodle.org/ Moodle - A Free, Open Source Course Management System for Online Learning]([http://docs.moodle.org/ MoodleDocs], [http://docs.moodle.org/en/Release_Notes Release Notes], [http://docs.moodle.org/zh/%E9%A6%96%E9%A1%B5 中文MoodleDocs], [http://moodle.org/course/category.php?id=1 BBS], [http://xref.moodle.org/nav.html?index.html PHP Cross Reference of Moodle])
* [http://moodle.org/ Moodle - A Free, Open Source Course Management System for Online Learning]([http://docs.moodle.org/ MoodleDocs], [http://docs.moodle.org/zh/%E9%A6%96%E9%A1%B5 中文MoodleDocs],[http://moodle.org/course/category.php?id=1 forums], [http://sourceforge.net/projects/moodle/files/Moodle/ Files] included old versions of Moodle, [http://cvs.moodle.org/moodle/ CVS])
* Moodle 討論區:  
* Moodle 討論區:  
*# [http://moodle.hcc.edu.tw/moodle/mod/forum/view.php?f=30 Moodle加油站的「你問我答-大家來討論」討論區] {{Gd}}
*# {{Gd}} [http://moodle.hcc.edu.tw/moodle/mod/forum/view.php?f=30 Moodle加油站的「你問我答-大家來討論」討論區]  
*# [http://course.skps.kh.edu.tw/course/view.php?id=3 林宏隆老師的 Moodle 討論區]
*# [http://twpug.net/modules/newbb/viewforum.php?forum=24 台灣PHP聯盟(Taiwan PHP User Group) - 討論區 - 數位學習平台]
*#  [http://twpug.net/modules/newbb/viewforum.php?forum=24 台灣PHP聯盟(Taiwan PHP User Group) - 討論區 - 數位學習平台]
*# [http://www.linkedin.com/groups?home=&gid=2837239&trk=anet_ug_hm Moodle for Teachers (M4T) - LinkedIn]
*# [https://moodle.org/mod/forum/view.php?id=55 General developer forum]
 
* Moodle線上教學
* Moodle線上教學
** [http://www.gfes.ilc.edu.tw/~gavin/mydata/webdata/learnMoodle/ 宜蘭縣Moodle數位學習平台研習教學網站]
** [http://www.twedutest.com/moodle/course/view.php?id=59 課程: 如何使用 Moodle (教師版)]
** [http://moodle.club.tw/moodle/course/view.php?id=23 課程: Moodle平台使用123] (需註冊為會員)
** [http://moodle.club.tw/moodle/course/view.php?id=23 課程: Moodle平台使用123] (需註冊為會員)
** [http://163.20.160.21/xoops22/modules/tadbook2/index.php?op=view_one_book&book_sn=1 Moodle線上教學平台 電子書] - 簡介Moodle  (ISBN 9861256598) 及 [http://tpc.k12.edu.tw/1001216482/index.html Moodle 1.5.3 架站錄影教學]
** [http://tpc.k12.edu.tw/1001216482/index.html Moodle 1.5.3 架站錄影教學] Thanks! [http://163.20.160.21/xoops22/  歐展嘉老師]


for moodle site administrators or developes
* PHP Cross Reference of Moodle([xRef]): [http://xref.schoolsict.net/moodle/2.2/nav.html?index.html Moodle 2.2], [http://xref.moodle.org/nav.html?index.html Moodle 1.9.9]
* [http://docs.moodle.org/en/Release_Notes Release Notes]
* [http://phpdocs.moodle.org/ Moodle Technical Documentation (phpdocumentor)]
* [http://tracker.moodle.org/browse/MDL Moodle tracker]([http://tracker.moodle.org/secure/IssueNavigator.jspa?mode=show&createNew=true search issues])


=== Who use Moodle ===
=== Who use Moodle ===
* [http://enjoy.phy.ntnu.edu.tw/ 科學園]及其他有登記在Moodle官方網站的臺灣[http://moodle.org/sites/index.php?country=TW 網站清單]
* [http://enjoy.phy.ntnu.edu.tw/ 科學園]及其他有登記在Moodle官方網站的臺灣[http://moodle.org/sites/index.php?country=TW 網站清單]
: or my bookmarks tagged with [http://del.icio.us/planetoid/moodle+courses moodle+courses]
: or my bookmarks tagged with [http://delicious.com/planetoid/moodle+courses moodle+courses]


== install web server ex: AppServ or XAMPP ==
== install web server ex: AppServ or XAMPP ==
Line 25: Line 30:


== install Moodle ==
== install Moodle ==
official document: http://docs.moodle.org/en/Installing_Moodle
=== AppServ ===
=== AppServ ===
download appserv AddOns for Moodle from AppServ Open Project
download appserv AddOns for Moodle from AppServ Open Project
Line 53: Line 60:
** '''note''': the path of data should be file:\\aaa\\data at MS Windows
** '''note''': the path of data should be file:\\aaa\\data at MS Windows
* move the {moodle}/theme/{cstomized theme files}
* move the {moodle}/theme/{cstomized theme files}
== backup Moodle ==
* moodle php or webpage files
* moodledata files which uploaded by users
* moodle database
=== debug Moodle ===
SQL syntax
<pre>
SELECT *
FROM  `mdl_config`
WHERE  `name` LIKE  '%debug%'
</pre>
value of
* debug: Debug messages
** 0 (NONE: Do not show any errors or warnings) ->
** 6143 (ALL: Show all reasonable PHP debug messages) {{exclaim}} 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
{{exclaim}} 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 ==
== secure the phpMyadmin ==
* password protected
* password protected: change the root password




Line 61: Line 95:
=== 系統設定 » Variables ===
=== 系統設定 » Variables ===
* lang: en -> zhtw_utf-8 ('''Recommend:''' Download the lang pack from official website by yourself not your moodle.)
* lang: en -> zhtw_utf-8 ('''Recommend:''' Download the lang pack from official website by yourself not your moodle.)
* langlist: en, zh_tw_utf8
* 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:
<pre>
English: http://moodle.site/?lang=en
Traditional Chinese: http://moodle.site/?lang=zh_tw_utf8
</pre>
* (optional) slasharguments: file.php?file=/pic.jpg
* (optional) slasharguments: file.php?file=/pic.jpg
* smtphosts: ISP?
* smtphosts: ISP?
Line 71: Line 109:
  $CFG->dirroot  = 'C:\AppServ\www\moodle';
  $CFG->dirroot  = 'C:\AppServ\www\moodle';
  -> $CFG->dirroot = "c:\appserv\www\moodle";
  -> $CFG->dirroot = "c:\appserv\www\moodle";


=== secure the config.php ===
=== secure the config.php ===
Line 81: Line 118:
* download from http://moodle.org/download/modules/moodle-cron-for-windows.zip
* 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
* add the URL of path/to/cron.php to HKEY_LOCAL_MACHINE\SOFTWARE\MoodleCron\Sites
: 新增 -> 字串值
: more on [http://docs.moodle.org/en/Cron Moodle docs: Cron]
: more on [http://docs.moodle.org/en/Cron Moodle docs: Cron]


==== method2 (not require the admin permission) ====
==== method2 (not require the admin permission) ====
* download the [http://gnuwin32.sourceforge.net/packages/wget.htm wget for windows]
* download the [http://gnuwin32.sourceforge.net/packages/wget.htm wget for windows]<ref>[http://docs.moodle.org/23/en/Cron_with_Windows_OS Cron with Windows OS - MoodleDocs]</ref><ref>[http://www.rememberthemilk.com/forums/tips/4662/?hl=zh-TW Remember The Milk - Forums / Tips & Tricks / Automatic backup (Windows script)]</ref>
* create the cron.bat as follows  
* create the cron.bat as follows  
<pre>REM -- run Moodle cron job
<pre>REM -- run Moodle cron job
Line 94: Line 132:
<pre>path/to/hstart.exe /NOCONSOLE /IDLE path/to/cron.bat </pre>
<pre>path/to/hstart.exe /NOCONSOLE /IDLE path/to/cron.bat </pre>


reference: [http://www.rememberthemilk.com/forums/tips/4662/?hl=zh-TW Remember The Milk - Forums / Tips & Tricks / Automatic backup (Windows script)]
=== 開放訪客註冊 ===
* 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. ===
* find php.ini file
<pre>
original: display_errors = On
after: display_errors = Off
</pre>
 
* restart the apache service


== modify the translation file ==
== modify the translation file ==
Line 100: Line 150:


== optional ==
== optional ==
=== setup the default course block for new course ===
* suggest to add the [http://docs.moodle.org/en/Messages_block '''Messages''' block]
* ref:  [http://docs.moodle.org/en/Administration_hacks#Set_default_course_blocks_rather_than_using_sticky_blocks]


=== move the data to another HD ===
=== move the data to another HD ===
Line 117: Line 170:
* modify the {moodle}/theme/{default_theme_name}/footer.html
* modify the {moodle}/theme/{default_theme_name}/footer.html
* insert the tracking script ex: [http://www.google.com/analytics/ Google analytics] codes
* insert the tracking script ex: [http://www.google.com/analytics/ Google analytics] codes


== other notes ==
== other notes ==
=== Moodle Assign roles for 1.7.x ===
[[Moodle Assign roles]] for 1.7.x
[[Moodle Assign roles]] for 1.7.x


Moodle wiki syntax (markup)
=== Moodle wiki syntax (markup) ===
* CamelWord
* CamelWord
* Free link
* Free link
** <pre>[Free_link]</pre>
** <pre>[Free_link]</pre>
** or <pre>[Description | Free_link]</pre>
** or <pre>[Description | Free_link]</pre>
=== forgot the specified theme ===
SELECT  `value` FROM mdl_config WHERE  `name` =  'theme' /*execute SQL command in Moodle 1.99+ database*/;


[[Category:Software]] [[Category:elearning]] [[Category:OSS]] [[Category:LMS]]
[[Category:Software]] [[Category:elearning]] [[Category:OSS]] [[Category:LMS]]
== References ==
<references/>

Latest revision as of 17:10, 10 July 2022

for moodle users or teachers

for moodle site administrators or developes

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

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) Icon_exclaim.gif 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


Icon_exclaim.gif 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]

新增 -> 字串值
more on Moodle docs: Cron

method2 (not require the admin permission)[edit]

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]

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*/;


References[edit]