Merge branch 'MDL-83995-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE

This commit is contained in:
Sara Arjona 2025-01-15 08:29:05 +01:00
commit c65250bbf2
No known key found for this signature in database
2 changed files with 6 additions and 0 deletions

View File

@ -188,6 +188,11 @@ if ($xml = glossary_read_imported_file($result)) {
throw new \moodle_exception('errorparsingxml', 'glossary');
}
$newentry->definition = trusttext_strip($definition);
if (isset($xmlentry['#']['DEFINITIONTRUST'][0]['#'])) {
$newentry->definitiontrust = !empty($xmlentry['#']['DEFINITIONTRUST'][0]['#']) && trusttext_trusted($context);
}
if ( isset($xmlentry['#']['CASESENSITIVE'][0]['#']) ) {
$newentry->casesensitive = $xmlentry['#']['CASESENSITIVE'][0]['#'];
} else {

View File

@ -2363,6 +2363,7 @@ function glossary_generate_export_file($glossary, $ignored = "", $hook = 0) {
$co .= glossary_full_tag("CONCEPT",4,false,trim($entry->concept));
$co .= glossary_full_tag("DEFINITION",4,false,$entry->definition);
$co .= glossary_full_tag("FORMAT",4,false,$entry->definitionformat); // note: use old name for BC reasons
$co .= glossary_full_tag('DEFINITIONTRUST', 4, false, $entry->definitiontrust);
$co .= glossary_full_tag("USEDYNALINK",4,false,$entry->usedynalink);
$co .= glossary_full_tag("CASESENSITIVE",4,false,$entry->casesensitive);
$co .= glossary_full_tag("FULLMATCH",4,false,$entry->fullmatch);