Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ Add new option in the user profile page.
| `type` | `'listitem'` | Visual representation of the option, accepted values are `listitem` and `button`. <br /> <br /> Before 4.4, the accepted values were `newpage` and `communication` (`newpage` was the default). |
| `priority` | `0` | Priority of the handler, higher priority options are displayed first. |
| `ptrenabled` | `true` | Whether to enable the PTR (pull-to-refresh) gesture in the page. |
| `displayinusermenu` | - | Whether to display the option in the user menu (the menu displayed when the user clicks his own avatar at the top-right or top-left). Accepted values are: <ul><li>`no`: don't display the option in user menu.</li><li>`yes`: display the option in user menu. It will also be displayed in user profiles (like course participants) depending on the restrictions.</li><li>`only`: display the option only in user menu and never in user profiles.</li></ul>If not set, the option will be displayed in the user menu depending on the restricted courses and users. <br /> <br /> Only available in 5.1+. |

### CoreCourseFormatDelegate

Expand Down
6 changes: 5 additions & 1 deletion general/development/policies/accessibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The table below provides a history of the accessibility audits performed on the

#### Moodle App

The Moodle App was accredited to meet [WCAG 2.1 Level AA conformance](https://www.webkeyit.com/accessibility-services/accessibility-accreditations/moodle-mobile-app) on 9 May 2023. See [MOBILE-4182](https://moodle.atlassian.net/browse/MOBILE-4182) for more details.
The Moodle App has been accredited to meet WCAG 2.2 Level AA conformance on 7 April 2025. See [MOBILE-4595](https://moodle.atlassian.net/browse/MOBILE-4595) for more details.

#### Moodle Workplace

Expand Down Expand Up @@ -93,6 +93,10 @@ An overview of Moodle LMS' conformance with the [WCAG 2.1](https://www.w3.org/TR

An overview of Moodle Workplace's conformance with the [WCAG 2.1](https://www.w3.org/TR/WCAG21/) guidelines can be found in our [accessibility conformance report](https://docs.moodle.org/en/Moodle_Workplace_VPAT#WCAG_2.x_report).

#### Moodle App

An overview of Moodle App's conformance with the [WCAG 2.2](https://www.w3.org/TR/WCAG22/) guidelines can be found in the [Moodle App accessibility conformance report](https://docs.moodle.org/en/Moodle_app_VPAT#WCAG_2.x_report).

<!-- cspell:ignore IAAP -->
<!-- cspell:ignore credly -->

Expand Down
60 changes: 60 additions & 0 deletions general/development/policies/codingstyle-moodleapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,66 @@ export class MyService {

</InvalidExample>

If a constant needs to be used in a component template, it should be declared in the component without "static" because static properties cannot be used in templates. Please notice that the naming convention for non-static properties is camelCase.

<ValidExample title="Good">

```ts
export class MyComponent {

protected readonly myConstant = '...';

}
```

</ValidExample>

<InvalidExample title="Bad">

```ts

export class MyComponent {

protected readonly MY_CONSTANT = '...';

}
```

</InvalidExample>

### Angular Signals

All signals in class properties must be defined as readonly properties to avoid overriding the whole signal by mistake. This includes input signals, computed signals, etc.

<ValidExample title="Good">

```ts
export class MyComponent {

protected readonly myInput = input('...');
protected readonly mySignal = signal('...');
protected readonly myComputed = computed(() => ...);

}
```

</ValidExample>

<InvalidExample title="Bad">

```ts

export class MyComponent {

protected myInput = input('...');
protected mySignal = signal('...');
protected myComputed = computed(() => ...);

}
```

</InvalidExample>

## Angular

### Avoid calling methods in templates
Expand Down