academic-moodle-cooperation / moodle-atto_bsgrid

5 stars 18 forks source link

bsgrid does not work with Moodle 3.5 and Boost #22

Open ralf-krause opened 6 years ago

ralf-krause commented 6 years ago

Hi, I updated my Moodle website from Moodle 3.4.2 up to Moodle 3.5beta+. All text boxes made with bsgrid are damaged. Please update the plugin for Moodle 3.5. Ralf

ralf-krause commented 6 years ago

Hi I found a way to fix the problem. Please change the class "row-fluid" to "row" in every template. Ralf

Old

var col2_template =
    '<div class="atto_bsgrid container-fluid">' +
        '<div class="row-fluid">' +
            '<div class="col-md-6 span6"><p>'+M.util.get_string('column1', 'atto_bsgrid')+'</p></div>' +
            '<div class="col-md-6 span6"><p>'+M.util.get_string('column2', 'atto_bsgrid')+'</p></div>' +
        '</div>' +
    '</div>';

New

var col2_template =
    '<div class="atto_bsgrid container-fluid">' +
        '<div class="row">' +
            '<div class="col-md-6 span6"><p>'+M.util.get_string('column1', 'atto_bsgrid')+'</p></div>' +
            '<div class="col-md-6 span6"><p>'+M.util.get_string('column2', 'atto_bsgrid')+'</p></div>' +
        '</div>' +
    '</div>';
gthomas2 commented 6 years ago

Hi Ralf. Thanks for that. I think this is an inherent problem with the plugin. As soon as bootstrap markup changes you are then stuck with old markup that no longer works. If we change the template code then that's going to be fine for new content but all the old content is still not going to work as expected.

ralf-krause commented 6 years ago

That‘s totally correct what you write ... old content must get a revision to be better. But the much bigger problem is that the current plugin does not work with Moodle 3.5 and Bootstrap 4. I found a very small correction which works for me in my platforms.

I hope we will get a new plugin version as soon as possible.

Best regards, Ralf

Am 19.07.2018 um 22:23 schrieb gthomas2 notifications@github.com:

Hi Ralf. Thanks for that. I think this is an inherent problem with the plugin. As soon as bootstrap markup changes you are then stuck with old markup that no longer works. If we change the template code then that's going to be fine for new content but all the old content is still not going to work as expected.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

gthomas2 commented 6 years ago

I'm thinking that the BS Grid plugin is not an optimal solution. I have a plan to build an editor that allows for the markup to be automatically upgraded via filters. I just need time to build it!

ralf-krause commented 6 years ago

Hi Guy, it would be nice if you would change the 'row-fluid' into 'row' so the users can add new bootstrap grids into their text pages and websites. Ralf

berthelemy commented 3 years ago

This is still an issue. Am I right in thinking that this plugin is no longer supported?

ralf-krause commented 3 years ago

Hi, my patch works fine also in Moodle 3.10.3. Ralf

nstefanski commented 3 years ago

I'm not sure if this is being actively maintained, but I went ahead and made a pull request implementing the fix that @ralf-krause suggested.

ralf-krause commented 3 years ago

Hi, since Moodle 3.11 came out the Bootstrap Grid also works fine with 3.11 and the the patched plugin atto_bsgrid. Also the Moodle 4.0dev (20210617) shows the Bootstrap Grid correctly.

I don't know if Moodle HQ will upgrade the Bootstrap version when Moodle 4.0 will be released in November 2021. I found the new Bootstrap v5.0 documentation on the page https://getbootstrap.com/docs/5.0/getting-started/introduction/ . If you want to see the structure of Bootstrap Grid then go to https://getbootstrap.com/docs/5.0/layout/grid/ ... for the Bootstrap Grid I found no differences between 4.0 and 5.0.

Best regards, Ralf

ralf-krause commented 3 years ago

Please look at https://tracker.moodle.org/browse/MDL-70790 There will be a lot of changes the the themes in Moodle 4.0 but I hope that Bootstrap Grid should work also in Moodle 4.0.

ralf-krause commented 3 years ago

For the patched plugin atto_bsgrid I made changes in the following files

The patched plugin is working for me since Moodle 3.5 up to Moodle 3.11+ (Build: 20210617) and it also works in the developer Moodle 4.0dev (Build: 20210617). You can download the plugin here and install ist in your Moodle for your own risk. Download atto_bsgrid_20210623.tar.gz

KenFarr commented 2 years ago

@ralf-krause Thanks for your update. One minor issue, on pages with two editable boxes eg creating a page resource, two lists of columns are created, see pic. thanks Ken

bsgriddouble
ralf-krause commented 2 years ago

Hi Ken, I'm not the developer or maintainer of this atto plugin. Yes, there is a problem with the double listed icons. See https://github.com/academic-moodle-cooperation/moodle-atto_bsgrid/issues/27