Minor - format code

pull/3924/head
Julio Montoya 4 years ago
parent 6f8b9134e7
commit c7d5d8ef31
  1. 2
      assets/vue/components/course/CourseToolList.vue
  2. 3
      public/main/gradebook/lib/fe/linkaddeditform.class.php
  3. 93
      public/main/inc/lib/internationalization.lib.php
  4. 3
      public/main/lp/LearnPathItemForm.php
  5. 3
      public/main/lp/learnpath.class.php
  6. 11
      src/CoreBundle/Component/Editor/Editor.php

@ -46,7 +46,7 @@
import {mapGetters} from "vuex";
export default {
name: 'HomeCourseCard',
name: 'CourseToolList',
props: {
course: Object,
tool: Object,

@ -184,7 +184,8 @@ class LinkAddEditForm extends FormValidator
// ELEMENT: visible
$visible = (self::TYPE_EDIT == $form_type && $link->is_visible()) ? '1' : '0';
$this->addElement('checkbox', 'visible', null, get_lang('Visible'), $visible);
//$this->addCheckBox('visible', null, get_lang('Visible'), $visible);
$this->addCheckBox('visible', null, get_lang('Visible'));
if (self::TYPE_EDIT == $form_type) {
$defaults['visible'] = $link->is_visible();
}

@ -768,7 +768,7 @@ function api_is_western_name_order($format = null, $language = null)
}
if (empty($language)) {
$language = api_get_language_isocode(false, true);
$language = api_get_language_isocode();
}
if (!isset($order[$format][$language])) {
$test_name = api_get_person_name('%f', '%l', '%t', $format, $language);
@ -798,7 +798,7 @@ function api_sort_by_first_name($language = null)
static $sort_by_first_name = [];
if (empty($language)) {
$language = api_get_language_isocode(false, true);
$language = api_get_language_isocode();
}
if (!isset($sort_by_first_name[$language])) {
$sort_by_first_name[$language] = _api_get_person_name_convention($language, 'sort_by');
@ -1202,23 +1202,6 @@ function api_strrchr($haystack, $needle, $before_needle = false, $encoding = nul
return strrchr($haystack, $needle);
}
/**
* Reverses a string.
*
* @param string $string the string to be reversed
* @param string $encoding (optional) The used internally by this function character encoding. If it is omitted, the
* platform character set will be used by default.
*
* @return string Returns the reversed string.
* This function is aimed at replacing the function strrev() for human-language strings.
*
* @see http://php.net/manual/en/function.strrev
*/
function api_strrev($string, $encoding = null)
{
return strrev($string);
}
/**
* Finds the position of last occurrence (case insensitive) of a string in a string.
*
@ -1953,78 +1936,6 @@ function &_api_get_day_month_names($language = null)
return $date_parts[$language];
}
function getIsoToLegacy()
{
return array_flip(getLegacyToIso());
}
function getLegacyToIso()
{
return [
'asturian' => 'ast_ES',
'basque' => 'eu_ES',
'bengali' => 'bn',
'bosnian' => 'bs',
'brazilian' => 'pt_BR',
'bulgarian' => 'bg',
'catalan' => 'ca_ES',
'croatian' => 'hr',
'czech' => 'cs',
'danish' => 'da',
'dari' => 'fa_AF',
'dutch' => 'nl',
'english' => 'en_US',
'estonian' => 'et',
'esperanto' => 'eo',
'faroese' => 'fo',
'finnish' => 'fi',
'french' => 'fr',
'friulian' => 'fur_IT',
'galician' => 'gl_ES',
'georgian' => 'ka',
'german' => 'de',
'greek' => 'el',
'hebrew' => 'he',
'hindi' => 'hi',
'hungarian' => 'hu',
'indonesian' => 'id',
'italian' => 'it',
'japanese' => 'ja',
'korean' => 'ko',
'latvian' => 'lv',
'lithuanian' => 'lt',
'macedonian' => 'mk',
'malay' => 'ms',
'norwegian' => 'nn',
'occitan' => 'oc_FR',
'pashto' => 'ps',
'persian' => 'fa',
'polish' => 'pl',
'portuguese' => 'pt',
'quechua_cusco' => 'qu',
'romanian' => 'ro',
'russian' => 'ru',
'serbian' => 'sr',
'simpl_chinese' => 'zh_CN',
'slovak' => 'sk',
'slovenian' => 'sl',
'somali' => 'so',
'spanish' => 'es',
'spanish_latin' => 'es_MX',
'swahili' => 'sw',
'swedish' => 'sv',
'tagalog' => 'tl',
'thai' => 'th',
'tibetan' => 'bo',
'trad_chinese' => 'zh_TW',
'turkish' => 'tr',
'ukrainian' => 'uk',
'vietnamese' => 'vi',
'xhosa' => 'xh',
'yoruba' => 'yo',
];
}
/**
* Returns returns person name convention for a given language.
*

@ -39,9 +39,8 @@ class LearnPathItemForm
$itemDescription = $lpItem->getDescription();
$parentItemId = $lpItem->getParentItemId();
$itemType = $lpItem->getItemType();
$previousItemId = $lpItem->getPreviousItemId();
//$previousItemId = $lpItem->getPreviousItemId();
$count = count($arrLP);
// Parent
$parentSelect = $form->addSelect(
'parent',

@ -6588,8 +6588,7 @@ class learnpath
$form->setDefaults(['if_exists' => $defaultFileExistsOption]);
// Check box options
$form->addElement(
'checkbox',
$form->addCheckBox(
'unzip',
get_lang('Options'),
get_lang('Uncompress zip')

@ -24,9 +24,6 @@ class Editor
*/
public string $toolbarSet;
/**
* Initial value.
*/
public string $value;
public array $config;
@ -144,14 +141,6 @@ class Editor
}
}
/**
* @return string
*/
public function getLocale()
{
return api_get_language_isocode();
}
/**
* Converts a PHP variable into its Javascript equivalent.
* The code of this method has been "borrowed" from the function drupal_to_js() within the Drupal CMS.

Loading…
Cancel
Save