Moodle

Multilang filter is not applied to role names in some places

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9.3
  • Fix Version/s: 1.9.4, 2.0
  • Component/s: Filters, Roles / Access
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE, MOODLE_20_STABLE

Description

Having the admin role name defined with multilang filter, the display of the role name is not correctly filtered in following places.

1) http://youmoodlehost.com/admin/roles/manage.php?roleid=1&action=view
where one sees the whole <span...> syntax

Fix suggested: change <?php print_string('name') ?> in file /admin/roles/manage.html (line 26) to use format_string()

2) http://youmoodlehost.com/admin/roles/assign.php?contextid=1
where one sees for each role name all the translated names (all languages) concatenated

Fix suggested: insert call to format_string() around $rolename at line 457 of file /admin/roles/assign.php

Issue Links

Activity

Hide
Nicolas Martignoni added a comment -

This faulty behaviour appears here too:

3) http://youmoodlehost.com/admin/roles/assign.php?contextid=1&roleid=1
The popup menu shows all the translated names (all languages) concatenated for each role

I can't suggest any fix (maybe a bug in function role_fix_names() ?)

PS Anywhere else the filtering occurs normally, i.e. the names of the roles appear (only) in the language chosen by the user.

Show
Nicolas Martignoni added a comment - This faulty behaviour appears here too: 3) http://youmoodlehost.com/admin/roles/assign.php?contextid=1&roleid=1 The popup menu shows all the translated names (all languages) concatenated for each role I can't suggest any fix (maybe a bug in function role_fix_names() ?) PS Anywhere else the filtering occurs normally, i.e. the names of the roles appear (only) in the language chosen by the user.
Hide
Eloy Lafuente (stronk7) added a comment -

Assigning to Nico as followup of MDL-9025. Addressing for 1.94.

Thanks for report Nicolas (grrr, this bug is plenty of Nicolas-es) :-D

Show
Eloy Lafuente (stronk7) added a comment - Assigning to Nico as followup of MDL-9025. Addressing for 1.94. Thanks for report Nicolas (grrr, this bug is plenty of Nicolas-es) :-D
Hide
Nicolas Connault added a comment -

Did you check that the filterall setting was on? (Admin -> plugins -> filters -> filter management, last setting). When I switched that on, the role names got rendered properly.

Show
Nicolas Connault added a comment - Did you check that the filterall setting was on? (Admin -> plugins -> filters -> filter management, last setting). When I switched that on, the role names got rendered properly.
Hide
Nicolas Connault added a comment -

Actually there was a bug, which I fixed. I also found a couple of other files where the role name was not put through format_string.

Show
Nicolas Connault added a comment - Actually there was a bug, which I fixed. I also found a couple of other files where the role name was not put through format_string.
Hide
Nicolas Martignoni added a comment -

Yes, Nicolas, the filterall was on.

And yes, your commits fixed the 3 mentioned issues.

Show
Nicolas Martignoni added a comment - Yes, Nicolas, the filterall was on. And yes, your commits fixed the 3 mentioned issues.
Hide
Nicolas Martignoni added a comment -

Verified, closing.

Show
Nicolas Martignoni added a comment - Verified, closing.

People

Dates

  • Created:
    Updated:
    Resolved: