Chapter 14. Moodle Admin Tools

Moodle ships with a number of administration tools that are not directly accessible via the familiar web interface. There are two types of Moodle "hidden" admin tools that you have at your disposal as part of a standard Moodle installation:

  • Web-based admin tools: These are tools that can be accessed via the web interface, but you will have to manually enter the URL in order to make use of these unsupported utilities
  • Command Line Interface (CLI): The CLI is a built-in mechanism that allows us to automate certain processes via the command line or shell scripts

A powerful alternative to CLI is called Moosh, which stands for Moodle Shell. We will explain the way Moosh works and will provide a couple of useful examples. Finally, we will cover another useful external tool called Adminer, which lets you manage the underlying database directly from within Moodle.

Web-based admin tools

We have grouped internal web tools into three categories:

  • Upgrade tools: These include the assignment upgrade helper as well as a multilang upgrade tool
  • Database tools: These transfer databases from one Moodle server to another, perform search-and-replace operations on text strings in the entire database, and convert MyISAM to InnoDB
  • Other tools: This category includes a test course generator and a basic health check

Upgrade tools

These tools are usually only applied once. After the upgrade of a particular functionality has been successful, the tool can usually be removed via the Uninstall option in Plugins | Admin tools | Manage admin tools.

The Assignment Upgrade tool converts assignments from version 2.2 or below to the new assignment activity. It can be accessed in admin/tool/assignmentupgrade or directly via Assignment upgrade helper. Once called, you will have to select List assignments that have not been upgraded. All assignments will be listed and you have the option to upgrade these automatically. Once this has been completed, it is recommended you remove, or at least disable, the Assignment 2.2 activity in Plugins | Activity modules | Manage activities.

Another upgrade tool that is part of your Moodle installation is called Multilang upgrade. It can be called via admin/tool/multilangupgrade. The multilang HTML syntax was changed a while ago and is not supported anymore (see also the Localization section in Chapter 9, Moodle Configuration). If any of your users still use the old format, you will need to run this tool once.

Upgrade tools

Database tools

If you have to move the database of a Moodle instance from one server to another or migrate another Moodle system, you have two broad options. You can either create a database dump manually or via the Adminer tool covered later, or you can use the built-in database transfer facility. Your migration tool is available at admin/tool/dbtransfer.

Database tools

You will need to provide the details of the database to which the content of the current database will be copied. These settings are identical to the ones applied during installation (see Chapter 1, Moodle Installation).

You further have the option to Enable maintenance mode, which will turn on maintenance mode during and after the migration. If used, you will have to manually remove the climaintenance.html file afterwards.

A tool related to the database migration facility is DB search and replace. After you have moved your system to another location, your URL might have changed. Any user who has been using fixed URLs anywhere in their content now faces dead links. As the administrator, you have a script at hand where you can replace any text in the underlying database, except a few tables such as log, session and event tables. You can find the script at admin/tool/replace.

Database tools

The last option, labeled I understand the risks of this operation, indicates the potential risk of the execution—unless you are 100% certain that the replacements will not have any impact on the system, you had better stay away from it. Once completed, the script will display all executed SQL queries.

The last database tool only applies to MySQL and is only applicable when you are migrating a system that is still using the legacy MyISAM format. If that is the case, any tables will be converted from MyISAM to InnoDB. This tool can found at admin/tool/innodb.

Other tools

In order to test performance or to find out how your system copes with large courses, you have the ability to use the unsupported course generator, which you will find at admin/tool/generator. In order to use it, you will have to make sure debugging is turned on (Development | Debugging).

Other tools

You can select Size of course as well as the Course short name, Course full name, and Course summary options. Beware that the generation of large courses may take hours and will have a significant negative impact on your system performance. It is not recommended to perform this operation in production environments.

Another tool, which might come in useful, is called Health center and can be accessed at admin/tool/health. It shows any potential problems and, if possible, provides advice on how to resolve the issues.

Other tools

While this does not replace a professional Moodle health check as offered by Moodle partners or a penetration test of your system, it covers a number of typical problems in new setups.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.28.70