Moodle

[PATCH] Multilang filter is not applied to custom field labels in user profile

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.7, 2.0
  • Fix Version/s: 1.8.13, 1.9.9, 2.0
  • Component/s: Filters
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE, MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE

Description

Summary says it all. Also see discussion here: http://moodle.org/mod/forum/discuss.php?d=146074

Issue Links

Activity

Hide
Nicolas Martignoni added a comment -

Analog issue, already fixed.

Show
Nicolas Martignoni added a comment - Analog issue, already fixed.
Hide
David Mudrak added a comment -

Please make sure you have enabled Site Administration > Modules > Filters > Manage filters > Filter all strings. Once you do it, custom field name will be correctly displayed in the user profile form. There is still a small bug when displaying a list of all custom fields and I will fix that one.

Show
David Mudrak added a comment - Please make sure you have enabled Site Administration > Modules > Filters > Manage filters > Filter all strings. Once you do it, custom field name will be correctly displayed in the user profile form. There is still a small bug when displaying a list of all custom fields and I will fix that one.
Hide
David Mudrak added a comment -

The attached patch fixes multilang support at the page Site Administration > Users > Accounts > User profile fields

Show
David Mudrak added a comment - The attached patch fixes multilang support at the page Site Administration > Users > Accounts > User profile fields
Hide
David Mudrak added a comment -

We have code freeze now so I can't commit the patch right now. I will do it next week after 1.9.8 release.

Show
David Mudrak added a comment - We have code freeze now so I can't commit the patch right now. I will do it next week after 1.9.8 release.
Hide
David Mudrak added a comment -

Fixed in CVS. Upgrade to the next weekly build to get this fixed on your servers. Thanks for the report.

Show
David Mudrak added a comment - Fixed in CVS. Upgrade to the next weekly build to get this fixed on your servers. Thanks for the report.
Hide
Lucas Sa added a comment -

The bug was not totally resolved with the previous patch.
The user that reported the bug was referring to i18n on user profile view, as in the last comments on:

http://moodle.org/mod/forum/discuss.php?d=146074

user/view.php?id= ...

This page uses the function profile_display_fields() on /user/profile/lib.php
I am attaching a patch, but I am not sure if this format works, so basically I changed the line 418 (inside function profile_display_fields()):

print_row(s($formfield->field->name.':'), $formfield->display_data());

for

print_row(s(format_string($formfield->field->name).':'), $formfield->display_data());

Since this bug is marked as Resolved, I am not sure if it is going to be published in CVS.

Show
Lucas Sa added a comment - The bug was not totally resolved with the previous patch. The user that reported the bug was referring to i18n on user profile view, as in the last comments on: http://moodle.org/mod/forum/discuss.php?d=146074 user/view.php?id= ... This page uses the function profile_display_fields() on /user/profile/lib.php I am attaching a patch, but I am not sure if this format works, so basically I changed the line 418 (inside function profile_display_fields()): print_row(s($formfield->field->name.':'), $formfield->display_data()); for print_row(s(format_string($formfield->field->name).':'), $formfield->display_data()); Since this bug is marked as Resolved, I am not sure if it is going to be published in CVS.
Hide
David Mudrak added a comment -

Right - the patch fixed just the part where the field labels are defined, not the user profile display. Reopening. Thanks for the report.

Show
David Mudrak added a comment - Right - the patch fixed just the part where the field labels are defined, not the user profile display. Reopening. Thanks for the report.
Hide
David Mudrak added a comment -

Fixed in 1.8, 1.9 and HEAD. Thanks for the report.

Show
David Mudrak added a comment - Fixed in 1.8, 1.9 and HEAD. Thanks for the report.

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: