Description
During testing for Moodle 5.1 compatibility, a deprecation warning was identified related to the usage of the Bootstrap class form-inline.
In Moodle 5.1, the form-inline class is deprecated and triggers the following warning in the UI:
Deprecated style in use (.form-inline)
- This warning appears when viewing participant management within the plugin interface.
📷 Screenshot showing the issue:
Root Cause
- The plugin currently outputs HTML containing:
echo '<br /><div class="buttons"><div class="form-inline">';
Proposed Fix
- Replace the deprecated form-inline class with Bootstrap utility classes compatible with Moodle 5.x.
Current code
echo '<br /><div class="buttons"><div class="form-inline">';
Suggested replacement
echo '<br /><div class="buttons"><div class="d-flex flex-wrap gap-2 align-items-center">';
- This change removes the deprecated class and uses modern Bootstrap flex utilities.
Why this fix works
The replacement uses standard Bootstrap layout utilities supported by Moodle:
- d-flex : Enables flex layout
- flex-wrap : Allows items to wrap to the next line
- gap-2 : Adds spacing between elements\
- align-items-center : Aligns elements vertically
These utilities replicate the layout behavior that form-inline previously provided.
Moodle Version Compatibility
Moodle 5.1
- This change removes the deprecated .form-inline usage, eliminating the warning and aligning with Moodle 5.1 UI practices.
Moodle 4.5
-
The change does not negatively affect Moodle 4.5 because:
-
The replacement classes (d-flex, flex-wrap, gap-2, align-items-center) are standard Bootstrap utility classes already supported in Moodle 4.5.
-
They only affect layout styling, not functionality.
-
No JavaScript or backend logic is modified.
-
The HTML structure remains unchanged.
Testing in a Moodle 4.5 environment confirmed that the plugin continues to function normally and the UI renders correctly.
Scope of Change
-
Replace deprecated .form-inline class
-
Maintain the same layout behaviour using Bootstrap utilities
-
No functional changes to the plugin
Description
During testing for Moodle 5.1 compatibility, a deprecation warning was identified related to the usage of the Bootstrap class
form-inline.In Moodle 5.1, the
form-inlineclass is deprecated and triggers the following warning in the UI:📷 Screenshot showing the issue:
Root Cause
This line is located in mod/reengagement/view.php
The form-inline class was used in older Bootstrap implementations but is no longer recommended in Moodle 5.x UI guidelines.
Proposed Fix
Current code
echo '<br /><div class="buttons"><div class="form-inline">';Suggested replacement
echo '<br /><div class="buttons"><div class="d-flex flex-wrap gap-2 align-items-center">';Why this fix works
The replacement uses standard Bootstrap layout utilities supported by Moodle:
These utilities replicate the layout behavior that form-inline previously provided.
Moodle Version Compatibility
Moodle 5.1
Moodle 4.5
The change does not negatively affect Moodle 4.5 because:
The replacement classes (d-flex, flex-wrap, gap-2, align-items-center) are standard Bootstrap utility classes already supported in Moodle 4.5.
They only affect layout styling, not functionality.
No JavaScript or backend logic is modified.
The HTML structure remains unchanged.
Testing in a Moodle 4.5 environment confirmed that the plugin continues to function normally and the UI renders correctly.
Scope of Change
Replace deprecated .form-inline class
Maintain the same layout behaviour using Bootstrap utilities
No functional changes to the plugin