.. include:: /shortcuts.rstext .. index:: pair: Administration; Development single: Site administrator; Development .. _development: Development ------------------------------------------- *Administration menu → Development* .. note:: *Development* is only accessible by site administrators. This administration section includes tools for developers to make them easily accessible. .. index:: pair: Development; Behat steps .. _behat_steps: Behat steps ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *Administration menu → Development → Behat steps* .. figure:: /images/administration/behat_steps.* :alt: Display Behat steps that you can use in your own tests Display Behat steps that you can use in your own tests Mahara comes with a `Behat automation test suite `_ that makes it possible to automate a lot of manual testing. On this page you see the Behat steps that you can use in Mahara out of the box. They are listed as a reference so you can see how they are being used. #. A warning is displayed if the permissions on the Behat folder in your dataroot are not correct and the steps can't be read. Some steps are always displayed, but not the majority of them unless you have the permissions correct. #. Click the text of a step or the chevron |menu open| to see all instances where this step is used. #. The question mark indicates that there can be different text. #. Click the file name to see the actual text used in this particular file. #. The line and the step are displayed. .. index:: pair: Development; Components library .. _components_library: Components library ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *Administration menu → Development → Components library* .. figure:: /images/administration/components_library.* :alt: List of all third-party plugins in Mahara List of all third-party plugins in Mahara Mahara uses a number of third-party plugins that deliver JavaScript, filtering, templating, and many more. On this page you see them all listed along with their version number in this particular version of Mahara and the path to their project site. That information is taken from the 'Readme.mahara' files available in each plugin in the code base. #. **Plugin**: The name of the plugin. #. **Path**: Where you can find the code in the Mahara code base. #. **Version**: Current version number of this plugin. #. **URL**: Official URL of the plugin where you can find out more about it. .. index:: pair: Development; Embedded URLs .. _embedded_urls: Embedded URLs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |new in Mahara 22.04| *Administration menu → Development → Embedded URLs* When you migrate your site to a different domain, content such as images embedded into text or URLs pointing to pages and collections within text are not updated to the new domain automatically. This tool helps to update all of these instances in one go. .. figure:: /images/administration/embedded_urls.* :alt: Update embedded URLs Update embedded URLs #. Go to ``yourdomain/admin/extensions/embeddedurls.php``. #. **Old site URL**: Enter the URL of your previous site. #. Click the *Check URL* button. Mahara now tries to find instances where the URL was used in embedded content. #. **Results for ...**: A list of all instances where an embedded URL was found. #. Click the *Update URLs* button to change all instances to the new site URL. .. note:: Use this tool instead of updating the URLs via a database query because text is stored serialised and can't be updated via a SQL query. .. index:: pair: Development; Languages .. _languages: |new in Mahara 22.04| Languages ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *Administration menu → Development → Languages* You can install and update language packs on this page, keeping the translations of the interface up to date. This is handy if you know that changes have been made to a translation that you have, but you don't have direct server access. This automates the process of downloading the language from the `Mahara language pack site `_. These languages are only for the translation of the interface. You can use any language that is supported by Unicode when you add text yourself as Mahara. .. note:: English is not listed here as that is the default language for Mahara. You can find the languages and how much they have been translated for the Mahara interface in the `translation project `_. If your desired language is not available, you can `start a translation `_ for it. .. figure:: /images/administration/languages.* :alt: Install and update languages for the interface Install and update languages for the interface #. Select the language pack that you want to install from the drop-down menu and click the *Add language* button to add it to your site. The latest translations available for the version of Mahara you are using will be installed. #. Click the *All* button to select all languages mentioned on this page to be updated. #. Click the *None* button to revert your selection. #. You can select individual languages by ticking their checkbox. #. **Name**: The name of the language in its language. #. **Language code**: The international two-letter code by which the language is identified on the Mahara language pack site. #. **Last updated on**: The time when the language was last updated through this interface. .. note:: If you install or update a language via a zip file or use the :ref:`language pack update CLI script `, that is not tracked here. #. **File origin**: Link to the file on the Mahara language pack site. #. Click the *Update* button to pull the latest versions of the selected languages and install them. .. index:: pair: Development; Style guide .. _styleguide: Style guide ~~~~~~~~~~~~~~~~~~~~ *Administration menu → Development → Style guide* The style guide is a reference guide for developers. It describes the components that are used in Mahara and provides their CSS markup so you can check if you have styled everything consistently with the rest of the environment. If you want to check what the individual components look like in a different theme, switch the site theme and refresh the style guide. .. note:: Currently, the style guide is only available in English, and more elements will be added with time. .. figure:: /images/administration/styleguide.* :alt: The style guide The style guide #. Navigation to reach the various different component groups within Mahara. #. Title and short description of the component. #. What the component looks like. #. The code that is needed to produce the component. .. note:: This often has to be adjusted somewhat to account for different text on a button or different options. This is the code of the example. #. Click the *Copy* button |copy| to copy the code to the clipboard.