Skip to content

Commit 8de1a85

Browse files
committed
[docs] Miscellaneous fixes
1 parent 477852f commit 8de1a85

10 files changed

Lines changed: 22 additions & 22 deletions

File tree

docs/guides/javascript/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ available. You may find the following references particularly useful:
3636
JavaScript in Moodle is structured into ES2015 modules which are transpiled into the CommonJS format.
3737

3838
Like our PHP classes and Mustache templates, our JavaScript modules each belong to a particular component
39-
and must be named according to our standard [name and namespace conventions](/general/development/policies/naming#javascript).
39+
and must be named according to our standard [name and namespace conventions](/general/development/policies/naming#JavaScript).
4040

4141
The naming scheme for Moodle's JavaScript fits into the pattern:
4242

general/app/development/plugins-development-guide/api-reference.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ These are the configuration options common to most handlers, you can find specif
7373
|-----------------------------|-------------|-------------|
7474
| `delegate` | - | Name of the delegate to register the handler in. See the following sections for available delegates. |
7575
| `method` | - | Name of the PHP method used to retrieve the page content. |
76-
| `init` | - | Name of the PHP method used during [JavaScript initialisation](./index.md#javascript-initialisation). |
76+
| `init` | - | Name of the PHP method used during [JavaScript initialisation](./index.md#JavaScript-initialisation). |
7777
| `styles` | - | An associative array with configuration options for CSS styles. |
7878
| `styles.url` | Required | URL pointing to a CSS file, either using an absolute URL or a relative URL. The CSS will be downloaded and applied to the whole app, so it's recommended to include styles scoped to your plugin templates. |
7979
| `styles.version` | Required | Version number used to determine if the file needs to be downloaded again. You should change the version number every time you change the contents of the CSS file. |
8080
| `moodlecomponent` | Plugin name | Name of the component implemented by the handler. <br /> <br /> Most of the time, this can be ignored because mobile support is usually included in the same plugin where custom components are defined, but it may be different in some cases. For example, imagine a local plugin called `local_myactivitymobile` is implementing mobile support for a `mod_myactivity` component. In that case, you would set this option to `"mod_myactivity"`. |
81-
| `restricttocurrentuser` | `false` | Restricts the handler to appear only for the current user. For more advanced restrictions, you can use the `restrict` and `disabled` properties returned during [JavaScript initialisation](./index.md#javascript-initialisation). |
82-
| `restricttoenrolledcourses` | `true` | Restricts the handler to appear only for courses the user is enrolled in. For more advanced restrictions, you can use the `restrict` and `disabled` properties returned during [JavaScript initialisation](./index.md#javascript-initialisation). |
81+
| `restricttocurrentuser` | `false` | Restricts the handler to appear only for the current user. For more advanced restrictions, you can use the `restrict` and `disabled` properties returned during [JavaScript initialisation](./index.md#JavaScript-initialisation). |
82+
| `restricttoenrolledcourses` | `true` | Restricts the handler to appear only for courses the user is enrolled in. For more advanced restrictions, you can use the `restrict` and `disabled` properties returned during [JavaScript initialisation](./index.md#JavaScript-initialisation). |
8383

8484
### CoreMainMenuDelegate {/* #coremainmenudelegate */}
8585

@@ -141,7 +141,7 @@ Add new option in the course page, either as a tab or in the course summary. For
141141

142142
Add support for activity modules or resources.
143143

144-
The following functions can be declared in the object evaluated in the last statement of the [JavaScript initialisation](./index.md#javascript-initialisation) in order to implement additional functionality:
144+
The following functions can be declared in the object evaluated in the last statement of the [JavaScript initialisation](./index.md#JavaScript-initialisation) in order to implement additional functionality:
145145

146146
- `supportsFeature(feature: string): any`: Check whether the module supports a given feature.
147147
- `manualCompletionAlwaysShown(module: CoreCourseModuleData): Promise<boolean>`: Check whether to show the manual completion regardless of the course's `showcompletionconditions` setting.
@@ -394,43 +394,43 @@ Add support for a custom assign feedback.
394394

395395
Add support for a custom workshop assessment strategy.
396396

397-
*This handler can only be registered using [JavaScript initialisation](./index.md#javascript-initialisation), you can find more about it in the [AddonWorkshopAssessmentStrategyHandler interface declaration](https://github.com/moodlehq/moodleapp/blob/latest/src/addons/mod/workshop/services/assessment-strategy-delegate.ts#L26..L76).*
397+
*This handler can only be registered using [JavaScript initialisation](./index.md#JavaScript-initialisation), you can find more about it in the [AddonWorkshopAssessmentStrategyHandler interface declaration](https://github.com/moodlehq/moodleapp/blob/latest/src/addons/mod/workshop/services/assessment-strategy-delegate.ts#L26..L76).*
398398

399399
### CoreContentLinksDelegate {/* #corecontentlinksdelegate */}
400400

401401
Allows you to intercept what happens when links are clicked. For example, you can open a plugin page when a link is clicked. The Moodle app automatically creates some link handlers for module plugins, you can learn more about this and how to use link handlers in the [Link Handlers example](./examples/link-handlers.md).
402402

403-
*This handler can only be registered using [JavaScript initialisation](./index.md#javascript-initialisation), you can find more about it in the [CoreContentLinksHandler interface declaration](https://github.com/moodlehq/moodleapp/blob/latest/src/core/features/contentlinks/services/contentlinks-delegate.ts#L27..L95).*
403+
*This handler can only be registered using [JavaScript initialisation](./index.md#JavaScript-initialisation), you can find more about it in the [CoreContentLinksHandler interface declaration](https://github.com/moodlehq/moodleapp/blob/latest/src/core/features/contentlinks/services/contentlinks-delegate.ts#L27..L95).*
404404

405405
### CorePushNotificationsDelegate {/* #corepushnotificationsdelegate */}
406406

407407
Allows you to intercept what happens when push notifications are clicked.
408408

409-
*This handler can only be registered using [JavaScript initialisation](./index.md#javascript-initialisation), you can find more about it in the [CorePushNotificationsClickHandler interface declaration](https://github.com/moodlehq/moodleapp/blob/latest/src/core/features/pushnotifications/services/push-delegate.ts#L27..L59).*
409+
*This handler can only be registered using [JavaScript initialisation](./index.md#JavaScript-initialisation), you can find more about it in the [CorePushNotificationsClickHandler interface declaration](https://github.com/moodlehq/moodleapp/blob/latest/src/core/features/pushnotifications/services/push-delegate.ts#L27..L59).*
410410

411411
### CoreCourseModulePrefetchDelegate {/* #corecoursemoduleprefetchdelegate */}
412412

413413
Allows you to implement custom logic to prefetch module content. You can learn more about this in the [Prefetch Handlers example](./examples/prefetch-handlers.md).
414414

415-
*This handler can only be registered using [JavaScript initialisation](./index.md#javascript-initialisation), you can find more about it in the [CoreCourseModulePrefetchHandler interface declaration](https://github.com/moodlehq/moodleapp/blob/latest/src/core/features/course/services/module-prefetch-delegate.ts#L1410..L1568).*
415+
*This handler can only be registered using [JavaScript initialisation](./index.md#JavaScript-initialisation), you can find more about it in the [CoreCourseModulePrefetchHandler interface declaration](https://github.com/moodlehq/moodleapp/blob/latest/src/core/features/course/services/module-prefetch-delegate.ts#L1410..L1568).*
416416

417417
### CoreFileUploaderDelegate {/* #corefileuploaderdelegate */}
418418

419419
Add new option in the upload file picker.
420420

421-
*This handler can only be registered using [JavaScript initialisation](./index.md#javascript-initialisation), you can find more about it in the [CoreFileUploaderHandler interface declaration](https://github.com/moodlehq/moodleapp/blob/latest/src/core/features/fileuploader/services/fileuploader-delegate.ts#L26..L46).*
421+
*This handler can only be registered using [JavaScript initialisation](./index.md#JavaScript-initialisation), you can find more about it in the [CoreFileUploaderHandler interface declaration](https://github.com/moodlehq/moodleapp/blob/latest/src/core/features/fileuploader/services/fileuploader-delegate.ts#L26..L46).*
422422

423423
### CorePluginFileDelegate {/* #corepluginfiledelegate */}
424424

425425
Perform operations with files such as listening to file events (download, deletion, etc.) or using a different URL when downloading.
426426

427-
*This handler can only be registered using [JavaScript initialisation](./index.md#javascript-initialisation), you can find more about it in the [CorePluginFileHandler interface declaration](https://github.com/moodlehq/moodleapp/blob/latest/src/core/services/plugin-file-delegate.ts#L296..L389).*
427+
*This handler can only be registered using [JavaScript initialisation](./index.md#JavaScript-initialisation), you can find more about it in the [CorePluginFileHandler interface declaration](https://github.com/moodlehq/moodleapp/blob/latest/src/core/services/plugin-file-delegate.ts#L296..L389).*
428428

429429
### CoreFilterDelegate {/* #corefilterdelegate */}
430430

431431
Add support for a custom filter. Note that you'll only need this if you have to manipulate the content with JavaScript, PHP filters are applied in the content before sending the HTML to the app.
432432

433-
*This handler can only be registered using [JavaScript initialisation](./index.md#javascript-initialisation), you can find more about it in the [CoreFilterHandler interface declaration](https://github.com/moodlehq/moodleapp/blob/latest/src/core/features/filter/services/filter-delegate.ts#L28..L76).*
433+
*This handler can only be registered using [JavaScript initialisation](./index.md#JavaScript-initialisation), you can find more about it in the [CoreFilterHandler interface declaration](https://github.com/moodlehq/moodleapp/blob/latest/src/core/features/filter/services/filter-delegate.ts#L28..L76).*
434434

435435
### CoreEnrolDelegate `4.3+` {/* #coreenroldelegate-43 */}
436436

@@ -446,7 +446,7 @@ This delegate was introduced in version 4.3 of the app.
446446

447447
| Name | Default | Description |
448448
|-------------------------|-------------|-------------|
449-
| `enrolmentAction` | `'browser'` | Action performed by the handler. Possible values are: `browser`, `self`, and `guest`. <br /> <br /> `browser` opens the browser to perform the enrolment in the LMS, outside of the app. <br /> <br /> `self` requires implementing the `enrol` function in JavaScript. Also, the PHP class extending `enrol_plugin` must return some data in the `get_enrol_info` method. <br /> <br /> `guest` allows users to enter the course as guests. It requires implementing the `canAccess` and `validateAccess` functions in the [JavaScript initialisation](./index.md#javascript-initialisation) JavaScript. Also, the PHP class extending `enrol_plugin` must return some data in the `get_enrol_info` method. |
449+
| `enrolmentAction` | `'browser'` | Action performed by the handler. Possible values are: `browser`, `self`, and `guest`. <br /> <br /> `browser` opens the browser to perform the enrolment in the LMS, outside of the app. <br /> <br /> `self` requires implementing the `enrol` function in JavaScript. Also, the PHP class extending `enrol_plugin` must return some data in the `get_enrol_info` method. <br /> <br /> `guest` allows users to enter the course as guests. It requires implementing the `canAccess` and `validateAccess` functions in the [JavaScript initialisation](./index.md#JavaScript-initialisation) JavaScript. Also, the PHP class extending `enrol_plugin` must return some data in the `get_enrol_info` method. |
450450
| `infoIcons` | `[]` | Array of icons related to enrolment to display next to the course. These can also be calculated dynamically in JavaScript using course information. |
451451
| `infoIcons[].icon` | Required | The icon to use. See the [ion-icon](#ion-icon) documentation for available values. |
452452
| `infoIcons[].label` | Required | Language string identifier to use in the aria-label of the icon. See the [localisation](./index.md#localisation) documentation to learn more. |

general/app/development/plugins-development-guide/examples/course-formats.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Then filter the list of sections in your template:
127127

128128
## Using JavaScript {/* #using-JavaScript */}
129129

130-
You can also register custom formats using [JavaScript initialisation](../index.md#javascript-initialisation).
130+
You can also register custom formats using [JavaScript initialisation](../index.md#JavaScript-initialisation).
131131

132132
For example, you can implement a single activity format returning the following data:
133133

general/development/policies/codingstyle/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ There are no rules limiting what can be used as a level 3 namespace.
637637
This is where a plugin or addon can make extensive use of namespaces with no
638638
chance of conflict with any other plugin or api, now and forever onwards.
639639

640-
#### Namespaces within `**/tests` directories {#namespaces-within-tests}
640+
#### Namespaces within `**/tests` directories {/* #namespaces-within-tests */}
641641

642642
:::info
643643

@@ -1689,7 +1689,7 @@ For files containing only one artifact, the file phpdoc block is optional as lon
16891689
*/
16901690
```
16911691

1692-
### Classes {#phpdoc-classes}
1692+
### Classes {/* #phpdoc-classes */}
16931693

16941694
All classes must have a complete docblock like this:
16951695

versioned_docs/version-4.1/apis/_files/db-services-php.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ Web services should be named following the [naming convention for web services](
1212
For further information on external functions and web services, see:
1313

1414
- [Adding a web service to a plugin](/docs/apis/subsystems/external/writing-a-service)
15-
- [Web services API](/docs/apis/subsystems/external/web-services-api)
15+
- [Web services API](/docs/apis/subsystems/external/writing-a-service)
1616
- [External functions API](/docs/apis/subsystems/external/functions)

versioned_docs/version-4.1/guides/javascript/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ available. You may find the following references particularly useful:
3636
JavaScript in Moodle is structured into ES2015 modules which are transpiled into the CommonJS format.
3737

3838
Like our PHP classes and Mustache templates, our JavaScript modules each belong to a particular component
39-
and must be named according to our standard [name and namespace conventions](/general/development/policies/naming#javascript).
39+
and must be named according to our standard [name and namespace conventions](/general/development/policies/naming#JavaScript).
4040

4141
The naming scheme for Moodle's JavaScript fits into the pattern:
4242

versioned_docs/version-4.4/guides/javascript/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ available. You may find the following references particularly useful:
3636
JavaScript in Moodle is structured into ES2015 modules which are transpiled into the CommonJS format.
3737

3838
Like our PHP classes and Mustache templates, our JavaScript modules each belong to a particular component
39-
and must be named according to our standard [name and namespace conventions](/general/development/policies/naming#javascript).
39+
and must be named according to our standard [name and namespace conventions](/general/development/policies/naming#JavaScript).
4040

4141
The naming scheme for Moodle's JavaScript fits into the pattern:
4242

versioned_docs/version-4.5/guides/javascript/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ available. You may find the following references particularly useful:
3636
JavaScript in Moodle is structured into ES2015 modules which are transpiled into the CommonJS format.
3737

3838
Like our PHP classes and Mustache templates, our JavaScript modules each belong to a particular component
39-
and must be named according to our standard [name and namespace conventions](/general/development/policies/naming#javascript).
39+
and must be named according to our standard [name and namespace conventions](/general/development/policies/naming#JavaScript).
4040

4141
The naming scheme for Moodle's JavaScript fits into the pattern:
4242

versioned_docs/version-5.0/guides/javascript/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ available. You may find the following references particularly useful:
3636
JavaScript in Moodle is structured into ES2015 modules which are transpiled into the CommonJS format.
3737

3838
Like our PHP classes and Mustache templates, our JavaScript modules each belong to a particular component
39-
and must be named according to our standard [name and namespace conventions](/general/development/policies/naming#javascript).
39+
and must be named according to our standard [name and namespace conventions](/general/development/policies/naming#JavaScript).
4040

4141
The naming scheme for Moodle's JavaScript fits into the pattern:
4242

versioned_docs/version-5.1/guides/javascript/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ available. You may find the following references particularly useful:
3636
JavaScript in Moodle is structured into ES2015 modules which are transpiled into the CommonJS format.
3737

3838
Like our PHP classes and Mustache templates, our JavaScript modules each belong to a particular component
39-
and must be named according to our standard [name and namespace conventions](/general/development/policies/naming#javascript).
39+
and must be named according to our standard [name and namespace conventions](/general/development/policies/naming#JavaScript).
4040

4141
The naming scheme for Moodle's JavaScript fits into the pattern:
4242

0 commit comments

Comments
 (0)