mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-22061 converting profile fields to real plugins with lang packs
AMOS START MOV [profilefieldtypecheckbox,core_admin],[pluginname,profilefield_checkbox] MOV [profilefieldtypemenu,core_admin],[pluginname,profilefield_menu] MOV [profilefieldtypetext,core_admin],[pluginname,profilefield_text] MOV [profilefieldtypetextarea,core_admin],[pluginname,profilefield_textarea] AMOS END
This commit is contained in:
parent
37f005b142
commit
859b00d0cc
@ -754,10 +754,6 @@ $string['profilefieldmaxlength'] = 'Maximum length';
|
||||
$string['profilefieldrows'] = 'Rows';
|
||||
$string['profilefields'] = 'User profile fields';
|
||||
$string['profilefieldsize'] = 'Display size';
|
||||
$string['profilefieldtypecheckbox'] = 'Checkbox';
|
||||
$string['profilefieldtypemenu'] = 'Menu of choices';
|
||||
$string['profilefieldtypetext'] = 'Text input';
|
||||
$string['profilefieldtypetextarea'] = 'Text area';
|
||||
$string['profileforceunique'] = 'Should the data be unique?';
|
||||
$string['profileinvaliddata'] = 'Invalid value';
|
||||
$string['profilelocked'] = 'Is this field locked?';
|
||||
|
@ -388,13 +388,9 @@ function profile_list_datatypes() {
|
||||
|
||||
$datatypes = array();
|
||||
|
||||
if ($dirlist = get_directory_list($CFG->dirroot.'/user/profile/field', '', false, true, false)) {
|
||||
foreach ($dirlist as $type) {
|
||||
$datatypes[$type] = get_string('profilefieldtype'.$type, 'profilefield_'.$type);
|
||||
if (strpos($datatypes[$type], '[[') !== false) {
|
||||
$datatypes[$type] = get_string('profilefieldtype'.$type, 'admin');
|
||||
}
|
||||
}
|
||||
$plugins = get_plugin_list('profilefield');
|
||||
foreach ($plugins as $type=>$unused) {
|
||||
$datatypes[$type] = get_string('pluginname', 'profilefield_'.$type);
|
||||
}
|
||||
asort($datatypes);
|
||||
|
||||
|
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Strings for component 'profilefield_checkbox', language 'en', branch 'MOODLE_20_STABLE'
|
||||
*
|
||||
* @package profilefield_checkbox
|
||||
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$string['pluginname'] = 'Checkbox';
|
26
user/profile/field/menu/lang/en/profilefield_menu.php
Normal file
26
user/profile/field/menu/lang/en/profilefield_menu.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Strings for component 'profilefield_menu', language 'en', branch 'MOODLE_20_STABLE'
|
||||
*
|
||||
* @package profilefield_menu
|
||||
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$string['pluginname'] = 'Menu of choices';
|
26
user/profile/field/text/lang/en/profilefield_text.php
Normal file
26
user/profile/field/text/lang/en/profilefield_text.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Strings for component 'profilefield_text', language 'en', branch 'MOODLE_20_STABLE'
|
||||
*
|
||||
* @package profilefield_text
|
||||
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$string['pluginname'] = 'Text input';
|
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Strings for component 'profilefield_textarea', language 'en', branch 'MOODLE_20_STABLE'
|
||||
*
|
||||
* @package profilefield_textarea
|
||||
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$string['pluginname'] = 'Text area';
|
Loading…
x
Reference in New Issue
Block a user