Moodle
  1. Moodle
  2. MDL-43092

Afterburner theme: Add an activity or resource dialog is greyed-out for non-empty courses in 2.6+

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.6, 2.7
    • Fix Version/s: 2.6.1, 2.7
    • Component/s: Themes
    • Labels:
    • Testing Instructions:
      Hide

      2.6 and master:

      1. Select Afterburner theme
      2. Go to a course that uses Topic format or create one
      3. Turn editing ON and TEST that when adding an activity or resource the dialogue box is not greyed-out.
      4. Dock a block and TEST as 3. again.
      5. Test custom menus and filepicker with and without docked blocks (make sure the modal window is on top)
      Show
      2.6 and master: Select Afterburner theme Go to a course that uses Topic format or create one Turn editing ON and TEST that when adding an activity or resource the dialogue box is not greyed-out. Dock a block and TEST as 3. again. Test custom menus and filepicker with and without docked blocks (make sure the modal window is on top)
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Pull 2.6 Branch:
      MDL-43092_M26
    • Pull Master Branch:
      MDL-43092_master

      Description

      When using the Afterburner theme with Moodle 2.6+ (Build: 20131122) I am unable to use the "add an activity or resource" dialog since it is greyed-out and does not provide any functionality.

      This only happens on courses which are already populated with material. The dialog comes up alright on empty courses.

      I could reproduce this phenomenon on three different Moodle installations all running the same version of Moodle, though.

      The problem can be circumvented by using a different theme. However, I would appreciate having this problem fixed for Afterburner, sicne that is what have been using.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Patrick Dunham added a comment -

            We're experiencing the same issue. If there are any blocks docked to the left side the bug appears. Once we undock all of the blocks we can add activities. Also I can edit the Z-Index of the moodle-dialogue-lightbox to 600 or below and the bug is fixed.

            <div style="position: fixed; width: 100%; height: 100%; top: 0px; left: 0px; z-index: 11001;" id="yui_3_13_0_2_1385995214530_7266" class="yui3-widget-mask moodle-dialogue-lightbox"></div>

            Show
            Patrick Dunham added a comment - We're experiencing the same issue. If there are any blocks docked to the left side the bug appears. Once we undock all of the blocks we can add activities. Also I can edit the Z-Index of the moodle-dialogue-lightbox to 600 or below and the bug is fixed. <div style="position: fixed; width: 100%; height: 100%; top: 0px; left: 0px; z-index: 11001;" id="yui_3_13_0_2_1385995214530_7266" class="yui3-widget-mask moodle-dialogue-lightbox"></div>
            Hide
            Mary Evans added a comment -

            Thanks Martin for reporting this bug.
            And thanks to you too Patrick for going the extra mile and suggesting fixes.
            I am just looking at this now.

            Show
            Mary Evans added a comment - Thanks Martin for reporting this bug. And thanks to you too Patrick for going the extra mile and suggesting fixes. I am just looking at this now.
            Hide
            Mary Evans added a comment -

            That's ODD I cannot replicate this at all.

            Have you tried 'Purge all caches' in Site Administration > Development > Purge all caches
            this may fix the problem.

            Show
            Mary Evans added a comment - That's ODD I cannot replicate this at all. Have you tried 'Purge all caches' in Site Administration > Development > Purge all caches this may fix the problem.
            Hide
            Mary Evans added a comment - - edited

            Just wondering if this is because of JS conflict with some plug-ins (blocks mainly)?

            Show
            Mary Evans added a comment - - edited Just wondering if this is because of JS conflict with some plug-ins (blocks mainly)?
            Hide
            Mary Evans added a comment -

            Andrew Nicols

            Any chance you can see if you can replicate this as I am not able to.

            Show
            Mary Evans added a comment - Andrew Nicols Any chance you can see if you can replicate this as I am not able to.
            Hide
            Mary Evans added a comment -

            @Martin O'Mahony and Patrick Dunham I need more feedback as I am now wondering if this is something to do with the course format set for the course pages you are referring to. With this in mind can you check and tell me if the course format is a contributed one (plug-in) like Grid or Collapsed Topics?

            Also it would be good if you could also provide a screen-shot or two of the various problems you are experiencing with this theme?

            Also, and this is just as important, can you verify that other Moodle themes don;t display the same problem. If they do can you list them?

            Thanks
            Mary

            Show
            Mary Evans added a comment - @ Martin O'Mahony and Patrick Dunham I need more feedback as I am now wondering if this is something to do with the course format set for the course pages you are referring to. With this in mind can you check and tell me if the course format is a contributed one (plug-in) like Grid or Collapsed Topics? Also it would be good if you could also provide a screen-shot or two of the various problems you are experiencing with this theme? Also, and this is just as important, can you verify that other Moodle themes don;t display the same problem. If they do can you list them? Thanks Mary
            Hide
            Mary Evans added a comment -

            Gareth, Just adding you as a watcher here. As mentioned earlier in the discussion here that I cannot replicate the issue, but wondered if you could test on your Moodle 2.6 site with the different course formats other than standard Moodle ones, so that we can rule them out?
            Cheers
            Mary

            Show
            Mary Evans added a comment - Gareth, Just adding you as a watcher here. As mentioned earlier in the discussion here that I cannot replicate the issue, but wondered if you could test on your Moodle 2.6 site with the different course formats other than standard Moodle ones, so that we can rule them out? Cheers Mary
            Hide
            Gareth J Barnard added a comment -

            Hi Mary Evans,

            Give me a mo or two and I'll see what I can do.

            Gareth

            Show
            Gareth J Barnard added a comment - Hi Mary Evans , Give me a mo or two and I'll see what I can do. Gareth
            Hide
            Gareth J Barnard added a comment -

            Attached a screen shot showing it working with Collapsed Topics 2.6.1 and Moodle 2.6+ (Build: 20131129).

            Show
            Gareth J Barnard added a comment - Attached a screen shot showing it working with Collapsed Topics 2.6.1 and Moodle 2.6+ (Build: 20131129).
            Hide
            Gareth J Barnard added a comment - - edited

            And another with all the blocks docked. Although I did find it very tricky to move the dialog - almost impossible. Which when the blocks were un-docked was easy. In fact when any are docked then almost impossible to move the dialog indicating a potential issue with docking.

            Show
            Gareth J Barnard added a comment - - edited And another with all the blocks docked. Although I did find it very tricky to move the dialog - almost impossible. Which when the blocks were un-docked was easy. In fact when any are docked then almost impossible to move the dialog indicating a potential issue with docking.
            Hide
            Patrick Dunham added a comment -

            Did some more investigation. Bug shows up in Topic format but not weekly. Created a new course and was able to replicate the problem. Attaching screen shot.

            Show
            Patrick Dunham added a comment - Did some more investigation. Bug shows up in Topic format but not weekly. Created a new course and was able to replicate the problem. Attaching screen shot.
            Hide
            Mary Evans added a comment -

            Thanks Patrick, I'll try again and do some more testing.

            Show
            Mary Evans added a comment - Thanks Patrick, I'll try again and do some more testing.
            Hide
            Patrick Dunham added a comment -

            Mary - Changed the theme to standard and the problem goes away.

            Show
            Patrick Dunham added a comment - Mary - Changed the theme to standard and the problem goes away.
            Hide
            Mary Evans added a comment -

            BINGO!

            I managed to replicate this and find that it is a z-index problem so need to get Andrew Nicols to check this out as the z-index looks to be being added as an in-line style, probably via JavaScript.

            Thanks and sorry for doubting you.

            Show
            Mary Evans added a comment - BINGO! I managed to replicate this and find that it is a z-index problem so need to get Andrew Nicols to check this out as the z-index looks to be being added as an in-line style, probably via JavaScript. Thanks and sorry for doubting you.
            Hide
            Mary Evans added a comment -

            @Patrick,
            The fact that it is a z-index issue also might be because of some CSS in Afterburner. I am going to check now.

            Show
            Mary Evans added a comment - @Patrick, The fact that it is a z-index issue also might be because of some CSS in Afterburner. I am going to check now.
            Hide
            Mary Evans added a comment -

            This is the culprit!

            /* Important z-index fixes
            -------------------------*/
            .yui-skin-sam .yui-panel-container

            { z-index: 999999!important; }

            body#page-course-view-topics.path-course div.moodle-dialogue-base div.yui3-widget

            { z-index: 600!important; }
            Show
            Mary Evans added a comment - This is the culprit! /* Important z-index fixes -------------------------*/ .yui-skin-sam .yui-panel-container { z-index: 999999!important; } body#page-course-view-topics.path-course div.moodle-dialogue-base div.yui3-widget { z-index: 600!important; }
            Hide
            Patrick Dunham added a comment -

            No problem at all. Hard to fix something you can't replicate.

            Thanks for sticking with me and finding the problem!

            -Patrick

            Show
            Patrick Dunham added a comment - No problem at all. Hard to fix something you can't replicate. Thanks for sticking with me and finding the problem! -Patrick
            Hide
            Gareth J Barnard added a comment -

            I think there should be a z-index number allocation scheme like Iana Port numbers.

            Show
            Gareth J Barnard added a comment - I think there should be a z-index number allocation scheme like Iana Port numbers.
            Hide
            Gareth J Barnard added a comment -

            Isn't use of '!important' bad practice?

            Show
            Gareth J Barnard added a comment - Isn't use of '!important' bad practice?
            Hide
            Mary Evans added a comment -

            Note to integrators:

            I've fixed 2.6 and master and also back-ported this to 2.4 & 2.5 as in testing I found the the css was redundant anyway. Hope this is OK?

            Show
            Mary Evans added a comment - Note to integrators: I've fixed 2.6 and master and also back-ported this to 2.4 & 2.5 as in testing I found the the css was redundant anyway. Hope this is OK?
            Hide
            Dan Poltawski added a comment -

            The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

            TIA and ciao

            Show
            Dan Poltawski added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
            Hide
            Martin O'Mahony added a comment -

            Thanks a million, Mary! I am looking forward to testing the fixed version soon.

            Show
            Martin O'Mahony added a comment - Thanks a million, Mary! I am looking forward to testing the fixed version soon.
            Hide
            Marina Glancy added a comment -

            Hi Mary, I tested it in different versions and found out that dock area has z-index of 11000 and it is displayed above the yui modal windows. In 2.6 there is a style property for the <div class="yui3-widget"> that explicitly sets the z-index to 11001.

            Your solution for 2.6&master is perfect.

            Your solution for 2.5&2.4 does not break anything because .yui-panel-container is not used at all (it's a rudiment from old YUI library) and theme/base/style/core.css defines for .moodle-dialogue-base .moodle-dialogue

            {z-index: 600}

            . But it does not fix the dock overlapping either.
            I will not integrate the issue in 2.4&2.5 because there might be a better solution that also fixes the dock overlapping. Feel free to create another issue and please don't forget to test filepicker and custom menu as other elements that have z-indexes.

            Show
            Marina Glancy added a comment - Hi Mary, I tested it in different versions and found out that dock area has z-index of 11000 and it is displayed above the yui modal windows. In 2.6 there is a style property for the <div class="yui3-widget"> that explicitly sets the z-index to 11001. Your solution for 2.6&master is perfect. Your solution for 2.5&2.4 does not break anything because .yui-panel-container is not used at all (it's a rudiment from old YUI library) and theme/base/style/core.css defines for .moodle-dialogue-base .moodle-dialogue {z-index: 600} . But it does not fix the dock overlapping either. I will not integrate the issue in 2.4&2.5 because there might be a better solution that also fixes the dock overlapping. Feel free to create another issue and please don't forget to test filepicker and custom menu as other elements that have z-indexes.
            Hide
            Marina Glancy added a comment -

            Integrated to 2.6 and master

            Show
            Marina Glancy added a comment - Integrated to 2.6 and master
            Hide
            Mary Evans added a comment -

            I'm happy with that. Thanks

            Show
            Mary Evans added a comment - I'm happy with that. Thanks
            Hide
            Rossiani Wijaya added a comment -

            Hi Mary,

            While testing this, I noticed the text for custom menu appeared on top of the dialog window. (Screenshot attached).

            This wasn't occur on stable 2.6 and master.

            Failing this issue for now.

            Note: I have purged all caches before testing this.

            Show
            Rossiani Wijaya added a comment - Hi Mary, While testing this, I noticed the text for custom menu appeared on top of the dialog window. (Screenshot attached). This wasn't occur on stable 2.6 and master. Failing this issue for now. Note: I have purged all caches before testing this.
            Hide
            Marina Glancy added a comment -

            sorry, deleted my comments because I confused this with another issue

            Show
            Marina Glancy added a comment - sorry, deleted my comments because I confused this with another issue
            Hide
            Marina Glancy added a comment -

            Rossi, I just tested Afterburner on master and custom menu overlaps the filepicker too.

            Show
            Marina Glancy added a comment - Rossi, I just tested Afterburner on master and custom menu overlaps the filepicker too.
            Hide
            Rossiani Wijaya added a comment -

            Hi Marina,

            Thanks for commenting on the filepicker. It is the same behaviour before applying the patch.

            Perhaps the custom menu z-index should be fixed separately?

            Show
            Rossiani Wijaya added a comment - Hi Marina, Thanks for commenting on the filepicker. It is the same behaviour before applying the patch. Perhaps the custom menu z-index should be fixed separately?
            Hide
            Marina Glancy added a comment -

            If Mary feels awesome she can fix custommenu overlapping within this issue
            otherwise we'll create a new one. There is no need to revert this patch, it has no regression, just fix not all the existing css mess

            Show
            Marina Glancy added a comment - If Mary feels awesome she can fix custommenu overlapping within this issue otherwise we'll create a new one. There is no need to revert this patch, it has no regression, just fix not all the existing css mess
            Hide
            Mary Evans added a comment -

            I am feeling awesome...here is a patch that you can cherry-pick as I could not add to already half integrated branch.

            https://github.com/lazydaisy/moodle/compare/master...wip-MDL-43092_master

            Show
            Mary Evans added a comment - I am feeling awesome...here is a patch that you can cherry-pick as I could not add to already half integrated branch. https://github.com/lazydaisy/moodle/compare/master...wip-MDL-43092_master
            Hide
            Marina Glancy added a comment -

            I'm a bit dubious about this approach. First, it does not change other canvas-based themes, the same problem exists in overlay, anomaly and I'm sure many other themes (I did not check all). Also it does not fix dock area - with filepicker open user can access docked blocks. And at last, lowering custom menu z-index may lead to other problems such as conflicts with tabs and some other elements (grepping z-index gives way too much results).

            So for now I'd prefer to go with a separate issue: MDL-43352

            Show
            Marina Glancy added a comment - I'm a bit dubious about this approach. First, it does not change other canvas-based themes, the same problem exists in overlay, anomaly and I'm sure many other themes (I did not check all). Also it does not fix dock area - with filepicker open user can access docked blocks. And at last, lowering custom menu z-index may lead to other problems such as conflicts with tabs and some other elements (grepping z-index gives way too much results). So for now I'd prefer to go with a separate issue: MDL-43352
            Hide
            Marina Glancy added a comment -

            Rossie I'm sending this back to testing. The problem you discovered is much wider than the original reported issue so I created a new one for it. Also it is not as major as this one.

            Show
            Marina Glancy added a comment - Rossie I'm sending this back to testing. The problem you discovered is much wider than the original reported issue so I created a new one for it. Also it is not as major as this one.
            Hide
            Mary Evans added a comment -

            ohhh...I thought it was only afterburner!

            Show
            Mary Evans added a comment - ohhh...I thought it was only afterburner!
            Hide
            Mary Evans added a comment -

            Afterburner is NOT a child of Canvas it's only has Base as a parent.

            Show
            Mary Evans added a comment - Afterburner is NOT a child of Canvas it's only has Base as a parent.
            Hide
            Mary Evans added a comment -

            The reason Overlay theme has a problem is because of #page-header z-index: 99999; so adding .editing in front and reducing the z-index to 1, the problem is fixed.

            Same too for the Afterburner and Anomaly who share the same menu layout which overrides the core_renderer. That's so they will work in RTL too.

            Show
            Mary Evans added a comment - The reason Overlay theme has a problem is because of #page-header z-index: 99999; so adding .editing in front and reducing the z-index to 1, the problem is fixed. Same too for the Afterburner and Anomaly who share the same menu layout which overrides the core_renderer. That's so they will work in RTL too.
            Hide
            Rossiani Wijaya added a comment -

            Hi all,

            I re-tested this again and apart from the custom menu issue, it works great.

            Tested for 2.6 and master.

            Test passed.

            Show
            Rossiani Wijaya added a comment - Hi all, I re-tested this again and apart from the custom menu issue, it works great. Tested for 2.6 and master. Test passed.
            Hide
            Mary Evans added a comment -

            Great...I'll go fix the menu now - thanks Rossiani

            Show
            Mary Evans added a comment - Great...I'll go fix the menu now - thanks Rossiani
            Hide
            Sam Hemelryk added a comment -

            Thanks for the code, its now upstream!

            Heres a fun trick to try in the spirit of Friday the 13th.
            I hear if you stand in front a mirror, alone, in the dark, and say "Oracle" three times Petr Skoka will appear in the mirror and you'll see him deleting the Oracle driver from Moodle.

            Show
            Sam Hemelryk added a comment - Thanks for the code, its now upstream! Heres a fun trick to try in the spirit of Friday the 13th. I hear if you stand in front a mirror, alone, in the dark, and say "Oracle" three times Petr Skoka will appear in the mirror and you'll see him deleting the Oracle driver from Moodle.

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: