Minor - format code.

1.9.x
Julio Montoya 10 years ago
parent f1c9210c4d
commit e479f4b744
  1. 3
      main/gradebook/lib/flatview_data_generator.class.php
  2. 13
      main/inc/lib/internationalization.lib.php
  3. 8
      main/inc/lib/internationalization_database/name_order_conventions.php

@ -57,6 +57,7 @@ class FlatViewDataGenerator
/**
* Get total number of users (rows)
* @return int
*/
public function get_total_users_count()
{
@ -65,6 +66,7 @@ class FlatViewDataGenerator
/**
* Get total number of evaluations/links (columns) (the 2 users columns not included)
* @return int
*/
public function get_total_items_count()
{
@ -220,6 +222,7 @@ class FlatViewDataGenerator
/**
* Get array containing evaluation items
* @return array
*/
public function get_evaluation_items($items_start = 0, $items_count = null)
{

@ -1011,7 +1011,15 @@ function api_get_months_long($language = null) {
* @author Carlos Vargas <carlos.vargas@dokeos.com> - initial implementation.
* @author Ivan Tcholakov
*/
function api_get_person_name($first_name, $last_name, $title = null, $format = null, $language = null, $encoding = null, $username = null) {
function api_get_person_name(
$first_name,
$last_name,
$title = null,
$format = null,
$language = null,
$encoding = null,
$username = null
) {
static $valid = array();
if (empty($format)) {
$format = PERSON_NAME_COMMON_CONVENTION;
@ -1025,6 +1033,7 @@ function api_get_person_name($first_name, $last_name, $title = null, $format = n
if (empty($encoding)) {
$encoding = _api_mb_internal_encoding();
}
if (!isset($valid[$format][$language])) {
if (is_int($format)) {
switch ($format) {
@ -1078,7 +1087,7 @@ function api_get_person_name($first_name, $last_name, $title = null, $format = n
/**
* Checks whether a given format represents person name in Western order (for which first name is first).
* @param int/string $format (optional) The person name format. It may be a pattern-string (for example '%t. %l, %f') or some of the constants PERSON_NAME_COMMON_CONVENTION (default), PERSON_NAME_WESTERN_ORDER, PERSON_NAME_EASTERN_ORDER, PERSON_NAME_LIBRARY_ORDER.
* @param string $language (optional) The language indentificator. If it is omited, the current interface language is assumed. This parameter has meaning with the format PERSON_NAME_COMMON_CONVENTION only.
* @param string $language (optional) The language identificator. If it is omited, the current interface language is assumed. This parameter has meaning with the format PERSON_NAME_COMMON_CONVENTION only.
* @return bool The result TRUE means that the order is first_name last_name, FALSE means last_name first_name.
* Note: You may use this function for determing the order of the fields or columns "First name" and "Last name" in forms, tables and reports.
* @author Ivan Tcholakov

@ -84,15 +84,7 @@ return array(
'simpl_chinese' => array('format' => 'title last_name first_name', 'sort_by' => 'last_name' ), // Eastern order
'slovak' => array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
'slovenian' => array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
//'spanish' => array( 'format' => 'title first_name last_name', 'sort_by' => 'last_name'),
//'spanish' => array( 'format' => 'title last_name first_name', 'sort_by' => 'last_name'),
// Some experimental settings for Spanish language:
//'spanish' => array( 'format' => 'title first_name LAST_NAME', 'sort_by' => 'first_name'), // Western order, last name is uppercase when a full name is assembled
//'spanish' => array( 'format' => 'title first_name LAST_NAME', 'sort_by' => 'last_name'), // Western order, last name is uppercase when a full name is assembled
'spanish' => array('format' => 'title last_name, first_name', 'sort_by' => 'last_name'), // Library order
//'spanish' => array( 'format' => 'title LAST_NAME, first_name', 'sort_by' => 'last_name'), // Library order, last name is uppercase when a full name is assembled
'swahili' => array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
'swedish' => array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
'tagalog' => array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),

Loading…
Cancel
Save