table borders and Moodle 5.0

table borders and Moodle 5.0

by Luigi Esposito -
Number of replies: 12

hi guys,

my MoodleCloud site has just been upgraded to version 5.0 and I immediately noticed an important difference in the way my content is displayed.

All tables in pages, books, questions, etc. are shown without borders around their cells. Only the borders around the tables in their entirety are displayed correctly. When I created my pages, the cell borders were perfectly visible without any specific action on my part: all I had to do was tell the page editor (TinyMCE) to create a table, selecting its size and choosing the background color, and the table was shown with all the cell borders, both in the editor and on the final page.

Now the pages lose readability and the contents of each cell seem to touch the contents of adjacent cells.

I'm so frustrated... 😧Fortunately the school year is almost over, so my students will not have to deal with these confusing pages, but my job now is to fix everything.

I would like to submit a few questions:

  1. is there a way to fix my content (pages, books, questions, ...) by working on some setting in MoodleCloud, or do I have to edit every single table, on every single page, in every course I have created all these years to add borders around the cells?
  2. if I have to do this, is there a search that I can run on my site to locate where the content has HTML tables in it, or do I have to open every single page (and book, and question, ...) to see if that content needs to be edited or not?

I hope someone can answer my request, and I hope I don't have to work all  summer season to fix my Moodle site 😨. Looking forward to any (good) news, I thank you in advance and wish you a nice day,

Luigi

Average of ratings: Useful (1)
In reply to Luigi Esposito

table borders and Moodle 5.0

by Brett Dalton -
Picture of Moodle HQ Picture of Particularly helpful Moodlers
Luigi

Moodle 5.0 had a major upgrade from Bootstrap 4 to Bootstrap 5, this may have had some unintended styling impacts in other areas. We have QA'ed this as much as possible but with such a wide ranging change not everything will be caught. I'll ask my team to look at this and verify that Bootstrap is the underlying cause and it's not something else.
Average of ratings: Useful (2)
In reply to Brett Dalton

table borders and Moodle 5.0

by Brett Dalton -
Picture of Moodle HQ Picture of Particularly helpful Moodlers
Luigi

We have confirmed that this is a result of the Bootstrap 5 upgrade. I'll get an issue logged to fix this
Average of ratings: Useful (3)
In reply to Brett Dalton

table borders and Moodle 5.0

by Luigi Esposito -
hi Brett,
thanks for your care to my issue smile When you said "I'll get an issue logged to fix this", you let me think that this behaviour could be fixed by some Moodle developer, for me. Isn't it? (I hope...) Greetings,
Luigi
Average of ratings: Useful (1)
In reply to Luigi Esposito

table borders and Moodle 5.0

by Brett Dalton -
Picture of Moodle HQ Picture of Particularly helpful Moodlers

Yes this will need to be fixed by a developer.  I'm hoping we can address this pretty quickly

Average of ratings: Useful (2)
In reply to Brett Dalton

table borders and Moodle 5.0

by Stephen Graham -

Hi Brett,

I have a similar issue that has manifested itself since the update to Bootstrap 5. We have embedded PDF files hosted within our instance of MoodleCloud together with links to videos hosted elsewhere in the internet (mostly YouTube). The vertical frame size for all of these embedded items has suddenly shrunk to about one-third to one quarter of their original size, although the horizontal frame size appears to be unchanged. In their current frame sizes the PDFs are difficult to use and the videos are unwatchable. Although there are workarounds we would prefer the frame sizes to return to their pre-Bootstrap 5 sizes.

Can you confirm that this issue part of the same issue with table borders and that it will be addressed by Moodle developers? I can provided screen shots if needed.

Thanks for the help.

Steve G      

In reply to Stephen Graham

table borders and Moodle 5.0

by Brett Dalton -
Picture of Moodle HQ Picture of Particularly helpful Moodlers

Steve 

Screenshots would be very helpful along with the URLs of the pages (you can omit the domain of your site for privacy).  It's likely it will be related to these upgrades but the more info we have for the developers the better.  Bootstrap as a framework touches all of the system and it's not always obvious or possible to test what will be affected so we are grateful for your reports and patience.

Average of ratings: Useful (1)
In reply to Brett Dalton

