Custom profile field for country doesn't display real name in "User search"

Bug #1683202 reported by Kristina Hoeppner on 2017-04-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Medium
Robert Lyon
17.04
Medium
Robert Lyon
17.10
Medium
Unassigned

Bug Description

New Mahara 17.04 feature implemented in bug #1661125.

When you select to display the country in the user search table, it only displays the country code, but not the actual human readable country name.

How to replicate:

1. On /admin/extensions/pluginconfig.php?plugintype=artefact&pluginname=internal&type=profile select "Country" under "Administration user search".
2. Fill in the country "New Zealand" for your user under Content -> Profile -> Contact information.
3. Go to Administration -> Users -> User search and view the table.

Expected result: See "New Zealand" in the "Country" column.
Actual result: You see "nz".

summary: - Custom profile field fo country doesn't display real name in "User
+ Custom profile field for country doesn't display real name in "User
search"
Robert Lyon (robertl-9) wrote :

will need something like

    function format_result($raw) {
        return get_string("country.{$raw}");
    }

See: custom patch

Changed in mahara:
assignee: nobody → Robert Lyon (robertl-9)

Reviewed: https://reviews.mahara.org/7661
Committed: https://git.mahara.org/mahara/mahara/commit/3c5ac809f7183869d6940dc63371af7fd1916e39
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit 3c5ac809f7183869d6940dc63371af7fd1916e39
Author: Robert Lyon <email address hidden>
Date: Thu Apr 20 20:54:47 2017 +1200

Bug 1683202: Country column to display correctly in user search

When adding it via the Extensions -> Internal fields config form

So that it displays 'Australia' instead of 'au'

behatnotneeded

Change-Id: Ic83c20bbf555de38c4d3a657116fc31d577dfc64
Signed-off-by: Robert Lyon <email address hidden>

Reviewed: https://reviews.mahara.org/7683
Committed: https://git.mahara.org/mahara/mahara/commit/e6711554aa15b5a9270132f2aac77ec89f1b40f7
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.04_STABLE

commit e6711554aa15b5a9270132f2aac77ec89f1b40f7
Author: Robert Lyon <email address hidden>
Date: Thu Apr 20 20:54:47 2017 +1200

Bug 1683202: Country column to display correctly in user search

When adding it via the Extensions -> Internal fields config form

So that it displays 'Australia' instead of 'au'

behatnotneeded

Change-Id: Ic83c20bbf555de38c4d3a657116fc31d577dfc64
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 3c5ac809f7183869d6940dc63371af7fd1916e39)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers