Files
Chamilo/plugin/h5p/cache-h5p/launch/source-dialogcard/H5P.Dialogcards-1.8/upgrades.js
T
Xes 73154ae174
Behat tests 1.11.x 🐞 / PHP 7.4 Test on ubuntu-latest (push) Canceled after 0s
PHP-CS-Fixer / composer_install (7.4) (push) Canceled after 0s
Chamilo 1.11.40 (ZIP oficial v1.11.40)
Fuente: https://github.com/chamilo/chamilo-lms/releases/download/v1.11.40/chamilo-1.11.40.zip
sha256: 1cf4bf2cc7bae1ef1a1eff643235db1d552f78ddf4b6dd1e2d2dac9868679439
Snapshot independiente (rama huerfana); diffable vs 1.11.38. vendor incluido.
2026-08-06 17:59:45 +02:00

42 lines
1.1 KiB
JavaScript

var H5PUpgrades = H5PUpgrades || {};
H5PUpgrades['H5P.Dialogcards'] = (function () {
return {
1: {
/**
* Asynchronous content upgrade hook.
* Upgrades content parameters to support DQ 1.4.
*
* Converts text and answer into rich text.
* Escapes 'dangerous' symbols.
*
* @param {Object} parameters
* @param {function} finished
*/
4: function (parameters, finished) {
// The old default was to scale the text and not the card
parameters.behaviour = {
scaleTextNotCard: true
};
// Complete
finished(null, parameters);
},
7: function (parameters, finished, extras) {
var extrasOut = extras || {};
// Copy html-free title to new metadata structure if present
var title = parameters.title || ((extras && extras.metadata) ? extras.metadata.title : undefined);
if (title) {
title = title.replace(/<[^>]*>?/g, '');
}
extrasOut.metadata = {
title: title
};
finished(null, parameters, extrasOut);
}
}
};
})();