mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
Merge branch 'MDL-80949-main' of https://github.com/sarjona/moodle
This commit is contained in:
commit
c8d78c8476
@ -67,5 +67,17 @@ function xmldb_data_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v4.3.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2023100901) {
|
||||
// Clean param1 for "text" fields because it was unused.
|
||||
$DB->execute(
|
||||
"UPDATE {data_fields}
|
||||
SET param1 = ''
|
||||
WHERE type = 'text'"
|
||||
);
|
||||
|
||||
// Data savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2023100901, 'data');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -11,8 +11,4 @@
|
||||
<td class="c0"><label for="required"><?php echo get_string('requiredfield', 'data'); ?></label></td>
|
||||
<td class="c1"><input class="requiredfield" type="checkbox" name="required" id="required" <?php p($this->field->required?"checked=\"checked\"":""); ?>/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="c0"><label for="param1"><?php echo get_string('fieldallowautolink', 'data'); ?></label></td>
|
||||
<td class="c1"><input type="checkbox" name="param1" id="param1" <?php if($this->field->param1) {echo 'checked="checked"';} ?> value="1" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -170,7 +170,6 @@ $string['exportownentries'] = 'Export your own entries only? ({$a->mine}/{$a->al
|
||||
$string['exportpreset'] = 'Export preset';
|
||||
$string['failedpresetdelete'] = 'An error was encountered while trying to delete the preset.';
|
||||
$string['fieldadded'] = 'Field added';
|
||||
$string['fieldallowautolink'] = 'Allow autolink';
|
||||
$string['fielddeleted'] = 'Field deleted';
|
||||
$string['fielddelimiter'] = 'Field separator';
|
||||
$string['fielddescription'] = 'Field description';
|
||||
@ -489,3 +488,6 @@ $string['fieldids'] = 'Field ids';
|
||||
|
||||
// Deprecated since Moodle 4.3.
|
||||
$string['completionentries'] = 'Require entries';
|
||||
|
||||
// Deprecated since Moodle 4.4.
|
||||
$string['fieldallowautolink'] = 'Allow autolink';
|
||||
|
@ -9,3 +9,4 @@ addentries,mod_data
|
||||
todatabase,mod_data
|
||||
fieldids,mod_data
|
||||
completionentries,mod_data
|
||||
fieldallowautolink,mod_data
|
||||
|
@ -134,7 +134,7 @@ class mod_data_generator extends testing_module_generator {
|
||||
$record['param1'] = implode("\n", array('menu1', 'menu2', 'menu3', 'menu4'));
|
||||
} else if ($record['type'] == 'multimenu') {
|
||||
$record['param1'] = implode("\n", array('multimenu1', 'multimenu2', 'multimenu3', 'multimenu4'));
|
||||
} else if (($record['type'] === 'text') || ($record['type'] === 'url')) {
|
||||
} else if ($record['type'] === 'url') {
|
||||
$record['param1'] = 1;
|
||||
} else if ($record['type'] == 'latlong') {
|
||||
$record['param1'] = 'Google Maps';
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2023100900; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2023100901; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2023100400; // Requires this Moodle version.
|
||||
$plugin->component = 'mod_data'; // Full name of the plugin (used for diagnostics)
|
||||
$plugin->cron = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user