<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/dev/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Prg3</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/dev/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Prg3"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/Special:Contributions/Prg3"/>
	<updated>2026-07-19T00:53:16Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Callbacks&amp;diff=54647</id>
		<title>Callbacks</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Callbacks&amp;diff=54647"/>
		<updated>2018-08-20T20:23:40Z</updated>

		<summary type="html">&lt;p&gt;Prg3: /* List of one-to-many callbacks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Moodle does not have well-defined Hooks API but still allows plugins to hook into different processes by &#039;&#039;&#039;implementing callbacks&#039;&#039;&#039;. See also [[Communication Between Components]].&lt;br /&gt;
&lt;br /&gt;
Some old APIs that were created before object-oriented programming use only callbacks. One of them is [[Activity modules]].&lt;br /&gt;
&lt;br /&gt;
==Types of callbacks in Moodle==&lt;br /&gt;
&lt;br /&gt;
=== Callback functions one-to-many ===&lt;br /&gt;
&lt;br /&gt;
Core has a &amp;quot;hook point&amp;quot; where it allows plugins to execute some code, modify variables or return a result. Sometimes (especially for old callbacks) only plugins of a specific plugin type are allowed, however this is not recommended for the new callbacks because the list of callbacks is now cached and performance is not a constraint any more. If plugins want to implement the function for this callback they normally must place it in &#039;&#039;&#039;lib.php&#039;&#039;&#039; with the name &#039;&#039;&#039;pluginfullname_callbackname()&#039;&#039;&#039;. Here pluginname should be a full plugin name with a prefix, however activity modules can often omit the &amp;quot;mod_&amp;quot; prefix for historical reasons. Implementing this type of callback is optional and the &amp;quot;hook point&amp;quot; does not care how many and which plugins implement callback. Also &amp;quot;hook point&amp;quot; does not check if the plugin is enabled on this site, inside the callback plugins must check it themselves if it is important. Methods &#039;&#039;&#039;get_plugin_list_with_function()&#039;&#039;&#039; and &#039;&#039;&#039;get_plugins_with_function()&#039;&#039;&#039; are normally used in the &amp;quot;hook points&amp;quot; to find all plugins implementing a callback.&lt;br /&gt;
&lt;br /&gt;
This document aims to cover ALL callbacks of this type that are present in Moodle core APIs or in standard Moodle plugins.&lt;br /&gt;
&lt;br /&gt;
=== Callback functions one-to-one ===&lt;br /&gt;
&lt;br /&gt;
Core API (or plugins such as blocks or reports) looks for and executes a method from the plugin/component that &amp;quot;owns&amp;quot; some entity, usually for checking permissions, pre-processing or providing the human-readable representation of this entity. Similar to one-to-many callbacks, the component/plugin must define a function with the name &#039;&#039;&#039;pluginfullname_callbackname()&#039;&#039;&#039; in lib.php . In some cases the function &#039;&#039;must&#039;&#039; be present or otherwise an exception is thrown or debugging message is displayed. Methods &#039;&#039;&#039;component_callback()&#039;&#039;&#039; and &#039;&#039;&#039;component_callback_exists()&#039;&#039;&#039; are normally used to find an implementation of a callback. Unlike one-to-many callbacks the implementing functions can exist not only in plugins but also in core components.&lt;br /&gt;
&lt;br /&gt;
The list of one-to-one callbacks may not be 100% complete in this document, the aim is to cover the &amp;quot;magic&amp;quot; functions that are actually used despite IDE hints.&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Files in the specific location&#039;&#039;&#039;. Core APIs may look for plugins that have a file with a specific file name, for example &#039;&#039;&#039;version.php&#039;&#039;&#039;, &#039;&#039;&#039;settings.php&#039;&#039;&#039;, &#039;&#039;&#039;styles.css&#039;&#039;&#039;, &#039;&#039;&#039;module.js&#039;&#039;&#039;, files in &#039;&#039;&#039;db/&#039;&#039;&#039; folder, etc. See [[Plugin files]]&lt;br /&gt;
* &#039;&#039;&#039;Event observers&#039;&#039;&#039;. Each plugin can implement event observers that execute code when event is triggered. See [[Event_2#Event_dispatching_and_observers|Events API]] about how to listen to events. Event observers can not always substitute callbacks because they do not return any value and can only happen in case of event. Many &amp;quot;hook points&amp;quot; are necessary before something has happened or when nothing is happening at all, for example a report/summary is gathered. However if it is possible to achieve the desired outcome with event observer, Moodle will not accept requests for adding a &amp;quot;hook point&amp;quot;.&lt;br /&gt;
* Callbacks that are specified in the db/* file, for example in &#039;&#039;&#039;db/service.php&#039;&#039;&#039; developers must specify callback responsible for implementing web service, in &#039;&#039;&#039;db/tags.php&#039;&#039;&#039; developers specify callback for finding tagged items, etc. These types of callbacks are not covered on this page, information about them can be found in the respective APIs.&lt;br /&gt;
&lt;br /&gt;
== List of Moodle callbacks ==&lt;br /&gt;
&lt;br /&gt;
=== List of one-to-many callbacks ===&lt;br /&gt;
&lt;br /&gt;
To implement one of these callbacks plugins must add a function &#039;&#039;&#039;pluginfullname_callbackname()&#039;&#039;&#039; in &#039;&#039;&#039;lib.php&#039;&#039;&#039; unless stated otherwise. The &#039;&#039;pluginfullname&#039;&#039; is the name of the plugin with the frankenstyle prefix. For activity modules it is acceptable to omit the &#039;&#039;mod_&#039;&#039; prefix. Refer to the linked documentation or search Moodle code by the callback name to find where it is called, what arguments are supplied and what return value is expected.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Callback&lt;br /&gt;
! Plugin type&lt;br /&gt;
! Version&lt;br /&gt;
! Comments&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 align=center | &#039;&#039;&#039;Navigation, see [[Navigation API]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| extend_navigation_course&lt;br /&gt;
| *&lt;br /&gt;
| &lt;br /&gt;
| before Moodle 3.0 was only supported by &#039;&#039;report&#039;&#039; and &#039;&#039;tool&#039;&#039; plugin types&lt;br /&gt;
|-&lt;br /&gt;
| extend_settings_navigation&lt;br /&gt;
| local, booktool&lt;br /&gt;
|&lt;br /&gt;
| &#039;&#039;Note, modules have a one-to-one callback with the same name, see below&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| extend_navigation&lt;br /&gt;
| local&lt;br /&gt;
|&lt;br /&gt;
| &#039;&#039;Note, modules have a one-to-one callback with the same name, see below&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| extend_navigation_user_settings&lt;br /&gt;
| *&lt;br /&gt;
| 3.0+&lt;br /&gt;
| before Moodle 3.0 was only supported by &#039;&#039;tool&#039;&#039; plugin types&lt;br /&gt;
|-&lt;br /&gt;
| extend_navigation_category_settings&lt;br /&gt;
| *&lt;br /&gt;
| 3.0+&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| extend_navigation_frontpage&lt;br /&gt;
| *&lt;br /&gt;
| 3.1+&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| extend_navigation_user&lt;br /&gt;
| *&lt;br /&gt;
| 3.1+&lt;br /&gt;
|&lt;br /&gt;
|- &lt;br /&gt;
| colspan=4 align=center | &#039;&#039;&#039;Before-actions hooks&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| course_module_background_deletion_recommended&lt;br /&gt;
| *&lt;br /&gt;
| 3.2+&lt;br /&gt;
| see [https://github.com/moodle/moodle/blob/MOODLE_32_STABLE/lib/upgrade.txt#L142 upgrade.txt]&lt;br /&gt;
|-&lt;br /&gt;
| pre_block_delete&lt;br /&gt;
| *&lt;br /&gt;
| 3.1+&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| pre_course_category_delete&lt;br /&gt;
| *&lt;br /&gt;
| 3.1+&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| pre_course_delete&lt;br /&gt;
| *&lt;br /&gt;
| 3.1+&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| pre_course_module_delete&lt;br /&gt;
| *&lt;br /&gt;
| 3.1+&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| pre_user_delete&lt;br /&gt;
| *&lt;br /&gt;
| 3.1+&lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| colspan=4 align=center | &#039;&#039;&#039;Page rendering, see [[Output_callbacks]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [[Output_callbacks#add_htmlattributes | add_htmlattributes]]&lt;br /&gt;
| *&lt;br /&gt;
| 3.3+&lt;br /&gt;
| eg Add open graph xml namespace attributes&lt;br /&gt;
|-&lt;br /&gt;
| [[Output_callbacks#before_footer | before_footer]]&lt;br /&gt;
| *&lt;br /&gt;
| 3.3+&lt;br /&gt;
| eg injecting JS across the site, like analytics&lt;br /&gt;
|-&lt;br /&gt;
| [[Output_callbacks#before_http_headers | before_http_headers]]&lt;br /&gt;
| *&lt;br /&gt;
| 3.3+&lt;br /&gt;
| Setting http headers across the site like CSP&lt;br /&gt;
|-&lt;br /&gt;
| [[Output_callbacks#before_standard_html_head | before_standard_html_head]]&lt;br /&gt;
&lt;br /&gt;
| *&lt;br /&gt;
| 3.3+&lt;br /&gt;
| An better API alternative to appending to $CFG-&amp;gt;additionalhtmlhead&lt;br /&gt;
|-&lt;br /&gt;
| [[Output_callbacks#before_standard_top_of_body_html | before_standard_top_of_body_html]]&lt;br /&gt;
| *&lt;br /&gt;
| 3.3+&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [[Output_callbacks#render_navbar_output | render_navbar_output]]&lt;br /&gt;
| *&lt;br /&gt;
| 3.2+&lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| colspan=4 align=center | &#039;&#039;&#039;Course module edit form&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| coursemodule_edit_post_actions&lt;br /&gt;
| *&lt;br /&gt;
| 3.1+&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| coursemodule_standard_elements&lt;br /&gt;
| *&lt;br /&gt;
| 3.1+&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| coursemodule_validation&lt;br /&gt;
| *&lt;br /&gt;
| 3.1+&lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| colspan=4 align=center | &#039;&#039;&#039;Modules&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| check_updates_since&lt;br /&gt;
| mod&lt;br /&gt;
| 3.2+&lt;br /&gt;
| See [[NEWMODULE_Documentation]]&lt;br /&gt;
|-&lt;br /&gt;
| dndupload_register&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| colspan=4 align=center | &#039;&#039;&#039;Other&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| get_fontawesome_icon_map&lt;br /&gt;
| *&lt;br /&gt;
| 3.3+&lt;br /&gt;
| https://docs.moodle.org/dev/Moodle_icons#Font_awesome_icons&lt;br /&gt;
|-&lt;br /&gt;
| get_question_bank_search_conditions&lt;br /&gt;
| local&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| oauth2_system_scopes&lt;br /&gt;
| *&lt;br /&gt;
| 3.3+&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| rss_get_feed&lt;br /&gt;
| *&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| supports_logstore&lt;br /&gt;
| report&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| get_shortcuts&lt;br /&gt;
| ltisource&lt;br /&gt;
| 3.1+&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| before_launch&lt;br /&gt;
| ltisource&lt;br /&gt;
| 2.8+&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [[Miscellaneous_callbacks#control_view_profile | control_view_profile]]&lt;br /&gt;
| *&lt;br /&gt;
| 3.6+&lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| [[Miscellaneous_callbacks#store_profiling_data | store_profiling_data ]]&lt;br /&gt;
| *&lt;br /&gt;
| 3.6+&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| colspan=4 align=center | &#039;&#039;&#039;Deprecated&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| cron&lt;br /&gt;
| *&lt;br /&gt;
| &lt;br /&gt;
| See [[Task API]]&lt;br /&gt;
|-&lt;br /&gt;
| delete_course&lt;br /&gt;
| mod,report,coursereport,format&lt;br /&gt;
| &lt;br /&gt;
| Replace with observer to course_contents_deleted event&lt;br /&gt;
|-&lt;br /&gt;
| print_overview&lt;br /&gt;
| mod&lt;br /&gt;
| up to 3.2&lt;br /&gt;
| New dashboard uses [[Calendar API]] to populate events on the timeline&lt;br /&gt;
|-&lt;br /&gt;
| report_extend_navigation&lt;br /&gt;
| coursereport&lt;br /&gt;
| &lt;br /&gt;
| Plugin type &#039;&#039;coursereport&#039;&#039; is deprecated, plugin type &#039;&#039;report&#039;&#039; should be used instead&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
if Moodle version is not specified, this means that callback existed for a long time and can be found in all [[Releases|currently supported]] Moodle versions&lt;br /&gt;
&lt;br /&gt;
=== List of one-to-one callbacks ===&lt;br /&gt;
&lt;br /&gt;
To implement one of these callbacks plugins must add a function &#039;&#039;&#039;pluginfullname_callbackname()&#039;&#039;&#039; in &#039;&#039;&#039;lib.php&#039;&#039;&#039; unless stated otherwise. The &#039;&#039;pluginfullname&#039;&#039; is the name of the plugin with the frankenstyle prefix. For activity modules it is acceptable to omit the &#039;&#039;mod_&#039;&#039; prefix. Refer to the linked documentation or search Moodle code by the callback name to find where it is called, what arguments are supplied and what return value is expected.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Callback&lt;br /&gt;
! Plugin type&lt;br /&gt;
! Version&lt;br /&gt;
! Comments&lt;br /&gt;
|- &lt;br /&gt;
| colspan=4 align=center | &#039;&#039;&#039;Comments support&#039;&#039;&#039;, see [[Comment API]]&lt;br /&gt;
|-&lt;br /&gt;
| comment_add&lt;br /&gt;
| *&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| comment_display&lt;br /&gt;
| *&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| comment_permissions&lt;br /&gt;
| *&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| comment_template&lt;br /&gt;
| *&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| comment_url&lt;br /&gt;
| *&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| comment_validate&lt;br /&gt;
| *&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| colspan=4 align=center | &#039;&#039;&#039;Gradebook&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| export_%_settings_definition&lt;br /&gt;
| gradeexport&lt;br /&gt;
| &lt;br /&gt;
| % is a plugin name &#039;&#039;without&#039;&#039; prefix&lt;br /&gt;
|-&lt;br /&gt;
| import_%_settings_definition&lt;br /&gt;
| gradeimport&lt;br /&gt;
| &lt;br /&gt;
| % is a plugin name &#039;&#039;without&#039;&#039; prefix&lt;br /&gt;
|-&lt;br /&gt;
| report_%_profilereport&lt;br /&gt;
| gradereport&lt;br /&gt;
| &lt;br /&gt;
| % is a plugin name &#039;&#039;without&#039;&#039; prefix&lt;br /&gt;
|-&lt;br /&gt;
| report_%_settings_definition&lt;br /&gt;
| gradereport&lt;br /&gt;
| &lt;br /&gt;
| % is a plugin name &#039;&#039;without&#039;&#039; prefix&lt;br /&gt;
|- &lt;br /&gt;
| colspan=4 align=center | &#039;&#039;&#039;Groups support&#039;&#039;&#039;, see [[Groups API]]&lt;br /&gt;
|-&lt;br /&gt;
| allow_group_member_remove&lt;br /&gt;
| *&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| restore_group_member&lt;br /&gt;
| *&lt;br /&gt;
| &lt;br /&gt;
| For plugins that create their own groups&lt;br /&gt;
|- &lt;br /&gt;
| colspan=4 align=center | &#039;&#039;&#039;Installation and upgrade&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| xmldb_%_install&lt;br /&gt;
| *&lt;br /&gt;
| &lt;br /&gt;
| Located in db/install.php , % refer to the full plugin name, in case of modules without prefix&lt;br /&gt;
|-&lt;br /&gt;
| xmldb_%_install_recovery&lt;br /&gt;
| *&lt;br /&gt;
| &lt;br /&gt;
| Located in db/install.php , % refer to the full plugin name, in case of modules without prefix&lt;br /&gt;
|-&lt;br /&gt;
| xmldb_%_uninstall&lt;br /&gt;
| *&lt;br /&gt;
| &lt;br /&gt;
| Located in db/uninstall.php , % refer to the full plugin name, in case of modules without prefix&lt;br /&gt;
|-&lt;br /&gt;
| xmldb_%_upgrade&lt;br /&gt;
| *&lt;br /&gt;
| &lt;br /&gt;
| Located in db/upgrade.php , % refer to the full plugin name, in case of modules without prefix&lt;br /&gt;
|- &lt;br /&gt;
| colspan=4 align=center | &#039;&#039;&#039;LTI source&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| add_instance_hook&lt;br /&gt;
| ltisource&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;messagetype&#039;&#039;&lt;br /&gt;
| ltisource&lt;br /&gt;
| &lt;br /&gt;
| Callback name is the type of the message&lt;br /&gt;
|- &lt;br /&gt;
| colspan=4 align=center | &#039;&#039;&#039;Question bank support&#039;&#039;&#039;, see [[Question API]]&lt;br /&gt;
|-&lt;br /&gt;
| question_list_instances&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| question_pluginfile&lt;br /&gt;
| *&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| question_preview_pluginfile&lt;br /&gt;
| *&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| questions_in_use&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| colspan=4 align=center | &#039;&#039;&#039;Ratings support&#039;&#039;&#039;, see [[Rating API]]&lt;br /&gt;
|-&lt;br /&gt;
| rating_can_see_item_ratings&lt;br /&gt;
| *&lt;br /&gt;
| 2.9.2+&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| rating_can_see_item_ratings&lt;br /&gt;
| *&lt;br /&gt;
| 2.9.2+&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| rating_get_item_fields&lt;br /&gt;
| *&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| rating_permissions&lt;br /&gt;
| *&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| rating_validate&lt;br /&gt;
| *&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| colspan=4 align=center | &#039;&#039;&#039;Themes&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| $THEME-&amp;gt;csspostprocess&lt;br /&gt;
| theme&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| $THEME-&amp;gt;extralesscallback&lt;br /&gt;
| theme&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| $THEME-&amp;gt;lessvariablescallback&lt;br /&gt;
| theme&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| page_init&lt;br /&gt;
| theme&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| colspan=4 align=center | &#039;&#039;&#039;Modules: Calendar and dashboard&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| core_calendar_event_action_shows_item_count&lt;br /&gt;
| mod&lt;br /&gt;
| 3.3+&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| core_calendar_is_event_visible&lt;br /&gt;
| mod&lt;br /&gt;
| 3.3+&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| core_calendar_provide_event_action&lt;br /&gt;
| mod&lt;br /&gt;
| 3.3+&lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| colspan=4 align=center | &#039;&#039;&#039;Modules: Course cache&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| cm_info_dynamic&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| cm_info_view&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| get_coursemodule_info&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| colspan=4 align=center | &#039;&#039;&#039;Modules: Course reset&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| reset_course_form_defaults&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| reset_course_form_definition&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| reset_userdata&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| colspan=4 align=center | &#039;&#039;&#039;Modules&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| delete_instance&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| dndupload_handle&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| export_contents&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| Used in WS get_course_contents&lt;br /&gt;
|-&lt;br /&gt;
| extend_settings_navigation&lt;br /&gt;
| mod,booktool&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| extends_navigation&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| get_completion_active_rule_descriptions&lt;br /&gt;
| mod&lt;br /&gt;
| 3.3+&lt;br /&gt;
| Must be present for modules implementing custom completion rules&lt;br /&gt;
|-&lt;br /&gt;
| get_completion_state&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| get_extra_capabilities&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| get_file_areas&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| get_recent_mod_activity&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| get_shortcuts&lt;br /&gt;
| mod&lt;br /&gt;
| 3.1+&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| grade_item_update&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| grading_areas_list&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| print_recent_activity&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| print_recent_mod_activity&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| refresh_events&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| rescale_activity_grades&lt;br /&gt;
| mod&lt;br /&gt;
| 3.1+&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| scale_used_anywhere&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| update_grades&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| user_complete&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| user_outline&lt;br /&gt;
| mod&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| colspan=4 align=center | &#039;&#039;&#039;Glossary formats&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| glossary_print_entry_%&lt;br /&gt;
| for glossary formats&lt;br /&gt;
| &lt;br /&gt;
| Glossary formats is not a plugin type yet, however the list of formats is not hardcoded in the mod_glossary, instead the methods similar to callbacks are used for each subfolder in mod/glossar/format. % refer to the subfolder name, the functions are expected in lib.php&lt;br /&gt;
|-&lt;br /&gt;
| glossary_show_entry_%&lt;br /&gt;
| for glossary formats&lt;br /&gt;
| &lt;br /&gt;
|  - &amp;quot; -&lt;br /&gt;
|-&lt;br /&gt;
| glossary_show_entry_%&lt;br /&gt;
| for glossary formats&lt;br /&gt;
| &lt;br /&gt;
| - &amp;quot; -&lt;br /&gt;
|-&lt;br /&gt;
| glossary_show_entry_%&lt;br /&gt;
| for glossary formats&lt;br /&gt;
| &lt;br /&gt;
| - &amp;quot; -&lt;br /&gt;
|- &lt;br /&gt;
| colspan=4 align=center | &#039;&#039;&#039;Other&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| global_db_replace&lt;br /&gt;
| block&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| inplace_editable&lt;br /&gt;
| *&lt;br /&gt;
| &lt;br /&gt;
| See [[Inplace editable]]&lt;br /&gt;
|-&lt;br /&gt;
| output_fragment_*&lt;br /&gt;
| *&lt;br /&gt;
| 3.1+&lt;br /&gt;
| see [[Fragment]]&lt;br /&gt;
|-&lt;br /&gt;
| page_type_list&lt;br /&gt;
| *&lt;br /&gt;
| &lt;br /&gt;
| Used when displaying page types in block configuration&lt;br /&gt;
|-&lt;br /&gt;
| params_for_js&lt;br /&gt;
| atto&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| pluginfile&lt;br /&gt;
| *&lt;br /&gt;
| &lt;br /&gt;
| Callback checking permissions and preparing the file for serving plugin files, see [[File API]]. Note, in case of &#039;&#039;block&#039;&#039; plugins the list of arguments is slightly different&lt;br /&gt;
|-&lt;br /&gt;
| restore_role_assignment&lt;br /&gt;
| *&lt;br /&gt;
| &lt;br /&gt;
| For plugins that create their own role assignments&lt;br /&gt;
|-&lt;br /&gt;
| strings_for_js&lt;br /&gt;
| atto&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| supports&lt;br /&gt;
| *&lt;br /&gt;
| &lt;br /&gt;
| Required for activity modules&lt;br /&gt;
|- &lt;br /&gt;
| colspan=4 align=center | &#039;&#039;&#039;Deprecated&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| ajax_section_move&lt;br /&gt;
| format&lt;br /&gt;
| up to 2.3&lt;br /&gt;
| See [[Course formats]]&lt;br /&gt;
|-&lt;br /&gt;
| ajax_support&lt;br /&gt;
| format&lt;br /&gt;
| up to 2.3&lt;br /&gt;
| See [[Course formats]]&lt;br /&gt;
|-&lt;br /&gt;
| delete_course&lt;br /&gt;
| mod&lt;br /&gt;
| up to 3.1&lt;br /&gt;
| use event observer&lt;br /&gt;
|-&lt;br /&gt;
| display_content&lt;br /&gt;
| format&lt;br /&gt;
| up to 2.3&lt;br /&gt;
| See [[Course formats]]&lt;br /&gt;
|-&lt;br /&gt;
| get_post_actions&lt;br /&gt;
| mod,booktool&lt;br /&gt;
| &lt;br /&gt;
| Only called if legacy log is used on the site&lt;br /&gt;
|-&lt;br /&gt;
| get_section_name&lt;br /&gt;
| format&lt;br /&gt;
| up to 2.3&lt;br /&gt;
| See [[Course formats]]&lt;br /&gt;
|-&lt;br /&gt;
| get_section_url&lt;br /&gt;
| format&lt;br /&gt;
| up to 2.3&lt;br /&gt;
| See [[Course formats]]&lt;br /&gt;
|-&lt;br /&gt;
| get_types&lt;br /&gt;
| mod,ltisource&lt;br /&gt;
| up to 3.0&lt;br /&gt;
| Replaced with &#039;&#039;get_shortcuts&#039;&#039; in 3.1&lt;br /&gt;
|-&lt;br /&gt;
| get_view_actions&lt;br /&gt;
| mod,booktool&lt;br /&gt;
| &lt;br /&gt;
| Only called if legacy log is used on the site&lt;br /&gt;
|-&lt;br /&gt;
| load_content&lt;br /&gt;
| format&lt;br /&gt;
| up to 2.3&lt;br /&gt;
| See [[Course formats]]&lt;br /&gt;
|-&lt;br /&gt;
| scale_used&lt;br /&gt;
| mod&lt;br /&gt;
| up to 3.0&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| uses_sections&lt;br /&gt;
| format&lt;br /&gt;
| up to 2.3&lt;br /&gt;
| See [[Course formats]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
if Moodle version is not specified, this means that callback existed for a long time and can be found in all [[Releases|currently supported]] Moodle versions&lt;br /&gt;
&lt;br /&gt;
== Adding new callbacks to core ==&lt;br /&gt;
&lt;br /&gt;
If you are preparing a patch for core which adds a new callback here are some things which should be considered.&lt;br /&gt;
&lt;br /&gt;
TBA see https://tracker.moodle.org/browse/MDL-60510&lt;/div&gt;</summary>
		<author><name>Prg3</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Miscellaneous_callbacks&amp;diff=54646</id>
		<title>Miscellaneous callbacks</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Miscellaneous_callbacks&amp;diff=54646"/>
		<updated>2018-08-20T20:21:39Z</updated>

		<summary type="html">&lt;p&gt;Prg3: Adding store_profiling_data&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page contains documentation for general callbacks available in Moodle plugins.&lt;br /&gt;
&lt;br /&gt;
== control_view_profile ==&lt;br /&gt;
&lt;br /&gt;
This callback allows an installation to control access to a user&#039;s profile page. It modifies the response of the user_can_view_profile function; this function is what causes Moodle to show a &#039;not allowed&#039; error message if you try to view somebody&#039;s profile when you aren&#039;t allowed to.&lt;br /&gt;
&lt;br /&gt;
You can use this callback if your institution needs to implement policies about who can view profiles in addition to those supported by standard Moodle. Normally it would be implemented in a local plugin, but you can implement in any type of plugin.&lt;br /&gt;
&lt;br /&gt;
Your callback can return one of three values (all constants defined in the core_user class):&lt;br /&gt;
&lt;br /&gt;
; VIEWPROFILE_DO_NOT_PREVENT : Use standard Moodle behaviour - apply Moodle&#039;s normal rules about whether the current user is allowed to view that profile or not. Your callback should return this if you don&#039;t need to change behaviour for the profile in question.&lt;br /&gt;
; VIEWPROFILE_PREVENT : Prevent the current user from viewing that user&#039;s profile, even if Moodle&#039;s normal rules would allow it.&lt;br /&gt;
; VIEWPROFILE_FORCE_ALLOW : Allow the current user to view that user&#039;s profile, even if Moodle&#039;s normal rules would prevent it.&lt;br /&gt;
&lt;br /&gt;
=== Example code ===&lt;br /&gt;
&lt;br /&gt;
This silly example, placed in local/myplugin/lib.php, prevents everyone from accessing the profile of a user &#039;abc123&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
function local_myplugin_control_view_profile($user, $course = null, context_user $usercontext = null) {&lt;br /&gt;
    if ($user-&amp;gt;username=&#039;abc123&#039;) {&lt;br /&gt;
        return core_user::VIEWPROFILE_PREVENT;&lt;br /&gt;
    }&lt;br /&gt;
    return core_user::VIEWPROFILE_DO_NOT_PREVENT;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Multiple plugins ===&lt;br /&gt;
&lt;br /&gt;
The callback can be implemented by multiple plugins. Provided they behave sensibly and return DO_NOT_PREVENT when they don&#039;t need to modify behaviour, it should work as expected. The specific rules are:&lt;br /&gt;
&lt;br /&gt;
* If any function returns VIEWPROFILE_PREVENT then the user will be prevented from viewing the profile.&lt;br /&gt;
* Otherwise, if no function returns VIEWPROFILE_PREVENT but any function returns VIEWPROFILE_FORCE_ALLOW , then the user will be allowed to view the profile.&lt;br /&gt;
* Otherwise all plugins returned VIEWPROFILE_DO_NOT_PREVENT, and Moodle standard behaviour will be used.&lt;br /&gt;
== store_profiling_data ==&lt;br /&gt;
&lt;br /&gt;
This callback allows a plugin to get the profiling information from xhprof/tideways-xhprof and do it&#039;s own processing or storage with it.&lt;br /&gt;
&lt;br /&gt;
=== Example code === &lt;br /&gt;
&lt;br /&gt;
This is a fragment of a possible plugin that writes files to /tmp/output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
function local_profilestorefile_store_profiling_data($rec) {&lt;br /&gt;
	$file = fopen(&amp;quot;/tmp/output/&amp;quot; . $rec-&amp;gt;runid, &amp;quot;w&amp;quot;) or die(&amp;quot;Unable to write to file, does the folder exist?&amp;quot;);&lt;br /&gt;
	fwrite($file, json_encode($rec));&lt;br /&gt;
	fclose($file);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Prg3</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Profiling_PHP&amp;diff=54645</id>
		<title>Profiling PHP</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Profiling_PHP&amp;diff=54645"/>
		<updated>2018-08-20T20:19:41Z</updated>

		<summary type="html">&lt;p&gt;Prg3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PHP has two significant profilers. One is [http://www.xdebug.org/docs/profiler XDebug]. XDebug is well known and understood and its trace output is supported by tools like [http://kcachegrind.sourceforge.net/html/Home.html KCachegrind]. The other is [http://pecl.php.net/package/xhprof xhprof], a profiler released by facebook&#039;s engineering team, designed for capturing profile traces on live servers.&lt;br /&gt;
&lt;br /&gt;
==XHProf==&lt;br /&gt;
&lt;br /&gt;
NOTE: xhprof is not supported with php7, for a feature identical solution see Tideways below.&lt;br /&gt;
&lt;br /&gt;
XHProf aims to have the minimum impact on execution times and require relatively little space to store a trace, so you can run it live without a noticeable impact on users and without filling disks. The trade off with XHProf is in &#039;&#039;slightly&#039;&#039; less detail and a trace format that needs its own GUI to visualize (which ships with XHProf). The reason you&#039;d want to profile in a live environments (vs. on development) is certain categories of problem may only been seen live, e.g. (data related) what happens when the user table grows 100 times, the impact on &amp;quot;login.php&amp;quot;  or (service related) server to server HTTP requests.&lt;br /&gt;
&lt;br /&gt;
See&lt;br /&gt;
* [[Setting up xhprof on Moodle]]&lt;br /&gt;
* http://tjhunt.blogspot.co.uk/2013/05/performance-testing-moodle.html&lt;br /&gt;
* https://docs.google.com/presentation/d/1MV4R71UBgPgzM6I9h_yDnYcxIJlgCoLBUDtJJr-TzNI/present#slide=id.i0 presentation about using XHProf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Tideways for php7 ===&lt;br /&gt;
&lt;br /&gt;
xhprof isn&#039;t supported for php7, but there is an alternative project called Tideways which is almost binary compatible. Moodle now supports Tideways as well see (MDL-55292)[https://tracker.moodle.org/browse/MDL-55292]&lt;br /&gt;
&lt;br /&gt;
NOTE: Tideways is large paid service. This has caused some confusion, but the component which does the php7 instrumentation for profiling is open source and freely available.&lt;br /&gt;
&lt;br /&gt;
For installation details please see:&lt;br /&gt;
&lt;br /&gt;
https://tideways.io/profiler/downloads&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Export Xhprof data to plugins ===&lt;br /&gt;
&lt;br /&gt;
Starting at 3.6, Moodle allows for a plugin to handle the Xhprof data and not insert the traces into the database as implemented in (MDL-63031)[https://tracker.moodle.org/browse/MDL-63031]&lt;br /&gt;
&lt;br /&gt;
To disable Moodle from writing traces to the database, add: &amp;quot;$CFG-&amp;gt;disableprofilingtodatabase = False;&amp;quot; into config.php&lt;br /&gt;
&lt;br /&gt;
Plugins will need to provide a _store_profiling_data function to handle the data.&lt;br /&gt;
&lt;br /&gt;
==Xdebug==&lt;br /&gt;
&lt;br /&gt;
[http://xdebug.org/docs/profiler Xdebug] is a powerful PHP debugging tool. The first release of Xdebug was in 2002, since that it keeps growing and remains popular among PHP developers. Among its major features are stack and function tracing, code coverage analysis, remote debugging and scripts profiling. As the page topic suggests, we will focus on its profiling feature, which provides developer with detailed information about the script performance, helps identifying which parts of the code are slow. Collected information is being stored in cachegrind compatible file and can be analysed using one of external tools, such as [http://kcachegrind.sourceforge.net/html/Home.html KCachegrind], [http://sourceforge.net/projects/wincachegrind/ WinCacheGrind], [http://code.google.com/p/xdebugtoolkit/ xdebugtoolkit] or web-based analyser [https://github.com/jokkedk/webgrind#readme Webgrind]. Xdebug is simple to install and operate, it does not require code changes.&lt;br /&gt;
&lt;br /&gt;
===Installing Xdebug extension===&lt;br /&gt;
&lt;br /&gt;
The first step that has to be done is installing Xdebug extension. This procedure depends on the OS you are using, but general idea is to obtain Xdebug php extension and specify full path to it using &#039;&#039;zend_extension&#039;&#039; setting in &#039;&#039;php.inf&#039;&#039; file. Official [http://www.xdebug.org/docs/install Xdebug installation documentation] explains its installation on Windows, installing through PEAR/PECL and compiling from source.&lt;br /&gt;
Xdebug has been packaged for many Linux distributions, so it can be installed using corresponding package management tool. On Debian or Ubuntu, for example one would need to execute:&lt;br /&gt;
&lt;br /&gt;
 # apt-get install php5-xdebug&lt;br /&gt;
&lt;br /&gt;
This will put &#039;&#039;xdebug.so&#039;&#039; in default php modules directory and create &#039;&#039;/etc/php5/conf.d/xdebug.ini&#039;&#039; file with single line:&lt;br /&gt;
&lt;br /&gt;
 zend_extension=/usr/lib/php5/20090626/xdebug.so&lt;br /&gt;
&lt;br /&gt;
Note that this is equal to specifying the same line in &#039;&#039;php.inf&#039;&#039;, example above just reflects split php configuration.&lt;br /&gt;
&lt;br /&gt;
Once the Xdebug extension is installed and specified in php configuration, one may restart the webserver and information about Xdebug should appear in &#039;&#039;phpinfo()&#039;&#039; function output. If not, make sure that &#039;&#039;zend_extension&#039;&#039; line is not commented out, extension file exists in specified location and refer to webserver logs for more details.&lt;br /&gt;
&lt;br /&gt;
===Configuring Xdebug Profiler===&lt;br /&gt;
&lt;br /&gt;
When Xdebug extension is installed, it is time to configure profiling functionality. (If you are running apache2 as your web server and are using split configuration files such as the default apt-get install mentioned above, these settings should be added to &amp;quot;/etc/php5/apache2/conf.d/xdebug.ini&amp;quot;.)  There are number of parameters related to profiling, all of them start with &#039;&#039;xdebug.profiler_&#039;&#039; prefix. First of all, profiler should be enabled. There are two ways of doing it. One way is keeping it always enabled, so profiling information will be generated on every page request:&lt;br /&gt;
&lt;br /&gt;
 xdebug.profiler_enable=1&lt;br /&gt;
&lt;br /&gt;
Another way is making Xdebug writing profiling information on demand by triggering it with GET/POST or COOKIE variable named &#039;&#039;XDEBUG_PROFILE&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 xdebug.profiler_enable_trigger = 1&lt;br /&gt;
&lt;br /&gt;
This option is preferable for several reasons: profiling data files are relatively large especially on complex scripts and you may run out of disk-space pretty quick, it allows generating profiling information only when you need it, thus it is easier to find the generated file in output directory, finally, on demand profiling can be done on production servers, though it is not recommended. If you have enabled &#039;&#039;xdebug.profiler_enable_trigger&#039;&#039; option, make sure that &#039;&#039;xdebug.profiler_enable&#039;&#039; is disabled, otherwise this will lead to dump file being generated on each request.&lt;br /&gt;
&lt;br /&gt;
Whatever method of profiling enabling you have chosen, profiling data files will be generated on each request (or request with a trigger parameter) in directory specified with &#039;&#039;xdebug.profiler_output_dir&#039;&#039; directive. By default is it set to &#039;&#039;/tmp&#039;&#039;, but you may change it to any more suitable location.&lt;br /&gt;
&lt;br /&gt;
 xdebug.profiler_output_dir=/tmp&lt;br /&gt;
&lt;br /&gt;
Generated file will be named in accordance with &#039;&#039;xdebug.profiler_output_name&#039;&#039; setting. This setting can handle some specifiers and use them in the file name. Default name pattern is &#039;&#039;cachegrind.out.%p&#039;&#039;; in the actual file name %p will be replaced with process ID value. The fill list of specifier can be found [http://www.xdebug.org/docs/all_settings#trace_output_name here]. More intuitive naming is recommended, so that it is easier to find the file you have just generated in the bunch of others:&lt;br /&gt;
&lt;br /&gt;
 xdebug.profiler_output_name=cachegrind.out.%R.%t&lt;br /&gt;
&lt;br /&gt;
With this naming pattern, timestamp and script name will be reflected in the file name.&lt;br /&gt;
&lt;br /&gt;
When you are done with configuration, it is time to test it. First of all, the webserver has to be restarted, so that the new config will come into effect. Depending on your operating system and web server, you should be able to restart it with a command similar to:&lt;br /&gt;
&lt;br /&gt;
 sudo service apache2 restart&lt;br /&gt;
&lt;br /&gt;
(This should work for apache2 on several flavours of Linux.)&lt;br /&gt;
&lt;br /&gt;
===Profiling a page===&lt;br /&gt;
&lt;br /&gt;
Now assuming that Xdebug was configured to use a trigger for script profiling, open any php page on your server in your browser having added &#039;&#039;XDEBUG_PROFILE&#039;&#039; parameter to URL string:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://servername/moodle2/index.php?XDEBUG_PROFILE&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or if it already has some parameters, just add our trigger to the URL end:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://servername/moodle2/mod/forum/view.php?id=5&amp;amp;XDEBUG_PROFILE&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result, the new file should be generated in directory you specified with &#039;&#039;xdebug.profiler_output_dir&#039;&#039; directive:&lt;br /&gt;
&lt;br /&gt;
 cachegrind.out._moodle2_mod_forum_view_php.1289838411&lt;br /&gt;
 cachegrind.out._moodle2_index_php.1289837892&lt;br /&gt;
&lt;br /&gt;
Triggering profiling with POST requests or AJAX queries is also possible without code changes. [https://addons.mozilla.org/en-US/firefox/addon/58688/ Easy Xdebug] plugin for FireFox has profiling toggle button that inserts XDEBUG_PROFILE variable into cookie data, thus making profiling enabled for as long as you wish for all requests. Similar plugins exist for [https://chrome.google.com/extensions/detail/eadndfjplgieldjbigjakmdgkmoaaaoc Chrome] and [https://github.com/benmatselby/xdebug-toggler Safari] browsers.&lt;br /&gt;
&lt;br /&gt;
===Analyzing Xdebug profiling files===&lt;br /&gt;
&lt;br /&gt;
As it was pointed out earlier, profiling data is recoded in cachegrind format, so it can be analysed using one of external tools, such as [https://kcachegrind.github.io/html/Home.html KCachegrind], [http://sourceforge.net/projects/wincachegrind/ WinCacheGrind], [http://code.google.com/p/xdebugtoolkit/ xdebugtoolkit] or web-based analyser [https://github.com/jokkedk/webgrind#readme Webgrind]. Using these tools is pretty simple. I prefer KCachegrind which has a feature to show the matching code if web-server is run on the same box. Xdebug profiler documentation page has a [http://xdebug.org/docs/profiler#misc section] about KCachegrind that worth reading for everyone who starts using KCachegrind.&lt;br /&gt;
&lt;br /&gt;
===Quick summary===&lt;br /&gt;
&lt;br /&gt;
1. Install XDebug extension on your server.&lt;br /&gt;
&lt;br /&gt;
2. Add something like this to your php.ini file:&lt;br /&gt;
 zend_extension = /usr/lib/php5/20090626/xdebug.so&lt;br /&gt;
 xdebug.profiler_enable = 0&lt;br /&gt;
 xdebug.profiler_enable_trigger = 1&lt;br /&gt;
 xdebug.profiler_output_dir = /var/tmp&lt;br /&gt;
 xdebug.profiler_output_name = cachegrind.out.%R.%t&lt;br /&gt;
or add something like this to your .htaccess file&lt;br /&gt;
 php_flag xdebug.profiler_enable off&lt;br /&gt;
 php_flag xdebug.profiler_enable_trigger on&lt;br /&gt;
 php_value xdebug.profiler_output_dir /var/tmp&lt;br /&gt;
 php_value xdebug.profiler_output_name cachegrind.out.%R.%t&lt;br /&gt;
&lt;br /&gt;
3. When you want to profile a page, add &amp;lt;tt&amp;gt;&amp;amp;XDEBUG_PROFILE&amp;lt;/tt&amp;gt; to the end of the URL.&lt;br /&gt;
&lt;br /&gt;
4. Open the &amp;lt;tt&amp;gt;cachegrind.out....&amp;lt;/tt&amp;gt; file that is generated with one of the tools mentioned above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=162045 Forum thread about profiling Moodle 2.0]&lt;br /&gt;
XHProf articles:&lt;br /&gt;
* [https://docs.google.com/present/view?id=dcbkgbgf_45fbg3rnmk&amp;amp; Presentation about XHProf]&lt;br /&gt;
* [http://techportal.ibuildings.com/2009/12/01/profiling-with-xhprof/ Profiling with XHProf]&lt;br /&gt;
* [http://www.open.ac.uk/blogs/XHProf/?page_id=46 XHProf – Profiling and Reporting] from Moodle perspective written by [http://moodle.org/user/view.php?id=264538&amp;amp;course=5 James Brisland]&lt;br /&gt;
Xdebug articles:&lt;br /&gt;
* [http://devzone.zend.com/article/2803-Introducing-xdebug Introducing xdebug]&lt;br /&gt;
* [http://blog.teamlazerbeez.com/2010/05/04/xdebug-quickstart-profiling-in-php/ Xdebug Quickstart: Profiling in PHP]&lt;/div&gt;</summary>
		<author><name>Prg3</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Profiling_PHP&amp;diff=54644</id>
		<title>Profiling PHP</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Profiling_PHP&amp;diff=54644"/>
		<updated>2018-08-20T20:04:22Z</updated>

		<summary type="html">&lt;p&gt;Prg3: /* Analyzing Xdebug profiling files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PHP has two significant profilers. One is [http://www.xdebug.org/docs/profiler XDebug]. XDebug is well known and understood and its trace output is supported by tools like [http://kcachegrind.sourceforge.net/html/Home.html KCachegrind]. The other is [http://pecl.php.net/package/xhprof xhprof], a profiler released by facebook&#039;s engineering team, designed for capturing profile traces on live servers.&lt;br /&gt;
&lt;br /&gt;
==XHProf==&lt;br /&gt;
&lt;br /&gt;
NOTE: xhprof is not supported with php7, for a feature identical solution see Tideways below.&lt;br /&gt;
&lt;br /&gt;
XHProf aims to have the minimum impact on execution times and require relatively little space to store a trace, so you can run it live without a noticeable impact on users and without filling disks. The trade off with XHProf is in &#039;&#039;slightly&#039;&#039; less detail and a trace format that needs its own GUI to visualize (which ships with XHProf). The reason you&#039;d want to profile in a live environments (vs. on development) is certain categories of problem may only been seen live, e.g. (data related) what happens when the user table grows 100 times, the impact on &amp;quot;login.php&amp;quot;  or (service related) server to server HTTP requests.&lt;br /&gt;
&lt;br /&gt;
See&lt;br /&gt;
* [[Setting up xhprof on Moodle]]&lt;br /&gt;
* http://tjhunt.blogspot.co.uk/2013/05/performance-testing-moodle.html&lt;br /&gt;
* https://docs.google.com/presentation/d/1MV4R71UBgPgzM6I9h_yDnYcxIJlgCoLBUDtJJr-TzNI/present#slide=id.i0 presentation about using XHProf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tideways for php7 ==&lt;br /&gt;
&lt;br /&gt;
xhprof isn&#039;t supported for php7, but there is an alternative project called Tideways which is almost binary compatible. Moodle now supports Tideways as well see (MDL-55292)[https://tracker.moodle.org/browse/MDL-55292]&lt;br /&gt;
&lt;br /&gt;
NOTE: Tideways is large paid service. This has caused some confusion, but the component which does the php7 instrumentation for profiling is open source and freely available.&lt;br /&gt;
&lt;br /&gt;
For installation details please see:&lt;br /&gt;
&lt;br /&gt;
https://tideways.io/profiler/downloads&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Xdebug==&lt;br /&gt;
&lt;br /&gt;
[http://xdebug.org/docs/profiler Xdebug] is a powerful PHP debugging tool. The first release of Xdebug was in 2002, since that it keeps growing and remains popular among PHP developers. Among its major features are stack and function tracing, code coverage analysis, remote debugging and scripts profiling. As the page topic suggests, we will focus on its profiling feature, which provides developer with detailed information about the script performance, helps identifying which parts of the code are slow. Collected information is being stored in cachegrind compatible file and can be analysed using one of external tools, such as [http://kcachegrind.sourceforge.net/html/Home.html KCachegrind], [http://sourceforge.net/projects/wincachegrind/ WinCacheGrind], [http://code.google.com/p/xdebugtoolkit/ xdebugtoolkit] or web-based analyser [https://github.com/jokkedk/webgrind#readme Webgrind]. Xdebug is simple to install and operate, it does not require code changes.&lt;br /&gt;
&lt;br /&gt;
===Installing Xdebug extension===&lt;br /&gt;
&lt;br /&gt;
The first step that has to be done is installing Xdebug extension. This procedure depends on the OS you are using, but general idea is to obtain Xdebug php extension and specify full path to it using &#039;&#039;zend_extension&#039;&#039; setting in &#039;&#039;php.inf&#039;&#039; file. Official [http://www.xdebug.org/docs/install Xdebug installation documentation] explains its installation on Windows, installing through PEAR/PECL and compiling from source.&lt;br /&gt;
Xdebug has been packaged for many Linux distributions, so it can be installed using corresponding package management tool. On Debian or Ubuntu, for example one would need to execute:&lt;br /&gt;
&lt;br /&gt;
 # apt-get install php5-xdebug&lt;br /&gt;
&lt;br /&gt;
This will put &#039;&#039;xdebug.so&#039;&#039; in default php modules directory and create &#039;&#039;/etc/php5/conf.d/xdebug.ini&#039;&#039; file with single line:&lt;br /&gt;
&lt;br /&gt;
 zend_extension=/usr/lib/php5/20090626/xdebug.so&lt;br /&gt;
&lt;br /&gt;
Note that this is equal to specifying the same line in &#039;&#039;php.inf&#039;&#039;, example above just reflects split php configuration.&lt;br /&gt;
&lt;br /&gt;
Once the Xdebug extension is installed and specified in php configuration, one may restart the webserver and information about Xdebug should appear in &#039;&#039;phpinfo()&#039;&#039; function output. If not, make sure that &#039;&#039;zend_extension&#039;&#039; line is not commented out, extension file exists in specified location and refer to webserver logs for more details.&lt;br /&gt;
&lt;br /&gt;
===Configuring Xdebug Profiler===&lt;br /&gt;
&lt;br /&gt;
When Xdebug extension is installed, it is time to configure profiling functionality. (If you are running apache2 as your web server and are using split configuration files such as the default apt-get install mentioned above, these settings should be added to &amp;quot;/etc/php5/apache2/conf.d/xdebug.ini&amp;quot;.)  There are number of parameters related to profiling, all of them start with &#039;&#039;xdebug.profiler_&#039;&#039; prefix. First of all, profiler should be enabled. There are two ways of doing it. One way is keeping it always enabled, so profiling information will be generated on every page request:&lt;br /&gt;
&lt;br /&gt;
 xdebug.profiler_enable=1&lt;br /&gt;
&lt;br /&gt;
Another way is making Xdebug writing profiling information on demand by triggering it with GET/POST or COOKIE variable named &#039;&#039;XDEBUG_PROFILE&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 xdebug.profiler_enable_trigger = 1&lt;br /&gt;
&lt;br /&gt;
This option is preferable for several reasons: profiling data files are relatively large especially on complex scripts and you may run out of disk-space pretty quick, it allows generating profiling information only when you need it, thus it is easier to find the generated file in output directory, finally, on demand profiling can be done on production servers, though it is not recommended. If you have enabled &#039;&#039;xdebug.profiler_enable_trigger&#039;&#039; option, make sure that &#039;&#039;xdebug.profiler_enable&#039;&#039; is disabled, otherwise this will lead to dump file being generated on each request.&lt;br /&gt;
&lt;br /&gt;
Whatever method of profiling enabling you have chosen, profiling data files will be generated on each request (or request with a trigger parameter) in directory specified with &#039;&#039;xdebug.profiler_output_dir&#039;&#039; directive. By default is it set to &#039;&#039;/tmp&#039;&#039;, but you may change it to any more suitable location.&lt;br /&gt;
&lt;br /&gt;
 xdebug.profiler_output_dir=/tmp&lt;br /&gt;
&lt;br /&gt;
Generated file will be named in accordance with &#039;&#039;xdebug.profiler_output_name&#039;&#039; setting. This setting can handle some specifiers and use them in the file name. Default name pattern is &#039;&#039;cachegrind.out.%p&#039;&#039;; in the actual file name %p will be replaced with process ID value. The fill list of specifier can be found [http://www.xdebug.org/docs/all_settings#trace_output_name here]. More intuitive naming is recommended, so that it is easier to find the file you have just generated in the bunch of others:&lt;br /&gt;
&lt;br /&gt;
 xdebug.profiler_output_name=cachegrind.out.%R.%t&lt;br /&gt;
&lt;br /&gt;
With this naming pattern, timestamp and script name will be reflected in the file name.&lt;br /&gt;
&lt;br /&gt;
When you are done with configuration, it is time to test it. First of all, the webserver has to be restarted, so that the new config will come into effect. Depending on your operating system and web server, you should be able to restart it with a command similar to:&lt;br /&gt;
&lt;br /&gt;
 sudo service apache2 restart&lt;br /&gt;
&lt;br /&gt;
(This should work for apache2 on several flavours of Linux.)&lt;br /&gt;
&lt;br /&gt;
===Profiling a page===&lt;br /&gt;
&lt;br /&gt;
Now assuming that Xdebug was configured to use a trigger for script profiling, open any php page on your server in your browser having added &#039;&#039;XDEBUG_PROFILE&#039;&#039; parameter to URL string:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://servername/moodle2/index.php?XDEBUG_PROFILE&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or if it already has some parameters, just add our trigger to the URL end:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://servername/moodle2/mod/forum/view.php?id=5&amp;amp;XDEBUG_PROFILE&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result, the new file should be generated in directory you specified with &#039;&#039;xdebug.profiler_output_dir&#039;&#039; directive:&lt;br /&gt;
&lt;br /&gt;
 cachegrind.out._moodle2_mod_forum_view_php.1289838411&lt;br /&gt;
 cachegrind.out._moodle2_index_php.1289837892&lt;br /&gt;
&lt;br /&gt;
Triggering profiling with POST requests or AJAX queries is also possible without code changes. [https://addons.mozilla.org/en-US/firefox/addon/58688/ Easy Xdebug] plugin for FireFox has profiling toggle button that inserts XDEBUG_PROFILE variable into cookie data, thus making profiling enabled for as long as you wish for all requests. Similar plugins exist for [https://chrome.google.com/extensions/detail/eadndfjplgieldjbigjakmdgkmoaaaoc Chrome] and [https://github.com/benmatselby/xdebug-toggler Safari] browsers.&lt;br /&gt;
&lt;br /&gt;
===Analyzing Xdebug profiling files===&lt;br /&gt;
&lt;br /&gt;
As it was pointed out earlier, profiling data is recoded in cachegrind format, so it can be analysed using one of external tools, such as [https://kcachegrind.github.io/html/Home.html KCachegrind], [http://sourceforge.net/projects/wincachegrind/ WinCacheGrind], [http://code.google.com/p/xdebugtoolkit/ xdebugtoolkit] or web-based analyser [https://github.com/jokkedk/webgrind#readme Webgrind]. Using these tools is pretty simple. I prefer KCachegrind which has a feature to show the matching code if web-server is run on the same box. Xdebug profiler documentation page has a [http://xdebug.org/docs/profiler#misc section] about KCachegrind that worth reading for everyone who starts using KCachegrind.&lt;br /&gt;
&lt;br /&gt;
===Quick summary===&lt;br /&gt;
&lt;br /&gt;
1. Install XDebug extension on your server.&lt;br /&gt;
&lt;br /&gt;
2. Add something like this to your php.ini file:&lt;br /&gt;
 zend_extension = /usr/lib/php5/20090626/xdebug.so&lt;br /&gt;
 xdebug.profiler_enable = 0&lt;br /&gt;
 xdebug.profiler_enable_trigger = 1&lt;br /&gt;
 xdebug.profiler_output_dir = /var/tmp&lt;br /&gt;
 xdebug.profiler_output_name = cachegrind.out.%R.%t&lt;br /&gt;
or add something like this to your .htaccess file&lt;br /&gt;
 php_flag xdebug.profiler_enable off&lt;br /&gt;
 php_flag xdebug.profiler_enable_trigger on&lt;br /&gt;
 php_value xdebug.profiler_output_dir /var/tmp&lt;br /&gt;
 php_value xdebug.profiler_output_name cachegrind.out.%R.%t&lt;br /&gt;
&lt;br /&gt;
3. When you want to profile a page, add &amp;lt;tt&amp;gt;&amp;amp;XDEBUG_PROFILE&amp;lt;/tt&amp;gt; to the end of the URL.&lt;br /&gt;
&lt;br /&gt;
4. Open the &amp;lt;tt&amp;gt;cachegrind.out....&amp;lt;/tt&amp;gt; file that is generated with one of the tools mentioned above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=162045 Forum thread about profiling Moodle 2.0]&lt;br /&gt;
XHProf articles:&lt;br /&gt;
* [https://docs.google.com/present/view?id=dcbkgbgf_45fbg3rnmk&amp;amp; Presentation about XHProf]&lt;br /&gt;
* [http://techportal.ibuildings.com/2009/12/01/profiling-with-xhprof/ Profiling with XHProf]&lt;br /&gt;
* [http://www.open.ac.uk/blogs/XHProf/?page_id=46 XHProf – Profiling and Reporting] from Moodle perspective written by [http://moodle.org/user/view.php?id=264538&amp;amp;course=5 James Brisland]&lt;br /&gt;
Xdebug articles:&lt;br /&gt;
* [http://devzone.zend.com/article/2803-Introducing-xdebug Introducing xdebug]&lt;br /&gt;
* [http://blog.teamlazerbeez.com/2010/05/04/xdebug-quickstart-profiling-in-php/ Xdebug Quickstart: Profiling in PHP]&lt;/div&gt;</summary>
		<author><name>Prg3</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Translation_FAQ&amp;diff=54337</id>
		<title>Translation FAQ</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Translation_FAQ&amp;diff=54337"/>
		<updated>2018-06-05T16:24:20Z</updated>

		<summary type="html">&lt;p&gt;Prg3: /* The month names and days are displayed in English. How can I translate them? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Translation}}&lt;br /&gt;
==How can I help with translating Moodle?==&lt;br /&gt;
&lt;br /&gt;
Please see the guide [[Contributing a translation]].&lt;br /&gt;
&lt;br /&gt;
==I&#039;ve found an error in a language pack. What do I do?==&lt;br /&gt;
&lt;br /&gt;
* You are welcome to [[Contributing a translation|contribute a fix]] for the error. Alternatively you can contact the language pack maintainer as listed in the [http://lang.moodle.org/local/amos/credits.php Translation credits].&lt;br /&gt;
* English language string typo fixes and suggested improvements can be [[Improving English language strings|contributed to the English (fixes) (en_fix) language pack]].&lt;br /&gt;
&lt;br /&gt;
==The month names and days are displayed in English. How can I translate them?==&lt;br /&gt;
&lt;br /&gt;
Names of days and months are pulled out of your operating system. The system is configured for Moodle in langconfig.php where you have the strings &#039;&#039;locale&#039;&#039; (for -nix type operating systems) and &#039;&#039;localewin&#039;&#039; (for Windows operating systems) that should point to the right locale on your server. Your server operating system should support the language (= locale should be installed) - see also [http://moodle.org/mod/forum/discuss.php?d=79792 Month-name translation problem] for an alternative solution.&lt;br /&gt;
&lt;br /&gt;
On Ubuntu/Debian, the locale-all package that needs to be installed.&lt;br /&gt;
&lt;br /&gt;
==Why are log descriptions displayed in English?==&lt;br /&gt;
&lt;br /&gt;
In log reports, descriptions are intended to be displayed in English only; it is not possible to translate them. For example &amp;quot;The user with id &#039;2&#039; viewed the course with id &#039;4&#039;.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==I&#039;m starting a new language pack or I&#039;m contributing to one. Can I do the user interface strings first?==&lt;br /&gt;
&lt;br /&gt;
No, there is no way to know which strings will be shown for users and which not. But to help you a little bit, there are some unofficial priorities you can take into account.&lt;br /&gt;
&lt;br /&gt;
First:&lt;br /&gt;
* make sure [[Translation_langconfig|langconfig]] is properly set up.&lt;br /&gt;
* take a look at [[Translation priority]]. All files have a rating according to how urgent they need translating.&lt;br /&gt;
* less urgent are also the contributed plugins, since they are not part of a standard Moodle distribution. There is a list of [https://moodle.org/plugins/stats.php the 20 top plugins downloads for Moodle] which might be worth considering for translation priority.&lt;br /&gt;
&lt;br /&gt;
==How many words are there in the English language pack?==&lt;br /&gt;
&lt;br /&gt;
See the discussion [http://lang.moodle.org/mod/forum/discuss.php?d=3651 How many words are there in the English language pack?].&lt;br /&gt;
&lt;br /&gt;
==Moodle languages with several available language packs==&lt;br /&gt;
===Are there translations for the American (and other branches of the) English language?===&lt;br /&gt;
&lt;br /&gt;
* The [http://lang.moodle.org/mod/forum/discuss.php?d=2617 &amp;quot;official&amp;quot;] language for Moodle is actually Australian English (&#039;&#039;G&#039;day mate!&#039;&#039;) , which is almost 100% the same as UK English.&lt;br /&gt;
* [http://english.stackexchange.com/questions/74737/what-is-the-origin-of-the-phrase-two-nations-divided-by-a-common-language Someone] once said &amp;quot;America and England are two nations divided by a common language&amp;quot;.&lt;br /&gt;
* The [http://download.moodle.org/download.php/langpack/2.6/en_us.zip English - United States (en_us)] language pack mostly contains different spellings (color &#039;&#039;versus&#039;&#039; colour, enroll &#039;&#039;versus&#039;&#039; enrol etc).&lt;br /&gt;
* The [http://download.moodle.org/download.php/langpack/2.6/en_ar.zip English - Pirate (en_ar)] language pack is used in the &#039;[https://moodle.org/mod/forum/discuss.php?d=132888 Talk Like a Pirate]&#039; day.&lt;br /&gt;
* The [https://download.moodle.org/download.php/langpack/3.2/en_us_k12.zip English US-K12] language pack is used in the [https://en.wikipedia.org/wiki/K%E2%80%9312 K-12] (kindergargarten to grade 12) primary  and secondary education in  the USA, Canada, and other English speaking countries.&lt;br /&gt;
* The [http://download.moodle.org/download.php/langpack/2.6/en_kids.zip English for kids (en_kids)] language pack seems to be a simplified version of the most common English strings seen by Moodle users, considered easier/suitable for small children.&lt;br /&gt;
&lt;br /&gt;
* The [https://tracker.moodle.org/browse/MDLSITE-1363 English (fixes) (en_fix)] is just used to suggest Moodle core language strings improvements and typo fixes.&lt;br /&gt;
&lt;br /&gt;
===Why do Moodle has four different language packs for the German language?===&lt;br /&gt;
* In Germany we have a formal language where people are talking with „Sie“ to each other. This is the language of the formal adults. I think it’s something like using „Sir“ in english language. The normal German language pack is using this formal language. Nearly all strings in the Moodle language pack and in the translated plugins are translated in the formal language.&lt;br /&gt;
&lt;br /&gt;
* You can’t use these formal words in school … there you are using an informal language with „du“. Students are talking to each other like friends. Therefor we made the language pack „German personal“ (de_du). It come with the personal words „du“, „dein“, „dir“ and so on where the formal words are „Sie“, „Ihre“, „Ihnen“ (yes, these words are written with an uppercase letter).&lt;br /&gt;
&lt;br /&gt;
* For my (Ralf Krause) personal use I take „German personal&amp;quot; (de_du) or „German Kids“ (de_kids). „German Kids“ uses the personal words „du“, „dein“ and „dir“ but it also uses an easier to understand language.&lt;br /&gt;
&lt;br /&gt;
* Some time ago we tried to make Moodle as a platform for social communication but nobody wanted to use it. Therefore we made &amp;quot;German community“. In a social platform, nobody would talk about teachers or students or participants or classrooms or courses … in a social platform, you would use members of a group and meetings. I don’t know if this pack will be used in future.&lt;br /&gt;
&lt;br /&gt;
===Why do Moodle has several different language packs for the Spanish language?===&lt;br /&gt;
* Spain and many South American countries use a (comma) [[Decimal separator]] that is different from the (decimal point) used in Mexico and Central America.&lt;br /&gt;
** Moodle core in English uses by default a decimal point for calculations, and Moodle Docs do too.&lt;br /&gt;
** This caused many problems in the [https://docs.moodle.org/31/en/Grader_report Gradebook] calculations and with the [https://docs.moodle.org/all/es/P%C3%A1gina_Principal Spanish Moodle Docs].&lt;br /&gt;
* Just as &amp;quot;America and England are two nations divided by a common language&amp;quot;, so are Spain and Mexico. See [https://docs.moodle.org/all/es/Espa%C3%B1ol_de_M%C3%A9xico the Mexican Spanish documentation page] in Spanish.&lt;br /&gt;
* The Venezuelan Spanish (es_ve) is a very small child language of the international Spanish language.&lt;br /&gt;
* The Colombian Spanish (es_co) is a very small child language of the international Spanish language.&lt;br /&gt;
* The Mexican Spanish (es_mx) is a very modern, comprehensive, independent, language pack, specially made for Mexican Moodlers.&lt;br /&gt;
* The Mexican Spanish for kids (es_mx_kids) is a simplified version of the most common Mexican Spanish strings seen by Moodle users, considered easier/suitable for small children.&lt;br /&gt;
* You can read about [https://docs.moodle.org/all/es/Espa%C3%B1ol_internacional#Idiomas_hijos_que_depend.C3.ADan_del_Espa.C3.B1ol_internacional two (now defunct) other Spanish child languages].&lt;br /&gt;
&lt;br /&gt;
===Why do other languages have child languages?===&lt;br /&gt;
* Languages with &#039;&#039;-kids&#039;&#039; in their code names are all child languages with a simplified version of common language strings aimed at small children. &lt;br /&gt;
* If you have the time, it is probably a good idea to have one such child language for kids for your main language pack. &lt;br /&gt;
* Current (mid 2017) languages for kids are:&lt;br /&gt;
** Deutsch - Kids&lt;br /&gt;
** English for kids&lt;br /&gt;
** Español de México para niños (Mexican Spanish for kids)&lt;br /&gt;
** עברית בתי־ספר (hebrew for kids)&lt;br /&gt;
** Japanese - kids&lt;br /&gt;
** Deutsch - Kids&lt;br /&gt;
&lt;br /&gt;
* Norwegian (Primary) language pack is aimed at primary education.&lt;br /&gt;
&lt;br /&gt;
* Finnish for companies is aimed at companies&lt;br /&gt;
&lt;br /&gt;
==Are there items which are NOT to be translated?==&lt;br /&gt;
===Moodle variables enclosed within  {curly brackets}===&lt;br /&gt;
The following words, when enclosed within {curly brackets}, are placeholders for Moodle names of variables. They should not be translated, but must remain as they are within the curly brackets:&lt;br /&gt;
&lt;br /&gt;
 firstname, lastname, username, email, city, country, lang, timezone, mailformat, maildisplay, maildigest, htmleditor, ajax, autosubscribe , institution, department, idnumber, skype , msn, aim, yahoo, icq, phone1, phone2, address, url, description, descriptionformat, password, auth, oldusername , deleted, suspended, course1, course2, course3, course4&lt;br /&gt;
&lt;br /&gt;
They must also be written exactly like this in all translations of the documentation pages (such as this page.) However, the translator might like to include a translation enclosed in brackets. For example, in the Spanish documentation pages you might find: password (&#039;&#039;contraseña&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
The fact is: &#039;&#039;&#039;no placeholders can be translated in AMOS&#039;&#039;&#039;. There is no official list of &amp;quot;reserved&amp;quot; $a properties. Whatever xyz is put in {$a-&amp;gt;xyz}, it must be kept as it is in AMOS.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
[[File:26 AMOS fullnamedisplay_core original.png]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Must&#039;&#039;&#039; be (in this case, when translated into Mexican Spanish):&lt;br /&gt;
&lt;br /&gt;
[[File:26 AMOS fullnamedisplay_core.png]]&lt;br /&gt;
&lt;br /&gt;
unless your language uses lastname before the firstname, as Japanese does, which translates to:&lt;br /&gt;
&lt;br /&gt;
[[File:26 AMOS fullnamedisplay_core Japanese.png]]&lt;br /&gt;
&lt;br /&gt;
===Placeholders enclosed within % characters (%example%) must not be translated===&lt;br /&gt;
The [https://moodle.org/plugins/local_moodlecloudsignup Moodle Cloud Signup and Portal strings] local plugin is used for accessing the [https://moodle.com/cloud/ MoodleCloud] and it includes several strings that have some words surrounded by % characters (eg, %date%). These words must not be translated, they must be copied exactly into the language pack translation, but the rest of the string might or might not be translated.&lt;br /&gt;
&lt;br /&gt;
* Example of one string that can not be translate and must be copied exactly:&lt;br /&gt;
[[File:AMOS placeholders with percentace character.png|600px]]&lt;br /&gt;
&lt;br /&gt;
* Example of one string with one placeholder (highlighted) and some regular text that can be easily translated:&lt;br /&gt;
[[File:AMOS text with placeholders with percentace character.png|600px]]&lt;br /&gt;
&lt;br /&gt;
=== All fieldnames must be kept in English===&lt;br /&gt;
* These names are hooks that are used in the software. You should not translate them.&lt;br /&gt;
* See the example below for the string uploadcourses_help in the file tool_uploadcourse for Moodle 3.1:&lt;br /&gt;
[[File:Fieldnames are not to be translatd.png]]&lt;br /&gt;
* Notice that the string text indicates (red rectangle) that these words (enclosed in green rectangles) are fieldnames. Also notice that the Spanish translation clearly indicates, at the final part of the paragraph &#039;&#039;(así escritos, en inglés)&#039;&#039; that these fieldnames must be written in English as they are written here.&lt;br /&gt;
* Some used fieldnames in Moodle are:&lt;br /&gt;
&lt;br /&gt;
 category, category_id, category_idnumber, category_path, context, course, description, descriptionformat, email, enrolmentkey, firstname, fullname, groupname, hidepicture, idnumber, intro, lastname, maxgrade, maxrequest, name, password, picture, section, shortname, teachers, timeopen, timeclose, timeend, timestart, username, visible, &lt;br /&gt;
&lt;br /&gt;
* Note that these fieldnames may appear as real fieldnames (must not be translated) or as regular words in another context (can and must be translated). You should exercise caution and, If possible, always check that Moodle works correctly by testing your translations with some data in a real or test server.&lt;br /&gt;
&lt;br /&gt;
===Local addresses after &amp;lt;a href=&amp;quot;../===&lt;br /&gt;
Addresses inside a Language string that have &amp;lt;a href=&amp;quot;../  reference a specific URL inside your Moodle server and you must keep the address part of the expression, but you can translate the descriptive name part. See the following example:&lt;br /&gt;
 noassignableroles | tool_cohortautoroles&lt;br /&gt;
 There are currently no roles that can be assigned in the user context. &amp;lt;a href=&amp;quot;../../roles/manage.php&amp;quot;&amp;gt;Manage roles&amp;lt;/a&amp;gt;&lt;br /&gt;
* You must keep the &amp;lt;a href=&amp;quot;../../roles/manage.php&amp;quot;&amp;gt; part, as this references to the [https://docs.moodle.org/31/en/PHP PHP] code in your Moodle server that will be executed in order to manage roles&lt;br /&gt;
* You can/should/must translate &#039;Manage roles&#039;&lt;br /&gt;
* Do not forget to keep the ending &amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Moodle Docs addresses after &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;a href=&amp;quot;http://docs.moodle.org/en/&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;===&lt;br /&gt;
Addresses inside a Language string that have &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;a href=&amp;quot;http://docs.moodle.org/en/ &amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;reference a specific URL in the Moodle English Documentation. You must look at that address and &#039;&#039;&#039;only&#039;&#039;&#039; if your language has a valid translation for that page, you can/should replace the original English Docs address with your own language address. See the following example:&lt;br /&gt;
 core backup | nonisowarning&lt;br /&gt;
 Warning: this backup is from a non-Unicode version of Moodle (pre 1.6). If this backup contains any non-ISO-8859-1 texts then they may be CORRUPTED if you try to restore them to this Unicode version of Moodle. See the &amp;lt;a href=&amp;quot;http://docs.moodle.org/en/Backup_FAQ&amp;quot;&amp;gt;Backup FAQ&amp;lt;/a&amp;gt; for more information about how to recover this backup correctly.&lt;br /&gt;
* There are six different language translations for that page. So, you can only replace this address if your language is one of these.&lt;br /&gt;
&lt;br /&gt;
===Other internet addresses after &amp;lt;a href=&amp;quot;http://===&lt;br /&gt;
* You must proceed as with Moodle Docs addresses:&lt;br /&gt;
* Example:&lt;br /&gt;
 auth_radius | auth_radiusdescription&lt;br /&gt;
 This method uses a &amp;lt;a href=&amp;quot;http://en.wikipedia.org/wiki/RADIUS&amp;quot;&amp;gt;RADIUS&amp;lt;/a&amp;gt; server to check whether a given username and password is valid.&lt;br /&gt;
* You must check the (English language wikipedia) page about the RADIUS server, and then you can decide whether to keep this address or replace it with your own language matching wikipedia translation.&lt;br /&gt;
&lt;br /&gt;
===HTML codes that must not be translated===&lt;br /&gt;
The following HTML codes are reserved words that must not be translated. However, it is important for the translators to understand their meaning in order to decide whether to keep them in the translation and if so, whether they can be rearranged.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;nbsp&amp;lt;/code&amp;gt; - non-breaking space i.e. a space but there will never be a line-break inserted instead of this space at the end of a line.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;ensp&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;amp;emsp&amp;lt;/code&amp;gt; - denote an en space and an em space respectively, where an en space is half the point size and an em space is equal to the point size of the current font. For fixed pitch fonts, the user agent can treat the en space as being equivalent to a single space character, and the em space as being equuivalent to two space characters. &lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;amp&amp;lt;/code&amp;gt; - ampersand sign (&amp;amp;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;apos&amp;lt;/code&amp;gt; - apostrophe sign (&#039;)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;copy&amp;lt;/code&amp;gt; - copyright sign (©)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;plusmn&amp;lt;/code&amp;gt; - &amp;quot;plus or minus&amp;quot; sign (±)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;times&amp;lt;/code&amp;gt; - multiply sign (*)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;divide&amp;lt;/code&amp;gt; - divide sign (/)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;gt&amp;lt;/code&amp;gt; - &amp;quot;greater than&amp;quot; sign ( &amp;gt; )&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lt&amp;lt;/code&amp;gt; - &amp;quot;less than&amp;quot; sign (&amp;lt;) &lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;laquo&amp;lt;/code&amp;gt; - quotation mark (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;lsquo&amp;lt;/code&amp;gt; - left single quotation sign (‘)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;rsquo&amp;lt;/code&amp;gt; - right single quotation sign (’)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;ouml&amp;lt;/code&amp;gt; - small letter o with diaeresis (ö)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;mdash&amp;lt;/code&amp;gt; - [https://en.wikipedia.org/wiki/Dash#Em_dash em dash] sign (—)&lt;br /&gt;
&lt;br /&gt;
===Calculation functions must not be translated===&lt;br /&gt;
[https://docs.moodle.org/32/en/Grade_calculations#Calculation_functions Calculation functions] start with an equal sign (=). Following is an expression using operators and functions supported by the system.&lt;br /&gt;
[[File:DO NOT translate calculation functions.png]]&lt;br /&gt;
&lt;br /&gt;
===The &#039;thisdirection&#039; and &#039;thisdirectionvertical&#039; strings in core_langconfig should never be translated===&lt;br /&gt;
&#039;&#039;&#039;The &#039;thisdirection&#039; and &#039;thisdirectionvertical&#039; strings in core_langconfig should never be translated, as they are not variables meant to be translated. They are prefixing selectors used by the themes to display left-to-right or right-to-left languages. Read [https://moodle.org/mod/forum/discuss.php?d=328567#p1323101 more about problems with these variables].&lt;br /&gt;
&lt;br /&gt;
==Is there a way to check the integrity of all placeholders in a language pack?==&lt;br /&gt;
* Not a at the moment. See MDL-51775 .&lt;br /&gt;
* You can use [https://lang.moodle.org/mod/forum/discuss.php?d=4661 this trick] to check for integrity:&lt;br /&gt;
**   Load the language pack in a [https://download.moodle.org/windows/ local instance of Moodle].&lt;br /&gt;
**   In order to generate a [https://lang.moodle.org/mod/forum/discuss.php?d=4098 translation memory], load the language pack in the [https://docs.moodle.org/29/en/Language_customisation Language customization] tool, so that the texts are loaded in the database.&lt;br /&gt;
**    Run the sql instance in the file (tm_generator.txt)&lt;br /&gt;
**    Insert the result of the query in template.tmx file&lt;br /&gt;
** The result is a translation memory that can be analysed  with [http://www.opentag.com/okapi/wiki/index.php?title=CheckMate Checkmate].&lt;br /&gt;
** The problem: probably you will get many errors due to some characters that are not allowed by Checkmate so you will have to remove manually some translation units. After doing it, you will get a report with some possible errors (see the attached image).&lt;br /&gt;
** Of course, it would be great to have an integrated quality check system in Moodle. Vote for MDL-51775 .&lt;br /&gt;
&lt;br /&gt;
* The contents of the file tm_generator.txt are (&#039;&#039;&#039;change the language from eu to your language&#039;&#039;&#039;):&lt;br /&gt;
 SELECT concat(&#039;&amp;lt;tu tuid=&amp;quot;&#039;,mdl_tool_customlang_components.name,&#039;|&#039;,mdl_tool_customlang.stringid,&#039;&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;tuv xml:lang=&amp;quot;en&amp;quot;&amp;gt;&amp;lt;seg&amp;gt;&#039;,mdl_tool_customlang.original,&#039;&amp;lt;/seg&amp;gt;&amp;lt;/tuv&amp;gt;&lt;br /&gt;
 &amp;lt;tuv xml:lang=&amp;quot;&#039;,mdl_tool_customlang.lang,&#039;&amp;quot;&amp;gt;&amp;lt;seg&amp;gt;&#039;,mdl_tool_customlang.master,&#039;&amp;lt;/seg&amp;gt;&amp;lt;/tuv&amp;gt;&lt;br /&gt;
 &amp;lt;/tu&amp;gt;&#039;) as txt&lt;br /&gt;
 FROM mdl_tool_customlang INNER JOIN mdl_tool_customlang_components ON mdl_tool_customlang.componentid =  mdl_tool_customlang_components.id&lt;br /&gt;
 WHERE (((mdl_tool_customlang.lang)=&amp;quot;eu&amp;quot;) AND ((mdl_tool_customlang.original) Is Not Null) AND ((mdl_tool_customlang.master)  &amp;lt;&amp;gt;mdl_tool_customlang.original));&lt;br /&gt;
&lt;br /&gt;
* the contents of the template.tmx file are:&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;tmx version=&amp;quot;1.4&amp;quot;&amp;gt;&amp;lt;header creationtool=&amp;quot;SQLQuery&amp;quot; creationtoolversion=&amp;quot;unknown&amp;quot; segtype=&amp;quot;paragraph&amp;quot; o-tmf=&amp;quot;unknown&amp;quot; adminlang=&amp;quot;en&amp;quot; srclang=&amp;quot;en&amp;quot; datatype=&amp;quot;unknown&amp;quot;&amp;gt;&amp;lt;/header&amp;gt;&amp;lt;body&amp;gt;&lt;br /&gt;
 PLACE HERE THE RESULT OF THE SQL QUERY&lt;br /&gt;
 &amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/tmx&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==What is a &#039;&#039;translation memory&#039;&#039; and how can I create a translation memory out of a Moodle language pack?==&lt;br /&gt;
* Read the &#039;Is there a way to check the integrity of all placeholders in a language pack?&#039; section above.&lt;br /&gt;
* See [https://lang.moodle.org/mod/forum/user.php?id=1489&amp;amp;page=1 this post] and [https://dl.dropboxusercontent.com/u/86242384/moodle/en/publish/moodle_tm/website_index.html this tutorial].&lt;br /&gt;
&lt;br /&gt;
==How can I help with translating Moodle documentation?==&lt;br /&gt;
&lt;br /&gt;
Please see the guide [[Translating Moodle Docs]].&lt;br /&gt;
&lt;br /&gt;
==How can I find out the context of the strings?==&lt;br /&gt;
&lt;br /&gt;
You can find where a language string is located as described in the user docs [[:en:Language FAQ|Language FAQ]].&lt;br /&gt;
&lt;br /&gt;
You may wish to use two windows (perhaps using two monitors), with one displaying the page in English and the other displaying the page in your language.&lt;br /&gt;
&lt;br /&gt;
[[File:two windows translation.jpg|Two simultaneous windows in two languages|800px]]&lt;br /&gt;
&lt;br /&gt;
If you think the original English language strings have more than one meaning and you can&#039;t guess which one applies, you are welcome to post in the [https://lang.moodle.org/mod/forum/view.php?id=5 AMOS translation forum]. &lt;br /&gt;
&lt;br /&gt;
==Is there a list of Moodle error messages which can be translated?==&lt;br /&gt;
&lt;br /&gt;
Error messages are listed in the user docs [[:en:Category:Error|Category:Error]].&lt;br /&gt;
&lt;br /&gt;
==Can the subtitles for Moodle HQ YouTube videos be translated?==&lt;br /&gt;
For  Moodle 3.2 onwards, yes. See [[Translating Moodle video subtitles]]. &lt;br /&gt;
&lt;br /&gt;
See also  [https://lang.moodle.org/mod/forum/discuss.php?d=4739#p5582 this forum thread].&lt;br /&gt;
&lt;br /&gt;
==Can the User Tours from Moodle.net be translated?==&lt;br /&gt;
* Yes. See [[Translating User tours from Moodle.net]]&lt;br /&gt;
&lt;br /&gt;
==How can I test my plugins translations of several (different) Moodle branches?==&lt;br /&gt;
&lt;br /&gt;
*Linux&lt;br /&gt;
** You can have several Moodle branches in one Ubuntu (or any other Linux distro) machine by following [https://docs.moodle.org/31/en/Step-by-step_Installation_Guide_for_Ubuntu#Hosting_several_Moodle_branches_in_one_Ubuntu_server these steps].&lt;br /&gt;
&lt;br /&gt;
* Windows&lt;br /&gt;
** You can have several [https://download.moodle.org/windows/ local Moodle servers] in different folders in a Windows 7 PC. It is very easy to start one branch server, work on it, stop it and then start a different branch.&lt;br /&gt;
{{Note|Some early local Moodle (versions before 3.0) server packages from [https://download.moodle.org/windows/ https://download.moodle.org/windows/] only work in Windows 7, but apparently not in Windows 8 and definitely not in Windows 10, regardless of compatibility settings. For these you would need to install XAMP separately. Moodle 3.0 and newer branches do work under Windows 10.}}&lt;br /&gt;
&lt;br /&gt;
*Mac&lt;br /&gt;
**We need to write about this...&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[:en:Language customization|Language customization]] in the user docs for information on how to edit an existing language pack&lt;br /&gt;
* [[String Deprecation]] is introduced in Moodle 2.8 to help minimize the language files but avoid accidental lost of translations by simply removing strings. &lt;br /&gt;
* [https://lang.moodle.org/mod/forum/discuss.php?d=4098#p4879 Generating a translation memory and running a quality test] forum discussion&lt;br /&gt;
* [https://moodle.org/mod/forum/discuss.php?d=347843 translation in context] forum discussion&lt;br /&gt;
&lt;br /&gt;
[[de:Übersetzung FAQ]]&lt;/div&gt;</summary>
		<author><name>Prg3</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Projects_for_new_developers&amp;diff=53655</id>
		<title>Projects for new developers</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Projects_for_new_developers&amp;diff=53655"/>
		<updated>2018-01-29T15:46:36Z</updated>

		<summary type="html">&lt;p&gt;Prg3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{GSOC}}&lt;br /&gt;
==Getting started==&lt;br /&gt;
&lt;br /&gt;
Moodle uses PHP, JavaScript, SQL and a number of other Web languages, so learning those is a good place to start.&lt;br /&gt;
&lt;br /&gt;
When you have some basic PHP programming skills, you may wish to start learning about how the Moodle code is organised. It is recommended that you complete the [http://dev.moodle.org/course/view.php?id=2 Introduction to Moodle Programming] course on [http://dev.moodle.org/ dev.moodle.org]. To access this you will need to have an account on moodle.org first.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;If you are looking for projects suggested in the tracker, look for issues with the [https://tracker.moodle.org/issues/?jql=labels%20in%20%28addon_candidate%29 &#039;addon_candidate&#039; label].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;If you are looking to make a quick contribution, look for tracker issues with marked as [https://tracker.moodle.org/issues/?jql=Difficulty%20%3D%20Easy easy].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Please consider adopting a [https://moodle.org/plugins/browse.php?list=set&amp;amp;id=61 plugin seeking a new maintainer]&#039;&#039;. See the [https://moodle.org/mod/forum/discuss.php?d=260354 Plugins adoption programme].&lt;br /&gt;
&lt;br /&gt;
As you become more involved in Moodle development, you might like to learn more about the [[Coding|coding conventions]] used and how changes to Moodle core code are [[Process|processed]].&lt;br /&gt;
&lt;br /&gt;
==Potential projects==&lt;br /&gt;
&lt;br /&gt;
This evolving page lists possible Moodle projects for new developers derived from community suggestions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;If you have any ideas for new features in Moodle which might be suitable as projects for new developers, please see [[New feature ideas]].&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Pusher integration for HTML5 push notifications ===&lt;br /&gt;
Moodle supports message output plugins. By adding a plugin for pusher.com and a Javascript service worker to listen for push notifications, we can have realtime HTML5 notifications on all platforms.&lt;br /&gt;
:&#039;&#039;&#039;Skills required&#039;&#039;&#039;: Javascript (JQuery, AMD), PHP&lt;br /&gt;
:&#039;&#039;&#039;Difficulty level&#039;&#039;&#039;: Medium&lt;br /&gt;
&lt;br /&gt;
=== Improve SCORM plugin ===&lt;br /&gt;
There are a number of areas of SCORM that could be improved as part of a GSOC project, some of these are bigger projects and others could be combined to form a single project.&lt;br /&gt;
&lt;br /&gt;
These are just some examples, take a look at the open SCORM issues in the Moodle tracker for a list of other issues.&lt;br /&gt;
* Improve Grading (MDL-51086, MDL-52871, MDL-55004, MDL-37421)&lt;br /&gt;
* Add Support for Safe Exam Browser (MDL-41054)&lt;br /&gt;
* Add new option to force new attempts (MDL-32585)&lt;br /&gt;
* Improve validation of SCORM packages (MDL-38060, MDL-24057)&lt;br /&gt;
* Convert YUI Treeview to use Jquery (Moodle is moving away from YUI and the existing Treeview has a few issues)&lt;br /&gt;
&lt;br /&gt;
Requirement for prospective students:&lt;br /&gt;
* We require prospective students to make an attempt at fixing at least 1 issue in the Moodle tracker before their proposal can be considered. This MUST be completed before your application can be considered valid.&lt;br /&gt;
:&#039;&#039;&#039;Skills required&#039;&#039;&#039;: PHP&lt;br /&gt;
:&#039;&#039;&#039;Difficulty level&#039;&#039;&#039;: Medium&lt;br /&gt;
:&#039;&#039;&#039;Possible mentor&#039;&#039;&#039;: [http://moodle.org/user/view.php?id=21591&amp;amp;course=5 Dan Marsden]&lt;br /&gt;
&lt;br /&gt;
=== Advanced Grading in Forums ===&lt;br /&gt;
Finish the work required to add the advanced grading feature to the Moodle forum activity. This builds on some existing work available at MDL-31860&lt;br /&gt;
&lt;br /&gt;
Deliverables:&lt;br /&gt;
* Update existing patch to work on latest master branch (existing patch based on an early release of 2.9)&lt;br /&gt;
* Modify the forum grading so that it pushes 2 grade areas (or 3 including ratings) into the gradebook instead of a single grade.&lt;br /&gt;
* Improve interface that allows overall forum participation grading.&lt;br /&gt;
* Behat tests for all new functionality.&lt;br /&gt;
* The code should pass 100% of the Moodle codechecking tools to ensure the code meets with Moodle Guidelines.&lt;br /&gt;
&lt;br /&gt;
Extra requirement for prospective students:&lt;br /&gt;
* We require prospective students to make an attempt at fixing at least 1 issue in the Moodle tracker before their proposal can be considered - on top of this you must also attempt to convert one existing QA test into a Behat test. This MUST be completed before your application can be considered valid.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Skills required&#039;&#039;&#039;: PHP&lt;br /&gt;
:&#039;&#039;&#039;Difficulty level&#039;&#039;&#039;: Medium&lt;br /&gt;
:&#039;&#039;&#039;Possible mentor&#039;&#039;&#039;: [http://moodle.org/user/view.php?id=21591&amp;amp;course=5 Dan Marsden]&lt;br /&gt;
&lt;br /&gt;
=== Improve end-to-end testing in the Mobile app ===&lt;br /&gt;
&lt;br /&gt;
[https://angular.github.io/protractor/#/ Protractor] is an end-to-end test framework for AngularJS applications. Protractor runs tests against your application running in a real browser, interacting with it as a user would.&lt;br /&gt;
&lt;br /&gt;
There are almost 40 e2e tests in the Mobile app, right now tests only works in old versions of Node and Protractor. &lt;br /&gt;
&lt;br /&gt;
The aim of this project is to upgrade the Node, Protractor, Selenium and the rest of dependencies to be able to run tests in both a browser and in real devices via external systems like Saucelabs. &lt;br /&gt;
&lt;br /&gt;
Tasks:&lt;br /&gt;
* Upgrade the Node, Protractor and dependencies versions to be able to run tests in modern environments.&lt;br /&gt;
* Configure the app to be able to be launched in Saucelabs via Travis (if possible).&lt;br /&gt;
* Fix existing tests that are failing&lt;br /&gt;
* Update Moodle Mobile documentation with new instructions for setting up both environments.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Skills required:&#039;&#039;&#039; Javascript (AngularJS)&lt;br /&gt;
:&#039;&#039;&#039;Difficulty level:&#039;&#039;&#039; Medium&lt;br /&gt;
:&#039;&#039;&#039;Possible mentor:&#039;&#039;&#039; [https://moodle.org/user/profile.php?id=49568 Juan Leyva]&lt;br /&gt;
&lt;br /&gt;
=== Migrate Moodle Mobile publishing scripts to Gulp tasks ===&lt;br /&gt;
&lt;br /&gt;
Right now the Mobile app uses several scripts ([see here https://github.com/moodlehq/moodlemobile-scripts]) for common tasks related to publishing.&lt;br /&gt;
&lt;br /&gt;
Those scripts should be migrated to Gulp tasks so they are available among the other tasks already implemented.&lt;br /&gt;
&lt;br /&gt;
Tasks:&lt;br /&gt;
* Migrate the prepare-release-version.sh script to gulp task&lt;br /&gt;
* Migrate the prepare-release-integration.sh script to gulp task&lt;br /&gt;
* Improve previous scripts to compile the resulting app via Phonegap Build API&lt;br /&gt;
* Migrate the rest of scripts that synchronizes language translations&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Skills required:&#039;&#039;&#039; Javascript &lt;br /&gt;
:&#039;&#039;&#039;Difficulty level:&#039;&#039;&#039; Medium&lt;br /&gt;
:&#039;&#039;&#039;Possible mentor:&#039;&#039;&#039; [https://moodle.org/user/profile.php?id=49568 Juan Leyva]&lt;br /&gt;
&lt;br /&gt;
=== Add Mobile app support to Attendance plugin ===&lt;br /&gt;
A new version of the Moodle Mobile app will be finished in May 2018 - This will provide a simpler way for plugins to add support for the Mobile app. &lt;br /&gt;
Draft spec is available here https://moodle.org/mod/forum/discuss.php?d=361230&lt;br /&gt;
&lt;br /&gt;
Minimum requirements for this would involve the ability for teachers and students to take attendance, and for students to view their reports.&lt;br /&gt;
&lt;br /&gt;
Requirement for prospective students:&lt;br /&gt;
* We require prospective students to make an attempt at fixing at least 1 issue in the Moodle tracker before their proposal can be considered. This MUST be completed before your application can be considered valid.&lt;br /&gt;
:&#039;&#039;&#039;Skills required&#039;&#039;&#039;: PHP&lt;br /&gt;
:&#039;&#039;&#039;Difficulty level&#039;&#039;&#039;: Medium&lt;br /&gt;
:&#039;&#039;&#039;Possible mentor&#039;&#039;&#039;: [http://moodle.org/user/view.php?id=21591&amp;amp;course=5 Dan Marsden]&lt;br /&gt;
&lt;br /&gt;
=== Add monitoring metrics to Moodle via a plugin ===&lt;br /&gt;
Expose metrics for monitoring for systems like [http://prometheus.io Prometheus] to allow for long term monitoring of things like student count or active users.&lt;br /&gt;
Work would need to be done speccing out this project as well as the actual implementation.&lt;br /&gt;
&lt;br /&gt;
Requirements for prospective students:&lt;br /&gt;
:&#039;&#039;&#039;Skills required&#039;&#039;&#039;: PHP&lt;br /&gt;
:&#039;&#039;&#039;Difficulty level&#039;&#039;&#039;: Medium&lt;br /&gt;
:&#039;&#039;&#039;Possible mentor&#039;&#039;&#039;: [https://moodle.org/user/profile.php?id=2101503 Paul Greidanus]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[GSOC]] - describing Moodle&#039;s involvement with Google in their Summer of Code program&lt;br /&gt;
* [https://tracker.moodle.org/issues/?jql=type%20in%20%28%22New%20Feature%22%2C%20Improvement%29%20AND%20resolution%20%3D%20unresolved%20and%20labels%20in%20%28addon_candidate%29%20ORDER%20BY%20votes%20DESC Popular new feature and improvement requests in Tracker that can be implemented as plugins]&lt;br /&gt;
* [[Projects for new developers/Archive|Archive]] of outdated and/or inactive calls for projects&lt;br /&gt;
* [https://docs.moodle.org/dev/Moodle_Wishlist a Wishlist] by some Moodle users. Some of the good ideas here may be adopted.&lt;/div&gt;</summary>
		<author><name>Prg3</name></author>
	</entry>
</feed>