table borders and Moodle 5.0

by Stephen Graham -

Hi Brett,

Thank you for your response. I have attached a screenshot for Week 5 of our one of our courses showing two Text and Media Area activities for an embedded PDF and an embedded link to a YouTube video. Prior to the Bootstrap 5 update these activities appeared at least 3 times the height of their current display. I have reproduced the code for the embedded link to the YouTube video below. As suggested I have blanked out the domain. If needed I can provide the code for the embedded PDF.

A few days also I also registered this issue with Moodle Tracker https://tracker.moodle.org/browse/MDL-85699. The issue was triaged yesterday, but at time of writing was unassigned.

Are you able to provide any information about when we may expect our course pages to return to their original state? I appreciate that this will be in the hands of your developers, but this is impacting our efforts to recruit new students to our courses in addition to potentially causing existing students to reconsider their continued enrollment.

It would also be useful if you could point me towards a mailing list that we could subscribe to so that we could be made aware prior to any updates to MoodleCloud and their potential impacts. Does Moodle provide a User Acceptance Test environment that we can subscribe to, so that we, as end users, can prove our Moodle courses prior to updates going live? 

Thank you for your help and please let me know if you need any further information.     

<!-- Start of Video box -->
<div class="card well" style="padding: 10px;">
  <h4 class="text-danger"><i class="fa fa-play-circle-o"></i> La Navidad
    Española (1:39:50)</h4>
  <div class="embed-responsive embed-responsive-16by9"><iframe
      class="embed-responsive-item vjs-tech"
      src="https://www.youtube.com/embed/C7gLAt6TKQA?rel=0"
      allowfullscreen="allowfullscreen"></iframe></div>
</div>
<!-- End of video box -->

  

Attachment MDL-85699.png
Average of ratings: Useful (2)
In reply to Brett Dalton

table borders and Moodle 5.0

by Stephen Graham -
Hi Brett,

I reported this issue using Moodle tracker here: https://moodle.atlassian.net/browse/MDL-85699. Your colleague Mikel Martín Corrales kindly provided the solution on the 11/06/2025. My mistake was assuming that the problem was with the iframe element and failing to examine the Bootstrap 5 migration guide properly (https://getbootstrap.com/docs/5.0/migration/#helpers), whereas it was in fact three deprecated classes used by the
container:
- embed-responsive
- embed-responsive-16by9
- embed-responsive-item
Using the replacement ratio classes present in Bootstrap 5 resolved the issue for me.

I mention the Mikel's solution here in addition to his alternative of adding the old BS4 classes as custom SCSS to my site, in case Luigi finds if useful.

Steve G
In reply to Stephen Graham

table borders and Moodle 5.0

by Luigi Esposito -
hi Stephen,
I appreciate your in-depth work and I guess I could use your solution for my problem, but unfortunately I can't understand your steps as I've never worked with the custom SCSS on my MoodleCloud site and I don't recognise any of those classes. Thanks anyway,
Luigi
In reply to Brett Dalton

table borders and Moodle 5.0

by Luigi Esposito -
hi Brett,
I hope you're well. I’m following up on the "table formatting issue" I reported on June 2, following the upgrade from Moodle 4 to 5 and the associated Bootstrap update. As of today, I haven't seen any changes or updates, and the readability issue is still impacting my course pages. I understand these things take time, but with the new school year approaching in mid-September, I’m concerned about whether a fix will be available in time.

Have the developers had a chance to look into this? Thanks again for your support,
Luigi
In reply to Luigi Esposito

table borders and Moodle 5.0

by Brett Dalton -
Picture of Moodle HQ Picture of Particularly helpful Moodlers
Thanks for the follow up. The work is scheduled but the team has had some infrastructure performance issues that have had to take precedence. I will see if we can get this worked on sometime soon.
In reply to Brett Dalton

table borders and Moodle 5.0

by Luigi Esposito -
hi Brett,
using some AI hints, I added this code in the Initial raw SCSS box:

table[border] {
border-collapse: collapse;
}

table[border] th, table[border] td {
border: 1px solid #aaa;
}

Now all my tables have a border around their cells, but system tables (e.g. report, logs, ...) do not.

I hope this works for me, also in the future. Thanks again,
Luigi