Dyslexia

Maintained by Astor Bizard
This plugin adds a user preference to use Dyslexia mode. Dyslexia mode is meant to improve readability for dyslexic users.
Price option: Free

Supports Moodle 3.3-5.0 See all versions
Latest release: 7 months ago
Installations: 174
Downloads (last 90 days): 49

Frankenstyle name: local_dyslexia
Local plugins

Comments

Comments are no longer open for new posts. Existing comments remain available to read.

Hello @Simon Young,
I am sorry that you are having this issue. I do not see any reason for this problem to occur (and I have it tested on 4.1 so it should not be a version problem).
Just to be clear, are you truly looking at the page at "/user/preferences.php"?
Feel free to DM me about this.
Best regards,
Astor
Hi - we've installed this but we're not seeing it appear in preferences. 4.1 site - we've tried boost and classic incase it's a theme issue, no joy. Nothing appears in the inspector around dyslexia on the preferences page suggesting to me it's not an element that's hidden somehow, it's just not displaying.
Any requirements we might be missing or thoughts on what the issue might be?
Hi @Gabriel JALAM,
Thank you for pointing this out.
However, please note that a lot of the information you provide is highly incorrect and error-prone:
- "before_standard_head_html_generation" is **not** an interface.
- This hook was introduced in Moodle 4.4, so adressing this issue has to differentiate versions 4.0-4.3 and 4.4+.
I will release an update with appropriate modifications.
Best regards,
Astor

# Deprecation Warning: Migration to New Hook System in Moodle
## Problem:
The function `before_standard_html_head` used in the `local_dyslexia` plugin is deprecated.
This causes the following debugging message in recent Moodle versions:
```
Callback before_standard_html_head in local_dyslexia component should be migrated to new hook callback for core\hook\output\before_standard_head_html_generation.
```
## Root Cause:
Moodle now uses a hook-based system for functionality previously implemented via callbacks. The plugin needs to migrate to the `core\hook\output\before_standard_head_html_generation` hook.
## Proposed Solution:
1. Replace the `before_standard_html_head` function with the new hook-based implementation:
- Create a class in `local/dyslexia/classes/hook/output/before_standard_head_html_generation.php`.
- Implement the `core\output\before_standard_head_html_generation` interface.
2. Example:
```php
namespace local_dyslexia\hook\output;
use core\output\before_standard_head_html_generation;
class before_standard_head_html_generation implements before_standard_head_html_generation {
public static function execute($page) {
// Custom logic here
$page->requires->js_call_amd('local_dyslexia/custom_script', 'init');
}
}
```
## Impact:
Migrating to the new hook system ensures compatibility with current and future Moodle versions, removing debugging warnings and maintaining best practices.
## Testing:
1. Validate in environments running Moodle 4.0+.
2. Confirm functionality across different themes, including Boost Union.
3. Ensure no regression occurs in features that rely on this callback.
Approval issue created: CONTRIB-9511