brickfield/moodle-block_accessibility

Font Increase and Decrease error

Opened this issue · 3 comments

wbuk commented

We have investigated a bug where the size does not increase or decrease sometimes. It appears to work when you log in as admin but does not work when you log in as a student. So the font size increase and decrease does not always work for a student but will if you are an admin, it appears to be fine. I hope this helps you to solve the issue. Cheers.

wbuk commented

Hi
We now use moodle 4 and this error is still occurring. Is there any news on the size increase and decrease error? It seems to work for students but not for admin.
Also, will there be a moodle 4 version?

Hi I am having the same issue on our moodle site using both Google Chrome and Microsoft Edge, the A+ and A- do not work and display the following error "Error changing size: 404 Not Found" shows when you click A- and "Error changing size: undefined undefined" for A+
Can this be investigated as we want to use this plugin effectively on our course

Hi.

We reproduced the error. Steps:

  1. kill all session using script /admin/cli/kill_all_sessions.php
  2. Authorize
  3. In block click on save button. After this data will stored in database.
  4. Then try increase and decrease fontsize.

the code is incorrect, see changesize.php file:
if (isset($USER->fontsize)) {
if (!is_null($USER->fontsize)) {
$current = $USER->fontsize; // User session.
} else {
$current = DEFAULT_FONTSIZE;
}
} else {
if ($userstyle = $DB->get_record('block_accessibility', array('userid' => $USER->id))) {
if (!is_null($userstyle->fontsize)) {
$current = $USER->fontsize; // User session.
} else {
$current = DEFAULT_FONTSIZE;
}
}
}