← Back to team overview

mahara-contributors team mailing list archive

[Bug 1971239] Re: Change the name display order on Profile page according to language usage.

 

The fixes I'm trying to push to gerrit is as below:

File to modify:
htdocs/artefact/internal/index.php

Line:
215

[ Before ]
function get_desired_fields(&$allfields, $section) {
    global $USER;
    $desiredfields = array('about' => array('firstname', 'lastname', 'studentid', 'preferredname', 'userroles', 'introduction'),
                           'contact' => array('email', 'maildisabled', 'officialwebsite', 'personalwebsite', 'blogaddress', 'address', 'town', 'city', 'country', 'homenumber', 'businessnumber', 'mobilenumber', 'faxnumber'),
                           'social' => array('socialprofile'),
                           );

    if (is_callable(array('ArtefactTypeProfileLocal',
'get_desired_fields'))) {

[ After ]
function get_desired_fields(&$allfields, $section) {
    global $USER;

    $fullname_format = get_string('fullname_format', 'langconfig');
    if ($fullname_format == 'lastname_firstname') {
         $about_array = array('about' => array('lastname', 'firstname', 'studentid', 'preferredname', 'userroles', 'introduction'));
    } else {
         $about_array = array('about' => array('firstname', 'lastname', 'studentid', 'preferredname', 'userroles', 'introduction'));
    }
    $contact_array = array('contact' => array('email', 'maildisabled', 'officialwebsite', 'personalwebsite', 'blogaddress', 'address', 'town', 'city', 'country', 'homenumber', 'businessnumber', 'mobilenumber', 'faxnumber'));
    $social_array = array('socialprofile');
    $desiredfields = $about_array + $contact_array + $social_array;

    if (is_callable(array('ArtefactTypeProfileLocal',
'get_desired_fields'))) {

--------------------------

File to modify:
htdocs/lang/en.utf8/langconfig.php
Line:
44

[ Before ]
$string['thislanguage'] = 'English';
$string['locales'] = 'en_US.utf8,en_GB.utf8,en,english-us,english-uk,english';

// Rule to choose from the language's plural forms.

[ After ]
$string['thislanguage'] = 'English';
$string['locales'] = 'en_US.utf8,en_GB.utf8,en,english-us,english-uk,english';
$string['fullname_format'] = 'firstname_lastname';

// Rule to choose from the language's plural forms.

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1971239

Title:
  Change the name display order on Profile page according to language
  usage.

Status in Mahara:
  New

Bug description:
  Currently, the display of name on the profile page is fixed to "first
  name" and "last name" in that order.

  It would be great if we could specify the order in which full names
  are displayed on the "Site options" page or in the "langconfig.php"
  file, since names are displayed in the order of "last name" and "first
  name" in Japanese.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1971239/+subscriptions



References