/// Get needed strings
$this->loadStrings(array(
'change' => 'xmldb',
+ 'float2numbernote' => 'xmldb',
'vieworiginal' => 'xmldb',
'viewedited' => 'xmldb',
'yes' => '',
$dbdir =& $XMLDB->dbdirs[$dirpath];
$origstructure =& $dbdir->xml_file->getStructure();
+ $o = ''; /// Output starts
+
+ /// If field is XMLDB_TYPE_FLOAT, comment about to migrate it to XMLDB_TYPE_NUMBER
+ if ($field->getType() == XMLDB_TYPE_FLOAT) {
+ $o .= '<p>' . $this->str['float2numbernote'] . '</p>';
+ }
+
/// Add the main form
- $o = '<form id="form" action="index.php" method="post">';
+ $o.= '<form id="form" action="index.php" method="post">';
$o.= ' <div>';
$o.= ' <input type="hidden" name ="dir" value="' . str_replace($CFG->dirroot, '', $dirpath) . '" />';
$o.= ' <input type="hidden" name ="table" value="' . $tableparam .'" />';
$string['fieldsusedinkey'] = 'This field is used as key.';
$string['filenotwriteable'] = 'File not writeable';
$string['fkviolationdetails'] = 'Foreign key $a->keyname on table $a->tablename is violated by $a->numviolations out of $a->numrows rows.';
+$string['float2numbernote'] = 'Notice: Although \"float\" fields are 100% supported by XMLDB, it\'s recommended to migrate to \"number\" fields instead.';
$string['floatincorrectdecimals'] = 'Incorrect number of decimals for float field';
$string['floatincorrectlength'] = 'Incorrect length for float field';
$string['generate_documentation']='Documentation';