Skip to content

Commit c20d4b3

Browse files
authored
Merge pull request #194 from lucaboesch/javascript
[docs] Spell JavaScript correctly.
2 parents 4750b7a + 3641e18 commit c20d4b3

File tree

20 files changed

+35
-35
lines changed

20 files changed

+35
-35
lines changed

docs/apis/_files/amd-dir.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- markdownlint-disable first-line-heading -->
22
JavaScript in Moodle is written in the ESM format, and transpiled into AMD modules for deployment.
33

4-
The [Moodle JavaScript Guide](../guides/javascript) has detailed information and examples on writing JavaScript in Moodle. Further information is also available in the [Javascript Modules](https://docs.moodle.org/dev/Javascript_Modules) documentation.
4+
The [Moodle JavaScript Guide](../guides/javascript) has detailed information and examples on writing JavaScript in Moodle. Further information is also available in the [JavaScript Modules](https://docs.moodle.org/dev/Javascript_Modules) documentation.
55

66
:::caution
77

docs/apis/_files/yui-dir.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!-- markdownlint-disable first-line-heading -->
2-
In older versions of Moodle, JavaScript was written in the YUI format. This is being phased out in favour of [Javascript Modules](https://docs.moodle.org/dev/Javascript_Modules), although some older uses still remain in Moodle core.
2+
In older versions of Moodle, JavaScript was written in the YUI format. This is being phased out in favour of [JavaScript Modules](https://docs.moodle.org/dev/Javascript_Modules), although some older uses still remain in Moodle core.
33

44
- [YUI/Modules](https://docs.moodle.org/dev/YUI/Modules)
55
- [YUI](https://docs.moodle.org/dev/YUI)

docs/apis/plugintypes/filter/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ class filter_helloworld extends moodle_text_filter {
180180

181181
## Filtering dynamic content
182182

183-
It is possible that page content is loaded by ajax after the page is loaded. In certain filter types (for example MathJax) javascript is required to be run on the output of the filter in order to do the final markup. For these types of filters, a javascript event is triggered when new content is added to the page (the content will have already been processed by the filter in php). The javascript for a filter can listen for these event notifications and reprocess the affected dom nodes.
183+
It is possible that page content is loaded by ajax after the page is loaded. In certain filter types (for example MathJax) JavaScript is required to be run on the output of the filter in order to do the final markup. For these types of filters, a JavaScript event is triggered when new content is added to the page (the content will have already been processed by the filter in php). The JavaScript for a filter can listen for these event notifications and reprocess the affected dom nodes.
184184

185185
The content updated event is registered in the `core_filters/events` module and can be imported as:
186186

docs/apis/plugintypes/format/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ However, if for some reason you cannot use the latest version of tool_pluginskel
176176
3. Rename language files in course/format/pluginname/lang/
177177
4. Change `$string['pluginname']` in course/format/pluginname/lang/en/format_pluginname.php to the new name.
178178
5. Rename class name in lib.php to format_pluginname.
179-
6. Search and replace other occurrences of the old format name, for example in renderer, capabilities names, settings, javascript libraries, etc.
179+
6. Search and replace other occurrences of the old format name, for example in renderer, capabilities names, settings, JavaScript libraries, etc.
180180
7. The new format is ready for modification.
181181
8. After modifying the code, check it with the Code checker.
182182

@@ -594,7 +594,7 @@ And third, consider using "local/content" as your main course template, "output\
594594

595595
## The course editor structure
596596

597-
The core_courseformat provides several javascript modules that will be enabled when a teacher edits the course. Those libraries use a reactive pattern to keep the course updated when some edit action is executed.
597+
The core_courseformat provides several JavaScript modules that will be enabled when a teacher edits the course. Those libraries use a reactive pattern to keep the course updated when some edit action is executed.
598598

599599
The following diagram represents the data flow of the new architecture:
600600

docs/guides/javascript/reactive/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Creating a reactive UI
33
tags:
4-
- Javascript
4+
- JavaScript
55
- Library
66
- Frontend
77
---
@@ -969,7 +969,7 @@ As can be seen in the example, the mutation does not need to enable or disable t
969969

970970
#### Private methods inside the mutations library
971971

972-
Javascript is famous for not having private methods. This means all the methods inside the mutations library will be accessible by the Reactive Instance. To prevent components from dispatch private methods the Reactive instance "dispatch" method will raise an expectation in some cases.
972+
JavaScript is famous for not having private methods. This means all the methods inside the mutations library will be accessible by the Reactive Instance. To prevent components from dispatch private methods the Reactive instance "dispatch" method will raise an expectation in some cases.
973973

974974
Mutation names that components cannot dispatch:
975975

@@ -1003,7 +1003,7 @@ When this happens, the components' stateReady hooks will be executed and the wat
10031003

10041004
#### Initial state data limitations
10051005

1006-
While the Javascript standard does not offer a suitable native solution for fully reactive data structures, implementing a deep reactive object will be a complex task. Depending on the depth of the changes tracked it will require many frontend resources and many lines of code to maintain. That is the main reason why most people use complex reactive frameworks for it.
1006+
While the JavaScript standard does not offer a suitable native solution for fully reactive data structures, implementing a deep reactive object will be a complex task. Depending on the depth of the changes tracked it will require many frontend resources and many lines of code to maintain. That is the main reason why most people use complex reactive frameworks for it.
10071007

10081008
To keep the state fast and simple, the reactive.js library can only store two kinds of data at the ROOT level:
10091009

docs/moodleapp/development/development-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ All the nomenclature can be a bit confusing, so let's do a recap:
377377

378378
## Application Lifecycle
379379

380-
When the application is launched, the contents of [index.html](#indexhtml) are rendered on screen. This file is intentionally concise because all the flare is added by Javascript, and the splash screen will be covering the application UI until it has fully started. If you are developing in the browser, this will be a blank screen for you given that the splash screen is not available on the web. We are not targeting browsers in production, so it's acceptable to have this behaviour during development.
380+
When the application is launched, the contents of [index.html](#indexhtml) are rendered on screen. This file is intentionally concise because all the flare is added by JavaScript, and the splash screen will be covering the application UI until it has fully started. If you are developing in the browser, this will be a blank screen for you given that the splash screen is not available on the web. We are not targeting browsers in production, so it's acceptable to have this behaviour during development.
381381

382382
Before the UI is rendered, the startup process will take place. First, Angular will instantiate `AppModule` and all the imported modules (features, addons, etc.), and then it will execute the initializers (this includes all the initializers, not only the ones declared under [core/initializers/](#coreinitializers)). In our application, we have overridden [Angular's initialisation service](https://angular.io/api/core/ApplicationInitStatus) to get a hold of the root injector so that we can safely use the [Service Singletons](#service-singletons) pattern within initializers. However, we should avoid this pattern within constructors, because those can be called during the instantiation phase.
383383

docs/moodleapp/development/plugins-development-guide/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,7 @@ this.MyAddonClass
13601360
13611361
A link handler allows you to decide what to do when a link with a certain URL is clicked. This is useful, for example, to open your plugin page when a link to your plugin is clicked.
13621362
1363-
After the 4.0 version, the Moodle app automatically creates two link handlers for module plugins, you don't need to create them in your plugin's Javascript code anymore:
1363+
After the 4.0 version, the Moodle app automatically creates two link handlers for module plugins, you don't need to create them in your plugin's JavaScript code anymore:
13641364
13651365
- A handler to treat links to *mod/pluginname/view.php?id=X*. When this link is clicked, it will open your module in the app.
13661366
- A handler to treat links to *mod/pluginname/index.php?id=X*. When this link is clicked, it will open a page in the app listing all the modules of your type inside a certain course.

docs/moodleapp/development/release-process.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ tags:
1919
| 6. | Contact the marketing team announcing the new release and highlights. | Integration Lead |
2020
| 7. | Add new QA tests to the "Testing cases" document. New QA tests should be labeled with [qa_test_required](https://tracker.moodle.org/issues/?jql=project%20%3D%20MOBILE%20AND%20resolution%20in%20(Unresolved%2C%20Fixed)%20AND%20labels%20%3D%20qa_test_required%20ORDER%20BY%20priority%20DESC%2C%20updated%20DESC). Remove that label once are added to the document. | Tester |
2121
| 8. | Run `npm audit` to ensure all the dependencies are OK and check github vulnerabilities report. | Developer |
22-
| 9. | Freeze Cordova plugins and Javascript libraries versions (node modules) in the integration branch. | Developer |
22+
| 9. | Freeze Cordova plugins and JavaScript libraries versions (node modules) in the integration branch. | Developer |
2323
| 10. | **Start testing** | Tester |
2424

2525
## The release day
@@ -43,7 +43,7 @@ tags:
4343
| 3. | Review the users and developers documentation (check that everything is in order). Review the [docs_required and dev_docs_required_tags](https://tracker.moodle.org/issues/?jql=project%20%3D%20MOBILE%20AND%20labels%20in%20%28docs_required%2C%20dev_docs_required%29). Review the [Mobile features wiki documentation](https://docs.moodle.org/en/Moodle_Mobile_features). | All the team |
4444
| 4. | Delete the integration and desktop branches and create it again based on master. | Team Lead |
4545
| 5. | Bump version numbers in the following files in the integration branch: `config.xml` (version), `package.json` (version), `moodle.config.json` (versionname) appending a `-dev` to indicate that is a development version). | Integration Lead |
46-
| 6. | Unfreeze Cordova plugins and Javascript libraries versions (node modules). | Developer |
46+
| 6. | Unfreeze Cordova plugins and JavaScript libraries versions (node modules). | Developer |
4747
| 7. | Check that the [Docker image](https://cloud.docker.com/u/moodlehq/repository/docker/moodlehq/moodleapp/general) for the new version was successfully built. | Integration Lead |
4848
| 8. | Update of the [local_moodlemobileapp](https://moodle.org/plugins/view.php?id=997) plugin (as final release) in moodle.org/plugins. | Developer |
4949

docs/moodleapp/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The app has two types of delegates:
6161

6262
Moodle plugins can also be adapted to work with the mobile app. Given that more than one site can be used with the app, the plugins that are activated depend on the site the app is connected to. That's why they are called site plugins.
6363

64-
When the application connects with a site, it will fetch information about which plugins have mobile support and register their functionality using [the delegates system](#delegates-and-handlers). Plugins can be written using only PHP, but javascript is also supported for some advanced use-cases.
64+
When the application connects with a site, it will fetch information about which plugins have mobile support and register their functionality using [the delegates system](#delegates-and-handlers). Plugins can be written using only PHP, but JavaScript is also supported for some advanced use-cases.
6565

6666
## Platform Support
6767

general/community/credits/thirdpartylibs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ This library is not currently used in Moodle
320320

321321
:::note lib/editor
322322

323-
Javascript/HTML script to put a GUI editor in textareas on Internet Explorer and Mozilla
323+
JavaScript/HTML script to put a GUI editor in textareas on Internet Explorer and Mozilla
324324

325325
**Version**: 3.0 beta (with modifications)<br/>
326326
**License**: htmlArea License (based on BSD license)
@@ -763,7 +763,7 @@ This library is not currently used in Moodle
763763

764764
:::note lib/overlib.js
765765

766-
Javascript library to enable DHTML popups, floating windows, events etc
766+
JavaScript library to enable DHTML popups, floating windows, events etc
767767

768768
**Version**: July 2004<br/>
769769
**License**: Artistic Open Source License
@@ -779,7 +779,7 @@ Copyright © 1998-2004 Erik Bosrup
779779

780780
:::note media/player/videojs/amd/src/local/ogv/ogv.js
781781

782-
Javascript media decoder and player for Ogg Vorbis/Opus/Theora and WebM VP8/VP9/AV1 video.
782+
JavaScript media decoder and player for Ogg Vorbis/Opus/Theora and WebM VP8/VP9/AV1 video.
783783

784784
**Version**: 1.8.4<br/>
785785
**License**: MIT

general/development/policies.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ This helps consistency across browsers in a nicely-degrading way (especially tho
7272

7373
## JavaScript
7474

75-
New Javascript in Moodle should be written as Vanilla javascript in the ES6 style. The use of jQuery, YUI, and other frameworks is strongly discouraged and will not be accepted into core except when dealing with legacy interfaces which require the use of those objects.
75+
New JavaScript in Moodle should be written as Vanilla JavaScript in the ES6 style. The use of jQuery, YUI, and other frameworks is strongly discouraged and will not be accepted into core except when dealing with legacy interfaces which require the use of those objects.
7676

7777
In general code should be written to avoid displaying interfaces which are removed, or adding new interfaces as the page loads.
7878

79-
All Javascript must be accessible.
79+
All JavaScript must be accessible.
8080

8181
:::info
8282

83-
For more about this, see the [Javascript guide](/docs/guides/javascript).
83+
For more about this, see the [JavaScript guide](/docs/guides/javascript).
8484

8585
:::
8686

general/development/policies/accessibility.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ In some cases, a single component can contain many smaller components. In order
106106

107107
### Forms
108108

109-
Moodle forms created with the standard forms library are designed to be accessible. Any custom (for example javascript) form or custom form elements must also be accessible.
109+
Moodle forms created with the standard forms library are designed to be accessible. Any custom (for example JavaScript) form or custom form elements must also be accessible.
110110

111111
- All form elements must have a label
112112
- The form must be able to be completed entirely with the keyboard
@@ -133,7 +133,7 @@ See [the WCAG 2.1 success criteria for web page titles](https://www.w3.org/TR/WC
133133

134134
### Advanced UX Widgets
135135

136-
When it is determined that an advanced interface is required (typically one that relies on javascript), a minimum set of principles need to be applied to make sure that the feature "provides equal functionality and information to all people". Each use case is different, but a minimum set of things to be checked are:
136+
When it is determined that an advanced interface is required (typically one that relies on JavaScript), a minimum set of principles need to be applied to make sure that the feature "provides equal functionality and information to all people". Each use case is different, but a minimum set of things to be checked are:
137137

138138
- Does this component work entirely when accessed only via the keyboard?
139139
- Does this component map to any widget from the [ARIA Authoring Practices](https://www.w3.org/TR/wai-aria-practices-1.1/) document and if so, does it implement all of the "Keyboard Interaction" and "WAI-ARIA Roles, States and Properties" listed for that widget?

general/development/policies/codingstyle/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1875,7 +1875,7 @@ This document was drawn from the following sources:
18751875

18761876
## See also
18771877

1878-
- [Javascript Coding Style](https://docs.moodle.org/dev/Javascript/Coding_Style)
1878+
- [JavaScript Coding Style](https://docs.moodle.org/dev/Javascript/Coding_Style)
18791879
- [CSS Coding Style](https://docs.moodle.org/dev/CSS_Coding_Style)
18801880
- [SQL coding style](https://docs.moodle.org/dev/SQL_coding_style)
18811881
- [Coding](/general/development/policies)

general/development/policies/component-communication/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ There are different ways to call code in Moodle. Most of them are listed here an
4848

4949
- Direct php function calls
5050
- External functions
51-
- Javascript Modules (AMD)
51+
- JavaScript Modules (AMD)
5252
- Templates
5353
- get_string calls
5454
- Event observers
@@ -88,9 +88,9 @@ Additional rules for calling external functions:
8888

8989
- Always use the `external_api::call_external_function()` wrapper when calling from php.
9090

91-
### Javascript Modules (AMD)
91+
### JavaScript Modules (AMD)
9292

93-
It is possible through the Javascript loader to load an AMD module from any component and call its functions. This is a form of inter-component communication and must obey the strict rules for which components AMD modules can be loaded from.
93+
It is possible through the JavaScript loader to load an AMD module from any component and call its functions. This is a form of inter-component communication and must obey the strict rules for which components AMD modules can be loaded from.
9494

9595
### get_string
9696

general/development/policies/naming.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ tags:
66

77
## Components
88

9-
## Javascript
9+
## JavaScript
1010

1111
## Web services
1212

general/development/policies/security/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ Teachers are usually creating course content, enrolling students and teaching. T
8686
- Create and manage activities
8787
- Access student grades and other personal information
8888

89-
Uploading of files with javascript, flash and other scripted is often considered to be a security risk. Unfortunately we can not remove these risks from teacher roles because even basic SCORM packages consist of HTML and Javascript which needs to use user session.
89+
Uploading of files with JavaScript, flash and other scripted is often considered to be a security risk. Unfortunately we can not remove these risks from teacher roles because even basic SCORM packages consist of HTML and JavaScript which needs to use user session.
9090

9191
Browser trusts everything coming from one server, it does not know anything about our courses or origin of data. Once the file is uploaded to server it becomes part of the server application. It is not possible to differentiate between wanted and unwanted code stored on the server.
9292

9393
:::info
9494

9595
All teachers with risky capabilities have to be trusted, it is not possible to give teacher access to students. In theory teachers may use XSS attacks to gain administrator access.
9696

97-
Technically it would be possible to create a system where teachers can not attack other users but it would prevent all Javascript, Flash, SCORM, Java, HTML forms, SVG, etc.
97+
Technically it would be possible to create a system where teachers can not attack other users but it would prevent all JavaScript, Flash, SCORM, Java, HTML forms, SVG, etc.
9898

9999
:::
100100

@@ -109,7 +109,7 @@ Uploaded files must not be opened directly in browser from the same server. Inst
109109

110110
:::info
111111

112-
All student submitted text has to be sanitised before printing the text on any page, this prevent XSS attacks on other users but at the same time prevents Flash, Javascript, SVG and all other HTML scripting. Moodle uses HTML Purifier library for this purpose.
112+
All student submitted text has to be sanitised before printing the text on any page, this prevent XSS attacks on other users but at the same time prevents Flash, JavaScript, SVG and all other HTML scripting. Moodle uses HTML Purifier library for this purpose.
113113

114114
:::
115115

general/development/process/peer-review.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ To allow the community of Moodle developers to work together, conventions should
4848
- $_GET, $_POST, $_REQUEST, $_COOKIE, and $_SESSION are never used.
4949

5050
:::tip
51-
See the [Coding style guide](/general/development/policies/codingstyle) for details. Most of the previous items list are checked automatically by the CiBot (Automated code review). So in this case it's recommended to review the execution results to validate that there aren't errors. However, take into account that for now, CiBot is not checking all file types (it happens, for instance, with the Javascript files).
51+
See the [Coding style guide](/general/development/policies/codingstyle) for details. Most of the previous items list are checked automatically by the CiBot (Automated code review). So in this case it's recommended to review the execution results to validate that there aren't errors. However, take into account that for now, CiBot is not checking all file types (it happens, for instance, with the JavaScript files).
5252
:::
5353

5454
### Output

0 commit comments

Comments
 (0)