Note: You are currently viewing documentation for Moodle 3.0. Up-to-date documentation for the latest stable version of Moodle may be available here: Administration FAQ.

Administration FAQ: Difference between revisions

From MoodleDocs
 
(46 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{Installing Moodle}}==Changing text in Moodle==
{{Managing a Moodle site}}


The language editing interface in ''Administration > Language> [[Language_customization|Language customisation]]'' enables you to easily change any word or phrase used on the site.  You may need to search through several files to find the word or phrase you are looking for. The file moodle.php contains all common site-wide phrases and the admin.php contains many admin phrases.
==Common questions==
===How do I find the version of Moodle currently installed?===
See the [[Moodle version]] information on the ''Site Administration > Notifications'' page.


== How do the limits on uploaded files work? ==
=== I have forgotten the admin password ===
 
First, try using the Forgotten password link (if you have one on your site.)
 
It is possible to reset the admin user's password using [[Administration_via_command_line#Reset_user_password|command line tools]] provided with Moodle.
 
Failing that, if you can access the database using an administration tool, you can modify a password there. Passwords for all users, including admin, are stored as cryptographic hashes in the table ''mdl_user''. You can manually replace the old hash with md5 value of the new password, it will be upgraded to the strong hash value after the first log-in.
 
===How do I prevent users from logging in while I do maintenance?===
 
Use one or the other of the two methods for [[Maintenance_mode|Maintenance mode]] to do this.
 
===My site is stuck in maintenance mode===
 
Sometimes Moodle gets stuck in maintenance mode and you'll see the message "This site is undergoing maintenance and is currently unavailable" despite your attempts to turn-off maintenance mode.
 
When you put Moodle into maintenance mode it creates a file called maintenance.html in moodledata/maintenance.html (the site files folder). To fix this try the following:
 
* Check that the web server user has write permissions to the moodledata folder.
* Manually delete the maintenance.html file.
 
===How can I change the domain name or URL of the Moodle site?===
 
The base URL of your site is set in the config.php file setting wwwroot. All dynamic links (e.g. course and activity URLs) are built by prefixing this setting on the fly. These are known as "relative links."
 
Your Moodle site may also contain "absolute links" to resources which point to the previous URL, if you or anyone has copy/pasted the links into activities like Pages, or other locations in Moodle. These are text strings just like any text or link to a web site.
 
To change such absolute in bulk, Moodle contains a utility called [[Search_and_replace_tool|Search and replace]] to change all the links to the new URL. To change this login as admin and enter http://yoursite.com/admin/tool/replace/index.php in your browser address bar. Fill in your old base url and new base in the boxes and run the utility.
 
If you change the domain name of your site, there may be work you need to do on your web server and/or DNS settings as well to configure it to understand the new domain. See [[Moodle_migration|Migration]] for more tips.
 
[[File:searchandreplacecommandlinetool_interface_m30.png|Search and replace interface screenshot]]
 
=== My log table has disappeared - No logs found! ===
The most likely cause is that the mdl_log table has become corrupted. See the [[How to check your database for corruption]]. NOTE: A new logging system has been i place since Moodle 2.7 as an option. Be sure to check in ''Site administration > Plugins > Logging > Manage log stores'' to see whether you are still using the old style logging, Legacy log, or the Standard log.
 
===How do I repair a corrupted Moodle database?===
Typically, you might see an error message like './moodle/mdl_quiz_grades' is marked as crashed and should be repaired. See [[How to check your database for corruption]] for the solution.
 
===How do I change spellings like 'enrol' to 'enroll'?===
 
This is controlled by your language pack and default language. In this case, you are probably using the default Moodle language pack 'en' which is common (and sometimes specifically Austrialian) spellings. If you need American English, add the en_us language pack and set it as the default.
 
== Site policies and settings ==
 
=== How do the limits on uploaded files work? ===


See [[File upload size]] for more information.   
See [[File upload size]] for more information.   
Line 9: Line 56:
File upload sizes are restricted in a number of ways - each one in the list restricts the following ones.
File upload sizes are restricted in a number of ways - each one in the list restricts the following ones.


