MDL-52230 mod_data: Take fieldname from field:name()

AMOS BEGIN
 CPY [namedate, mod_data],[fieldtypelable, datafield_date]
 CPY [namefile, mod_data],[fieldtypelable, datafield_file]
 CPY [namecheckbox, mod_data],[fieldtypelable, datafield_checkbox]
 CPY [namelatlong, mod_data],[fieldtypelable, datafield_latlong]
 CPY [namemenu, mod_data],[fieldtypelable, datafield_menu]
 CPY [namemultimenu, mod_data],[fieldtypelable, datafield_multimenu]
 CPY [namenumber, mod_data],[fieldtypelable, datafield_number]
 CPY [namepicture, mod_data],[fieldtypelable, datafield_picture]
 CPY [nameradiobutton, mod_data],[fieldtypelable, datafield_radiobutton]
 CPY [nametext, mod_data],[fieldtypelable, datafield_text]
 CPY [nametextarea, mod_data],[fieldtypelable, datafield_textarea]
 CPY [nameurl, mod_data],[fieldtypelable, datafield_url]
AMOS END
This commit is contained in:
Andrew Hancox
2016-08-09 16:22:00 +08:00
committed by Adrian Greeve
parent 7752762674
commit 421b2d44fe
16 changed files with 40 additions and 14 deletions
+1 -1
View File
@@ -296,7 +296,7 @@ if (($mode == 'new') && (!empty($newtype)) && confirm_sesskey()) { ///
$table->data[] = array(
html_writer::link($displayurl, $field->field->name),
$field->image() . ' ' . get_string($field->type, 'data'),
$field->image() . ' ' . $field->name(),
$field->field->required ? get_string('yes') : get_string('no'),
shorten_text($field->field->description, 30),
html_writer::link($displayurl, $OUTPUT->pix_icon('t/edit', get_string('edit'))) .
@@ -25,3 +25,4 @@
*/
$string['pluginname'] = 'Checkbox';
$string['fieldtypelabel'] = 'Checkbox field';
@@ -25,3 +25,4 @@
*/
$string['pluginname'] = 'Date';
$string['fieldtypelabel'] = 'Date field';
@@ -25,3 +25,4 @@
*/
$string['pluginname'] = 'File';
$string['fieldtypelabel'] = 'File field';
@@ -25,3 +25,4 @@
*/
$string['pluginname'] = 'Latlong';
$string['fieldtypelabel'] = 'Latitude/longitude field';
@@ -25,3 +25,4 @@
*/
$string['pluginname'] = 'Menu';
$string['fieldtypelabel'] = 'Menu field';
@@ -25,3 +25,4 @@
*/
$string['pluginname'] = 'Multimenu';
$string['fieldtypelabel'] = 'Multiple-selection menu field';
@@ -25,3 +25,4 @@
*/
$string['pluginname'] = 'Number';
$string['namenumber'] = 'Number field';
@@ -25,3 +25,4 @@
*/
$string['pluginname'] = 'Picture';
$string['fieldtypelabel'] = 'Picture field';
@@ -25,3 +25,4 @@
*/
$string['pluginname'] = 'Radio button';
$string['nameradiobutton'] = 'Radio button field';
@@ -25,3 +25,4 @@
*/
$string['pluginname'] = 'Text input';
$string['fieldtypelabel'] = 'Text field';
@@ -27,3 +27,4 @@
$string['maxbytes'] = 'Maximum embedded file size (bytes)';
$string['maxbytes_desc'] = 'If set to zero will be unlimited by default';
$string['pluginname'] = 'Text area';
$string['fieldtypelabel'] = 'Textarea field';
@@ -26,3 +26,4 @@
$string['pluginname'] = 'URL';
$string['openlinkinnewwindow'] = 'Open link in new window';
$string['fieldtypelabel'] = 'URL field';
+14 -12
View File
@@ -253,18 +253,6 @@ $string['movezipfailed'] = 'Can\'t move zip';
$string['multientry'] = 'Repeated entry';
$string['multimenu'] = 'Menu (Multi-select)';
$string['multipletags'] = 'Multiple tags found! Template not saved';
$string['namedate'] = 'Date field';
$string['namefile'] = 'File field';
$string['namecheckbox'] = 'Checkbox field';
$string['namelatlong'] = 'Latitude/longitude field';
$string['namemenu'] = 'Menu field';
$string['namemultimenu'] = 'Multiple-selection menu field';
$string['namenumber'] = 'Number field';
$string['namepicture'] = 'Picture field';
$string['nameradiobutton'] = 'Radio button field';
$string['nametext'] = 'Text field';
$string['nametextarea'] = 'Textarea field';
$string['nameurl'] = 'URL field';
$string['newentry'] = 'New entry';
$string['newfield'] = 'Create a new field';
$string['newfield_help'] = 'A field allows the input of data. Each entry in a database activity can have multiple fields of multiple types such as a date field, which allows participants to select a day, month and year from a dropdown list, a picture field, which allows participants to upload an image file, or a checkbox field, which allows participants to select one or more options.
@@ -374,3 +362,17 @@ $string['viewfromdate'] = 'Read only from';
$string['viewtodate'] = 'Read only to';
$string['viewtodatevalidation'] = 'The read only to date cannot be before the read only from date.';
$string['wrongdataid'] = 'Wrong data id provided';
// Deprecated since Moodle 3.2.
$string['namedate'] = 'Date field';
$string['namefile'] = 'File field';
$string['namecheckbox'] = 'Checkbox field';
$string['namelatlong'] = 'Latitude/longitude field';
$string['namemenu'] = 'Menu field';
$string['namemultimenu'] = 'Multiple-selection menu field';
$string['namenumber'] = 'Number field';
$string['namepicture'] = 'Picture field';
$string['nameradiobutton'] = 'Radio button field';
$string['nametext'] = 'Text field';
$string['nametextarea'] = 'Textarea field';
$string['nameurl'] = 'URL field';
+12
View File
@@ -0,0 +1,12 @@
namedate,mod_data
namefile,mod_data
namecheckbox,mod_data
namelatlong,mod_data
namemenu,mod_data
namemultimenu,mod_data
namenumber,mod_data
namepicture,mod_data
nameradiobutton,mod_data
nametext,mod_data
nametextarea,mod_data
nameurl,mod_data
+1 -1
View File
@@ -477,7 +477,7 @@ class data_field_base { // Base class for Database Field Types (see field/*/
* @return string
*/
function name() {
return get_string('name'.$this->type, 'data');
return get_string('fieldtypelabel', "datafield_$this->type");
}
/**