查看“Moodle tips”的源代码
来自Ubuntu中文
←
Moodle tips
跳到导航
跳到搜索
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
== Prepare your server == *Moodle is meant to be run on a [[Ubuntu:All#Servers|server]]. It requires Apache2, the PHP scripting language, and a database (either MySQL or postgreSQL). While many users feel postgreSQL is a better database, MySQL is more widely used and is easier for first time users (since there are many integrated packages that use it). A LAMP server (Linux, Apache2, MySQL, PHP) can easily be installed: sudo tasksel install lamp-server When installing the LAMP server, note the MySQL root password carefully. This will be required during Moodle installation. *Moodle must know where the server is located. (You must also have a way for other users to reach it.) The FQDN (Fully Qualified Domain Name) refers to the location of the server on which the Moodle database is located. In general, there are two options: localhost (meaning the database will be located on the same computer on which Moodle will be installed) or a URL. (Of course, the URL could still refer to the same computer). Don't worry, whichever option you choose can be changed later. For initial installation, it is easiest to use localhost as the FQDN (and also wherever it is available as an installation option). == Installation == {{Moodle installation}} == Set up a virtual server == The whole point of Moodle is that users can access it over a network. The easiest way is to set up a URL for your server so that users can reach Moodle using the URL. Several steps are necessary. *Make sure the server on which Moodle is running has a [[Ubuntu:All#Set_a_static_IP_address|static IP address]] on the LAN. *If you have a router on your network, forward incoming traffic on ports 80 and 443 (http and https) from the router to the (static) LAN IP address of the server hosting Moodle. *The [[Ubuntu:All#Firewall|firewall]] on the Moodle server should allow all incoming traffic on ports 80 and 443. *A URL for your Moodle site should have been established with a DNS name server on the Internet. It is possible to [[Ubuntu:All#Using Dynamic IP addresses for a webserver|use a Dynamic DNS server]], as well. An example URL is ''mymoodleserver.dyndns.org''. *A virtual host file in /etc/apache2/sites-available must be created for Moodle. cd /etc/apache2/sites-available sudo cp default ''moodlevirtualhost'' ::It should be edited (sudo gedit /etc/apache2/sites-available/''moodlevirtualhost'') to look like <VirtualHost *:80> ServerAdmin webmaster@''mymoodleserver.dyndns.org'' # DocumentRoot /usr/share/moodle/ ServerName ''mymoodleserver.dyndns.org'' ServerAlias www.''mymoodleserver.dyndns.org'' ''mymoodleserver.dyndns.org'' #RewriteEngine On #RewriteOptions inherit </VirtualHost> Notes: The Rewrite options are listed here only for forward compatibility with Apache rewrite rules. They are only used for multi-site installations and can, in general, remain commented out (with the #). *The virtual host file should be linked to /etc/apache2/sites-enabled and apache2 restarted (sudo etc/init.d/apache2 restart). sudo ln -s /etc/apache2/sites-available/''moodlevirtualhost'' /etc/apache2/sites-enabled *Edit the /etc/moodle/config.php file (sudo gedit /etc/moodle/config.php) so that the FQDN (in this case the URL) is correctly noted. $CFG->wwwroot = 'http://''mymoodleserver.dyndns.org''/moodle'; *Login to the Moodle server: ::http://''mymoodleserver.dyndns.org'' == Add a custom theme to Moodle == *Find free Moodle themes [http://moodle.org/mod/data/view.php?id=6552 here]. Also check out [http://moodle.org/mod/data/view.php?d=26&rid=1567 this theme tip]. *Download one. Extract the zip file (by clicking on the filename in Nautilus, for example). *Copy the extracted folder to /usr/share/moodle/theme *From Moodle, install the new theme: :Moodle -> Appearance -> Themes -> Theme Selector *Copy a custom footer logo (ideal size 55px x 55px) to /etc/moodle and name it ''moodlelogo55.png''. Link this file to the Moodle pix folder: sudo ln -s /etc/moodle/''moodlelogo55.png'' /usr/share/moodle/pix *The front page footer logo can then be changed by editing: sudo nano /usr/share/moodle/lib/weblib.php and editing the $homelink values from <pre> $homelink = '<div class="sitelink">'. '<a title="Moodle '. $CFG->release .'" href="http://moodle.org/">'. '<img style="width:100px;height:30px" src="pix/moodlelogo.gif" alt="moodlelogo" /></a></div>'; </pre> :to <pre> $homelink = '<div class="sitelink">'. '<a title="My Home Page" href="http://myhomepage.org/">'. '<img style="width:55px;height:55px" src="pix/moodlelogo55.png" alt="mylogoname" /></a></div>'; </pre> where ''My Home Page'', ''<nowiki>http://myhomepage.org</nowiki>'', ''moodlelogo55.png'', and ''mylogoname'' are examples, of course. <!---> === Remove ads from theme footer === To remove the ads from a Themza (such as the ability-to-learn) footer: The ads are encoded into the config.php file inside the theme folder using base64. The simplest way to disbale the ads is to open the config.php file from the ability-to-learn folder in an editor and remove the code within the ' '. This may not be the professional way, but it gets the job done. *Change line 143 from this: $THEME->resources = base64_decode('Jm5ic3A7PGEgaHJlZj0iaHR0cDovL3d3dy50aGVtemEuY29tL21vb2RsZS9hYmlsaXR5LXRvLWxlYXJuL mh0bWwiIHRhcmdldD0iX2JsYW5rIiB0aXRsZT0iQWJpb Gl0eSB0byBMZWFybiI+RnJlZSBNb29kbGUgVGhlbWU8L2E+IDxhIGhyZWY 9Imh0dHA6Ly93d3cubnRjaG9zdGluZy5jb20iIHRhcmdldD0iX2JsYW5rIiB0aXRs ZT0iZWNvbW1lcmNlIHdlYiBob3N0aW5nIj 5hZmZvcmRhYmxlIHdlYiBob3N0aW5nPC9hPg=='); :To this: $THEME->resources = base64_decode(''); <---> == Upgrading Moodle == *See [http://docs.moodle.org/en/Upgrading this Moodle Upgrade instruction page] for introductory details. *Copy the Moodle software directory as a backup: sudo cp -r /usr/share/moodle /usr/share/moodle_bak *Copy the Moodle data directory as a backup: sudo cp -r /var/lib/moodle /var/lib/moodle_bak *Copy the local Moodle configuration directory as a backup: sudo cp -r /etc/moodle /etc/moodle_bak *Dump your MySQL database content: mysqldump -u ''username'' -p -C -Q -e --create-options moodle > moodle-backup-2010-04-01.sql where ''username'' is the database MySQL user account name used to create the Moodle database during Moodle installation. The corresponding Moodle database password will be requested. (If you have forgotten these, they are recorded in the /etc/moodle/config.php file as $CFG->$dbuser and $CFG->$dbpass). *Download and unzip the current Moodle package: <!---> cd /usr/share<---> sudo wget <nowiki>http://download.moodle.org/download.php/direct/stable19/moodle-weekly-19.zip</nowiki> sudo unzip moodle-weekly-19.zip sudo rm moodle-weekly-19.zip *Copy the new, extracted /moodle folder contents into the original /usr/share/moodle folder, overwriting the files there. yes | sudo cp -r moodle/* /usr/share/moodle Note: This method ensures that any files you have previously added, but for which no updates are available, remain in the /usr/share/moodle folder. *Make sure there is a symbolic link from your original config.php file in /etc/moodle to /usr/share/moodle. If not, create one: sudo ln -s /etc/moodle/config.php /usr/share/moodle *There is a minor error in the version.php module numbering scheme from one version to the next. Edit the version.php file: sudo nano /etc/moodle/version.php :Change the line $version = 2007101571.04; :to $version = 2007101597.04; Note: The new version number specified in $version must at least be greater than the $version number found in the version.php file located in the backup folder for the previous moodle installation (now presumably at /user/share/''moodle_bak''/version.php). *Login to your Moodle site (as an administrator) and load the new system: :Moodle -> Site Administration -> Notifications (Make sure to click on Notifications) = Site Building = == Using BigBlueButton with Moodle == * See [[BigBlueButton#Using_BigBlueButton_with_Moodle|this section]]. == Using Skype with Moodle == <!---> === Start Skype from Moodle === I'm not quite sure what utility this module provides. * See [http://moodle.org/mod/data/view.php?d=13&rid=1108 this Moodle thread]. * Download and install the Skype plugin to the Moodle directory: cd /usr/share/moodle/mod sudo wget <nowiki>http://download.moodle.org/plugins/mod/skype.zip</nowiki> sudo unzip skype.zip sudo rm skype.zip *Log in to the Moodle site (as an administrator) and load the module through Notifications: :Moodle -> Site Administration -> Notifications (Make sure to click on Notifications) *Add Skype as an activity: -> Add an activity... -> Skype -> <---> === Add Skype Block === == Adding quotations to a block == === Add a Quotation of the Day block === *See [http://moodle.org/mod/forum/discuss.php?d=41547 this Moodle forum thread]. <!---> === Using a Random Glossary Entry block Adding a random quotation (or aphorism) from a [http://docs.moodle.org/en/Category:Glossary glossary] of quotations is accomplished using the "Random Glossary Entry" block available (by default) in Moodle. *Create a Moodle [http://docs.moodle.org/en/Adding/editing_a_glossary Glossary]. <--->
该页面使用的模板:
模板:Moodle installation
(
查看源代码
)
返回
Moodle tips
。
导航菜单
页面操作
页面
讨论
阅读
查看源代码
历史
页面操作
页面
讨论
更多
工具
个人工具
登录
导航
首页
最近更改
随机页面
页面分类
帮助
搜索
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息