1. Firstly, there is a setting in Apache 2 which you may need to change. On Redhat this setting is very low by default, you can change the limit by adding or editing a line in Apache's ''/etc/httpd/conf/httpd.conf'' and/or ''/etc/httpd/conf.d/php.conf'' with the upload size in bytes (different operating systems may have these files in different locations):
1. Not very likely these days (i.e. check if the other settings don't work), there is a setting in Apache 2 which you may need to change. You can change the limit by adding or editing a line in Apache's ''/usr/local/apache2/conf/httpd.conf'' with the upload size in bytes (check your operating system's documentation for the correct location - e.g. under /etc/apache2 is a common alternative):


  LimitRequestBody 10485760
  LimitRequestBody 10485760


2. PHP also has two more byte limits, which you can set in ''php.ini'' and sometimes in a ''.htaccess'' file. If you try to set these in .htaccess the entries will look like this:
2. PHP also has limits. If you have access to it they are set in your site-wide '''php.ini''' file. On shared hosting you may be able to set these in a ''.htaccess'' file or a ''php.ini''. You are recommended to check with your hosting company how this works on their systems.


php_value upload_max_filesize 50000000
In a php.ini file the lines will look something like:
php_value post_max_size 50000000
<pre>
    upload_max_filesize 64M
    post_max_size 64M
</pre>


Copy the updated php.ini file to the following five folders:
...in .htaccess the entries will look like this:
<code>
php_value upload_max_filesize 64M
php_value post_max_size 64M
</code>


An .htaccess file usually can be placed in the root of your Moodle install and will affect the whole Moodle. A (non site-wide) php.ini file may need to be copied into all the directories it needs to affect. The following are a good start:
     * public_html
     * public_html
     * moodle/admin
     * moodle/admin
     * moodle/course
     * moodle/course
     * moodle/files
     * moodle/files
    * moodle/repository
     * root of your moodledata directory
     * root of your moodledata directory


To convert from Bytes to Megabytes use [http://www.onlineconversion.com/computer.htm this convertor ]
Please note that a server re-start may be required for the above changes to take effect.


Please note that a server re-start may be required for the above changes to take effect.
3. Moodle has a site-wide limit called maxbytes that may be set in ''Site Administration > Security > Site Policies > Maximum uploaded file size''. The default here is (site limit) which it reads from the php.ini files You can set this lower if you wish for Moodle itself but don't set it lower than the largest possible file you will be uploading


3. Moodle has a site-wide limit called maxbytes that may be set in Site Administration  block > Security > Site Policies > Maximum uploaded file size. In older version it is located in ''Administration > Configuration > [[admin/config|Variables]]''.
To find out the server limit setting in php.ini (without server access, just using the Moodle administration interface), see ''Site Administration > Server > PHP info'' (Tip: search for filesize)


4. A limit may be set by teachers in the [[course/edit|Course settings]].
4. You should usually set the default for all newly created courses to something lower than the site limit. This is set in ''Site administration > Courses > Course default settings > Maximum upload size''. Inside each course, this then may be individually set or changed for that course as needed by the usual teacher role in [[course/edit|Course settings]].


5. Activity modules such as [[Forums]] and [[Assignments]] have their own limits which may be set when adding or editing the activity.
5. Activity modules that can be set to allow students to upload files to them, such as [[Forums]] and [[Assignments]], have their own limits which may be set when adding or editing the activity.


'''See also'''
'''See also'''
Line 41: Line 97:
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=97907 Instructions to increase maximum allowed size on hosted servers] forum discussion
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=97907 Instructions to increase maximum allowed size on hosted servers] forum discussion
* [[File_upload_size|File Upload Size]] page
* [[File_upload_size|File Upload Size]] page
* Instructions below on How to change the maximum execution time
* Instructions below on [https://docs.moodle.org/30/en/Administration_FAQ#How_to_change_the_maximum_execution_time How to change the maximum execution time]


== How to change upload file size on a Windows localhost==
=== How to change upload file size on a Windows localhost===
In a localhost (using a [[Complete install packages for Windows]] on a computer) for 1.6 it is easy to change the uploaded file size to something larger than the default 16M.  
In a localhost (using a [[Complete install packages for Windows]] on a computer) it is easy to change the uploaded file size to something larger than the default 16M.  


Here is an example of how to change the upload file size to 100M.
Here is an example of how to change the upload file size to 100M.
Line 62: Line 118:
* Instructions below on How to change the maximum execution time
* Instructions below on How to change the maximum execution time


== How to change the maximum execution time ==
=== How to change the maximum execution time for file uploads ===


A side-effect of increasing the file upload limit is that the php scripts may execute beyond the limit set by default (300 seconds/5 minutes). To change this, look for max_execution_time in php.ini and change to something like this:
A side-effect of increasing the file upload limit is that the php scripts may execute beyond the limit set by default (300 seconds/5 minutes). To change this, look for max_execution_time in php.ini and change to something like this:
Line 74: Line 130:
Restart your webserver for these changes to take effect, and check that the values have been changed by looking at your phpinfo output in the moodle admin -> environment page.
Restart your webserver for these changes to take effect, and check that the values have been changed by looking at your phpinfo output in the moodle admin -> environment page.


== I have forgotten the admin password ==
==Logging in and out==
Firstly, try using the button "Send my details via email". Otherwise, you will need to access the database using MySQL admin. Passwords for all users, including admin, are stored encrypted in the table ''mdl_user''. Copy the guest password (guest) into the admin password field then login using it.
===My site is logging users out to quickly===
User login sessions are checked to see if the user is still active, and will log them out after a specific period of idleness. This is set in ''Site administration > Server > Session handling > Timeout''. The default is two hours. Increase it if you need to.


Additional solutions are detailed in the discussions [http://moodle.org/mod/forum/discuss.php?d=18103 change admin's password] and [http://moodle.org/mod/forum/discuss.php?d=4552&parent=38070 login/password].
===Users can not login, they need cookies and debug mentions config.php===
Your site's [[Configuration file|config.php file]] probably has extra lines after '''?>'''. Solution is to delete the last '''?>'''.


== My log table has disappeared - No logs found! ==
===After using the 'Login as' function, why am I logged out of Moodle?===
The most likely cause is that the mdl_log table has become corrupted. See the [[How to check your database for corruption]].
This is by design. After using the 'Login as' function, for security reasons you are automatically logged out of Moodle when you return to your normal role. If you login again you will be redirected to the page that you were on previously.  


==My style sheet changes aren't showing up==
==Text and Appearance==
===Why do I see <nowiki>[[missing strings]]</nowiki>?===
Double square brackets around text indicate that language strings are missing for that function for that language. This is most common with third-party plugins or for languages that may not have all the strings translated for it yet.


Browsers usually cache style sheets and so a forced refresh (CTRL + F5) is required before any changes show up.
First update your language packs to the latest versions in ''Site administration > Language > [[Language packs]] > Update all installed language packs''.  


== Site-wide scales ==
If the missing strings are for a non-standard plugin, try to update that plugin and / or check with that plugin maintainer to see if this is a reported issue. If you have access to the server code, you can check the code for this plugin; language strings are supposed to be contained in a ''lang'' folder within the module or plugin folder.  
*To add a site-wide scale, available in all courses, go to ''Settings>Site administration>Grades>Scales'' and click the button "Add a new scale".
*As an administrator you also have the right to add site-wide scales within a course by going to ''Settings>Course administration>Grades>Scales''. (A regular teacher cannot do this.)


==Why do I see <nowiki>[[missing strings]]</nowiki>?==
Note: after changing language strings you may see a lag in the cache for these to show up. You can force this in ''Site administration > Development > Purge all caches''.


Double square brackets around text indicate that language strings are missing. Try checking for untranslated words or phrases in ''Administration > Language > [[Language editing]]'' and update local language packs in ''Administration > Language > [[Language packs]]'' (or ''Administration > Configuration > Language'' in Moodle 1.6).
===Changing text in Moodle===


Language strings for non-standard modules and plugins are generally contained in a ''lang'' folder within the module or plugin folder. For sites which have migrated to UTF-8, it may be necessary to re-name the folder e.g. ''en'' should be re-named ''en_utf8''.
The language editing interface in ''Administration > Language > [[Language customisation]]'' enables you to easily change any string, any word or phrase, used on the site.


==How do I find the version of Moodle currently installed?==
The strings are stored per language pack. So if you change them for 'en' (common English), that will not change them for 'en_us' (US English) or any other language.  
See the [[Moodle version]] information.


==How do I repair a corrupted Moodle database?==
You may need to search through several files to find the word or phrase you are looking for. The file moodle.php contains all common site-wide phrases and the admin.php contains many admin phrases. Tip: if you don't know the file the string is in, select ALL the file options to search through.


Typically, you might see an error message like './moodle/mdl_quiz_grades' is marked as crashed and should be repaired. See [[How to check your database for corruption]] for the solution.
Also, these customisations override but do not delete the default language strings but are stored separately in the language folders in your site's moodledata location.  


==My site is stuck in maintenance mode==
===My style sheet or other theme changes aren't showing up===


Sometimes Moodle gets stuck in maintenance mode and you'll see the message "This site is undergoing maintenance and is currently unavailable" despite your attempts to turn-off maintenance mode. When you put Moodle into maintenance mode it creates a file called maintenance.html in moodledata/1/maintenance.html (the site files folder). To fix this try the following:
Browsers usually cache style sheets and so a forced refresh in your browser is required before any changes show up.


* Check that the web server user has write permissions to the moodledata folder.
The Moodle server also caches all styles. You can force a refresh of the cache from disk in ''Site Administration>Appearance>Themes>Theme selector'', click "Clear theme caches".
* Manually delete the maintenance.html file.


==Incomplete page displayed when I click "Turn Editing On"==
===How can I change center of the Front Page from course categories to something else?===
When you see an incomplete page, it is normally a sign that an error occurred. To find out more, turn on [[Debugging]], and you should see an error message which may help you to diagnose the problem.


This is usually as a result of an incompatible contributed module or block that you have installed. Follow these steps:
Go to Front Page > Settings and change "Front page" to None all down. Change "Front page items when logged in" to None all down. Ensure that "Include a topic section" is checked. Save changes and return to the front page. Turn editing on, obviously, and you should now see the "Add a resource" and "Add an activity" drop down combo-boxes. Select "Add a resource" and select "Insert a label". You can then edit the label in any way you want to in the WYSYWYG editor.
#Follow the module removal instructions in [[Installing contributed modules or plugins]].
#Re-visit your course page and try clicking on the "Turn Editing On" button again.  


If you find an incompatible module or block, please report the problem to the person named as the maintainer in the [http://moodle.org/mod/data/view.php?id=6009 Modules and Plugins database].
===How can I change the initial login screen?===
Edit one of the language files.  ''Site  administration > Language> Language customisation'', look in the moodle.php file. Look for ''loginusing''  or ''loginsteps'' or ''loginstepsnone'' string variables.


=="a request parameter (id) was missing" when uploading a file==
===How can I change the initial login screen help?===


This message sometimes is generated when attempting to upload a file larger than the upload limit.
To change or add a help message for the login go to ''Site administration > Plugins > Authentication > Manage authentication.'' Type your help message in there in the'' Instructions'' text box.


==How can I change the URL of the moodle service==
==Errors and Troubleshooting==


You should configure your Apache server, at httpd.conf, using Listen, Port and DocumentRoot directives and Directory section. After restarting Apache, you also must open config.php in a text editor, and change the line:
===How do I enable/disable debugging?===
    $CFG->wwwroot  = 'http://mydomain/testmoodle';
If you are getting a blank or partially complete page, or receive a page that presents a short error message that is not informative enough, you can turn on debugging to learn more details.


Your Moodle site will also contain absolute links to resources which point to the previous URL. To change this see the [[Moodle_migration#Migrating_a_complete_Moodle_site | migrating a complete Moodle site]] instructions.
Turning on debugging will let you see what the error message is, which may help you diagnose the problem. Set this in ''Site administration > Development > Debugging'' - see [[Debugging]] for more.


'''See also''': [http://moodle.org/mod/forum/discuss.php?d=51667 Forum discussion]
===Incomplete page displayed when I click "Turn Editing On"===
When you see an incomplete page, it is normally a sign that an error occurred. To find out more, turn on [[Debugging]], and you should see an error message which may help you to diagnose the problem.


==Why is the Moodle Registration button still displayed after I register my site?==
This is usually as a result of an incompatible contributed module or block that you have installed. Follow these steps:
The registration button is provided so that you can place your moodle site to the http://www.moodle.org/sites list. Before registering, the button is displayed at the top of the Site Administration -> Notifications page. Once you have successfully registered, this is moved to the bottom of the same page. The button remains there so that you can update the details of your registration.
#Follow the module removal instructions in [[Installing contributed modules or plugins]].
#Re-visit your course page and try clicking on the "Turn Editing On" button again.  


If the registration process fails for some reason to complete fully, there are two methods of letting your local Moodle install know that you have registered:
If you find an incompatible module or block, please report the problem to the person named as the maintainer in the [https://moodle.org/plugins/ Modules and Plugins database].


* The preferred method is to use your mysql client program to execute these commands (assuming your Moodle database is called "moodle"):
=== Receive error message "a required parameter (id) was missing" when uploading a file or ===
mysql> USE moodle;
mysql> INSERT INTO mdl_config (name,value) VALUES ('registered',unix_timestamp());


* Alternatively, edit your <nowiki>moodle/config.php</nowiki> file and add this line:
This message sometimes is generated when attempting to upload a file larger than the upload limit. This can also be caused by user's having more than one login to the same site open in the same browser in different windows or tabs.  
$CFG->registered = '9999999999';
:Note that this line in your config.php will stop the reminders about re-registering.


For an explanation of the idea behind the button see [http://tracker.moodle.org/browse/MDL-7359 MDL-7359] in the moodle tracker.
===User gets 'an invalid session key' error===


For an explanation of how sites are checked see [[Verification_of_sites_on_moodle.org | the site verification page]]
A number of things may caused the invalid session key error. The most common is if the person tries to login into the same Moodle site in more than one tab or window in the same browser. That will not work. The fix is to close all those tabs and windows and close and restart the browser. This is almost always a transient issue. The fix is to close and restart the browser, and log back into Moodle.


==How do I enable/disable debugging?==
If you send someone a URL to something in Moodle, like a course activity or particular page, is may be that the session id key is tacked onto the end of the URL. Simply delete that parameter from the URL.
See [[Debugging]]. If you are getting a blank or partially complete page, it is probably a sign that an error is occurring. Turning on debugging will let you see what the error message is, which may help you diagnose the problem.


 
===Why is a page blank, or half missing?===
==I cannot login to the Moodle CVS servers==
 
When attempting to login to the Moodle CVS servers, you may receive a "login aborted" error as shown below (this example shows the eu cvs server, with the command in bold):
 
C:\gnuwin32>'''cvs -d:pserver:anonymous@eu.cvs.moodle.org:/cvsroot/moodle login'''
Logging in to :pserver:anonymous@eu.cvs.moodle.org:2401/cvsroot/moodle
CVS password: <- (blank password entered)
cvs [login aborted]: connect to uk.cvs.moodle.org(212.219.207.198):2401 failed:
Connection refused
C:\gnuwin32>
 
To fix this problem, check that you have entered the CVS command correctly and that port 2401 is open on your firewall.
 
==Why is a page blank, or half missing?==


A blank page, or a page that seems to have half missing, is normally a sign that an error occurred. If (as is recommended on production systems) you have display of error messages turned off, it can be very hard to understand what is going on.
A blank page, or a page that seems to have half missing, is normally a sign that an error occurred. If (as is recommended on production systems) you have display of error messages turned off, it can be very hard to understand what is going on.
Line 172: Line 210:
The solution is to [[Debugging|turn on the debugging options]] temporarily. Then, when you go back to the problem page, you should see the error message. Once you had finished solving the problem, remember to turn debugging off again.
The solution is to [[Debugging|turn on the debugging options]] temporarily. Then, when you go back to the problem page, you should see the error message. Once you had finished solving the problem, remember to turn debugging off again.


==How can I fix just one bug, without upgrading my whole site?==
===How can I fix just one bug, without upgrading my whole site?===


Suppose:
Suppose:
Line 179: Line 217:
* For some reason, you cannot upgrade your whole site, even though the latest version probably has security fixes.
* For some reason, you cannot upgrade your whole site, even though the latest version probably has security fixes.


Then, how can you get the fix for just this one bug, without upgrading your whole site? Well, if you are prepared to manually patch the code, you can probably get this information from the tracker. Please see [[How to fix just one bug without upgrading|this guide]].
Then, how can you get the fix for just this one bug, without upgrading your whole site? Well, if you are prepared to manually patch the code, you can probably get this information from the tracker. Please see [[How to fix just one bug without upgrading]] guide.
 
==How can I change centre of the Front Page from course categories to something else?==
 
Go to Front Page > Settings and change "Front page" to None all down. Change "Front page items when logged in" to None all down. Ensure that "Include a topic section" is checked. Save changes and return to the front page. Turn editing on, obviously, and you should now see the "Add a resource" and "Add an activity" drop down combo-boxes. Select "Add a resource" and select "Insert a label". You can then edit the label in any way you want to in the WYSYWYG editor.
 
==How can I change the initial login screen?==
Edit one of the language files.  ''Settings > Site  administration > Language> Language customisation'', look in the moodle.php file.  Look for ''loginusing''  or ''loginsteps'' or ''loginstepsnone'' string variables.
 
==How can I change the initial login screen help?==
 
To change or add a help message for the login go to ''Settings > Site administration > Plugins > Authentication > Manage authentication.'' Type your help message in there in the'' Instructions'' text box.
 
==Users can not login, they need cookies and debug mentions config.php==
Your site's [[Configuration file|config.php file]] probably has extra lines.  There should be '''no spaces or lines after the final ?>'''. 
 
:Hint: Sometimes blank lines are hard to see. Make sure they are not there.


==After using the 'Login as' function, why am I logged out of Moodle?==
== Miscellaneous ==


After using the 'Login as' function, for security reasons you are automatically logged out of Moodle when you return to your normal role. If you login again you will be redirected to the page that you were on previously.


==See also==
==See also==
Line 206: Line 226:
* [[Errors FAQ]]
* [[Errors FAQ]]
* [[Installation FAQ]]
* [[Installation FAQ]]
* [[Administration hacks]]
* [[Beginning_Moodle_2.0_Administration|Beginning Moodle 2.0 Administration FAQ]]


[[Category:FAQ]]
[[Category:FAQ]]
Line 213: Line 231:
[[es:FAQ Administración]]
[[es:FAQ Administración]]
[[fr:FAQ d'administration]]
[[fr:FAQ d'administration]]
[[pl:Administracja FAQ]]
[[ru:FAQ_по_администрированию]]
[[de:Administration FAQ]]
[[de:Administration FAQ]]

Latest revision as of 20:38, 20 October 2015


Common questions

How do I find the version of Moodle currently installed?

See the Moodle version information on the Site Administration > Notifications page.

I have forgotten the admin password

First, try using the Forgotten password link (if you have one on your site.)

It is possible to reset the admin user's password using command line tools provided with Moodle.

Failing that, if you can access the database using an administration tool, you can modify a password there. Passwords for all users, including admin, are stored as cryptographic hashes in the table mdl_user. You can manually replace the old hash with md5 value of the new password, it will be upgraded to the strong hash value after the first log-in.

How do I prevent users from logging in while I do maintenance?

Use one or the other of the two methods for Maintenance mode to do this.

My site is stuck in maintenance mode

Sometimes Moodle gets stuck in maintenance mode and you'll see the message "This site is undergoing maintenance and is currently unavailable" despite your attempts to turn-off maintenance mode.

When you put Moodle into maintenance mode it creates a file called maintenance.html in moodledata/maintenance.html (the site files folder). To fix this try the following:

  • Check that the web server user has write permissions to the moodledata folder.
  • Manually delete the maintenance.html file.

How can I change the domain name or URL of the Moodle site?

The base URL of your site is set in the config.php file setting wwwroot. All dynamic links (e.g. course and activity URLs) are built by prefixing this setting on the fly. These are known as "relative links."

Your Moodle site may also contain "absolute links" to resources which point to the previous URL, if you or anyone has copy/pasted the links into activities like Pages, or other locations in Moodle. These are text strings just like any text or link to a web site.

To change such absolute in bulk, Moodle contains a utility called Search and replace to change all the links to the new URL. To change this login as admin and enter http://yoursite.com/admin/tool/replace/index.php in your browser address bar. Fill in your old base url and new base in the boxes and run the utility.

If you change the domain name of your site, there may be work you need to do on your web server and/or DNS settings as well to configure it to understand the new domain. See Migration for more tips.

Search and replace interface screenshot

My log table has disappeared - No logs found!

The most likely cause is that the mdl_log table has become corrupted. See the How to check your database for corruption. NOTE: A new logging system has been i place since Moodle 2.7 as an option. Be sure to check in Site administration > Plugins > Logging > Manage log stores to see whether you are still using the old style logging, Legacy log, or the Standard log.

How do I repair a corrupted Moodle database?

Typically, you might see an error message like './moodle/mdl_quiz_grades' is marked as crashed and should be repaired. See How to check your database for corruption for the solution.

How do I change spellings like 'enrol' to 'enroll'?

This is controlled by your language pack and default language. In this case, you are probably using the default Moodle language pack 'en' which is common (and sometimes specifically Austrialian) spellings. If you need American English, add the en_us language pack and set it as the default.

Site policies and settings

How do the limits on uploaded files work?

See File upload size for more information.

File upload sizes are restricted in a number of ways - each one in the list restricts the following ones.

1. Not very likely these days (i.e. check if the other settings don't work), there is a setting in Apache 2 which you may need to change. You can change the limit by adding or editing a line in Apache's /usr/local/apache2/conf/httpd.conf with the upload size in bytes (check your operating system's documentation for the correct location - e.g. under /etc/apache2 is a common alternative):

LimitRequestBody 10485760

2. PHP also has limits. If you have access to it they are set in your site-wide php.ini file. On shared hosting you may be able to set these in a .htaccess file or a php.ini. You are recommended to check with your hosting company how this works on their systems.

In a php.ini file the lines will look something like:

    upload_max_filesize 64M
    post_max_size 64M

...in .htaccess the entries will look like this:

php_value upload_max_filesize 64M
php_value post_max_size 64M

An .htaccess file usually can be placed in the root of your Moodle install and will affect the whole Moodle. A (non site-wide) php.ini file may need to be copied into all the directories it needs to affect. The following are a good start:

   * public_html
   * moodle/admin
   * moodle/course
   * moodle/files
   * moodle/repository
   * root of your moodledata directory

Please note that a server re-start may be required for the above changes to take effect.

3. Moodle has a site-wide limit called maxbytes that may be set in Site Administration > Security > Site Policies > Maximum uploaded file size. The default here is (site limit) which it reads from the php.ini files You can set this lower if you wish for Moodle itself but don't set it lower than the largest possible file you will be uploading

To find out the server limit setting in php.ini (without server access, just using the Moodle administration interface), see Site Administration > Server > PHP info (Tip: search for filesize)

4. You should usually set the default for all newly created courses to something lower than the site limit. This is set in Site administration > Courses > Course default settings > Maximum upload size. Inside each course, this then may be individually set or changed for that course as needed by the usual teacher role in Course settings.

5. Activity modules that can be set to allow students to upload files to them, such as Forums and Assignments, have their own limits which may be set when adding or editing the activity.

See also

How to change upload file size on a Windows localhost

In a localhost (using a Complete install packages for Windows on a computer) it is easy to change the uploaded file size to something larger than the default 16M.

Here is an example of how to change the upload file size to 100M.

  • Find ../php/php.ini and open it with WordPad by right-clicking -> Open With -> then choose WordPad.
  • In this file scroll or do a search on the text "_max_" to find upload_max_filesize = 16M
  • Change that line to
upload_max_filesize = 100M
  • In the same way, find post_max_size = 16M
  • Change that line to
post_max_size = 100M
  • Save the file.

After any changes to the php.ini file you need to restart Apache. So restart xampp and browse to localhost. You should find that the Upload file size in Configuration now reads 100M.

See also

  • Instructions below on How to change the maximum execution time

How to change the maximum execution time for file uploads

A side-effect of increasing the file upload limit is that the php scripts may execute beyond the limit set by default (300 seconds/5 minutes). To change this, look for max_execution_time in php.ini and change to something like this:

max_execution_time = 600

If you are using Apache and have a .htaccess file to change php settings, add this line to your .htaccess file:

php_value max_execution_time 600

Restart your webserver for these changes to take effect, and check that the values have been changed by looking at your phpinfo output in the moodle admin -> environment page.

Logging in and out

My site is logging users out to quickly

User login sessions are checked to see if the user is still active, and will log them out after a specific period of idleness. This is set in Site administration > Server > Session handling > Timeout. The default is two hours. Increase it if you need to.

Users can not login, they need cookies and debug mentions config.php

Your site's config.php file probably has extra lines after ?>. Solution is to delete the last ?>.

After using the 'Login as' function, why am I logged out of Moodle?

This is by design. After using the 'Login as' function, for security reasons you are automatically logged out of Moodle when you return to your normal role. If you login again you will be redirected to the page that you were on previously.

Text and Appearance

Why do I see [[missing strings]]?

Double square brackets around text indicate that language strings are missing for that function for that language. This is most common with third-party plugins or for languages that may not have all the strings translated for it yet.

First update your language packs to the latest versions in Site administration > Language > Language packs > Update all installed language packs.

If the missing strings are for a non-standard plugin, try to update that plugin and / or check with that plugin maintainer to see if this is a reported issue. If you have access to the server code, you can check the code for this plugin; language strings are supposed to be contained in a lang folder within the module or plugin folder.

Note: after changing language strings you may see a lag in the cache for these to show up. You can force this in Site administration > Development > Purge all caches.

Changing text in Moodle

The language editing interface in Administration > Language > Language customisation enables you to easily change any string, any word or phrase, used on the site.

The strings are stored per language pack. So if you change them for 'en' (common English), that will not change them for 'en_us' (US English) or any other language.

You may need to search through several files to find the word or phrase you are looking for. The file moodle.php contains all common site-wide phrases and the admin.php contains many admin phrases. Tip: if you don't know the file the string is in, select ALL the file options to search through.

Also, these customisations override but do not delete the default language strings but are stored separately in the language folders in your site's moodledata location.

My style sheet or other theme changes aren't showing up

Browsers usually cache style sheets and so a forced refresh in your browser is required before any changes show up.

The Moodle server also caches all styles. You can force a refresh of the cache from disk in Site Administration>Appearance>Themes>Theme selector, click "Clear theme caches".

How can I change center of the Front Page from course categories to something else?

Go to Front Page > Settings and change "Front page" to None all down. Change "Front page items when logged in" to None all down. Ensure that "Include a topic section" is checked. Save changes and return to the front page. Turn editing on, obviously, and you should now see the "Add a resource" and "Add an activity" drop down combo-boxes. Select "Add a resource" and select "Insert a label". You can then edit the label in any way you want to in the WYSYWYG editor.

How can I change the initial login screen?

Edit one of the language files. Site administration > Language> Language customisation, look in the moodle.php file. Look for loginusing or loginsteps or loginstepsnone string variables.

How can I change the initial login screen help?

To change or add a help message for the login go to Site administration > Plugins > Authentication > Manage authentication. Type your help message in there in the Instructions text box.

Errors and Troubleshooting

How do I enable/disable debugging?

If you are getting a blank or partially complete page, or receive a page that presents a short error message that is not informative enough, you can turn on debugging to learn more details.

Turning on debugging will let you see what the error message is, which may help you diagnose the problem. Set this in Site administration > Development > Debugging - see Debugging for more.

Incomplete page displayed when I click "Turn Editing On"

When you see an incomplete page, it is normally a sign that an error occurred. To find out more, turn on Debugging, and you should see an error message which may help you to diagnose the problem.

This is usually as a result of an incompatible contributed module or block that you have installed. Follow these steps:

  1. Follow the module removal instructions in Installing contributed modules or plugins.
  2. Re-visit your course page and try clicking on the "Turn Editing On" button again.

If you find an incompatible module or block, please report the problem to the person named as the maintainer in the Modules and Plugins database.

Receive error message "a required parameter (id) was missing" when uploading a file or

This message sometimes is generated when attempting to upload a file larger than the upload limit. This can also be caused by user's having more than one login to the same site open in the same browser in different windows or tabs.

User gets 'an invalid session key' error

A number of things may caused the invalid session key error. The most common is if the person tries to login into the same Moodle site in more than one tab or window in the same browser. That will not work. The fix is to close all those tabs and windows and close and restart the browser. This is almost always a transient issue. The fix is to close and restart the browser, and log back into Moodle.

If you send someone a URL to something in Moodle, like a course activity or particular page, is may be that the session id key is tacked onto the end of the URL. Simply delete that parameter from the URL.

Why is a page blank, or half missing?

A blank page, or a page that seems to have half missing, is normally a sign that an error occurred. If (as is recommended on production systems) you have display of error messages turned off, it can be very hard to understand what is going on.

The solution is to turn on the debugging options temporarily. Then, when you go back to the problem page, you should see the error message. Once you had finished solving the problem, remember to turn debugging off again.

How can I fix just one bug, without upgrading my whole site?

Suppose:

  • You are experiencing a particular bug.
  • You have searched in the tracker, and found that your problem is MDL-abc, and that it has been fixed in the latest version.
  • For some reason, you cannot upgrade your whole site, even though the latest version probably has security fixes.

Then, how can you get the fix for just this one bug, without upgrading your whole site? Well, if you are prepared to manually patch the code, you can probably get this information from the tracker. Please see How to fix just one bug without upgrading guide.

Miscellaneous

See also