chamilo / chamilo-lms

Chamilo is a learning management system focused on ease of use and accessibility
https://chamilo.org
GNU General Public License v3.0
798 stars 480 forks source link

H5P plugin breaks jquery ui addons #4689

Closed AngelFQC closed 1 year ago

AngelFQC commented 1 year ago

The plugin re-adds the jquery-ui.min.js and this affects the other addons (datetimepicker, for example)

Chamilo already loads jquery-ui for all pages. So there should be no need to add it back.

Reference https://github.com/chamilo/chamilo-lms/blob/ce529e8557cb365d2d0d7858f1d756472ac66d37/plugin/h5p/index.php#L22

ywarnier commented 1 year ago

@LudiscapeXApi

LudiscapeXApi commented 1 year ago

This H5P engine is no longer valid, but here is a correction $fh .= '<script>if (!jQuery.ui) {'; $fh .= "$('body').append('<script src=\"".$webPath."web/assets/jquery-ui/jquery-ui.min.js\"></script>');}</script>"; https://github.com/LudiscapeXApi/chamilo-lms/blob/patch-16-jqueryui/plugin/h5p/index.php

ywarnier commented 1 year ago

Seems fixed with the proposed patch. Sent here: https://github.com/chamilo/chamilo-lms/commit/0ab027d377b8c505d2c43a08ca389c4614774a3f Thanks! Closing.