Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-43504

Collapsable courses and categories don't work (combo list??)

    Details

    • Testing Instructions:
      Hide

      On an installation with a couple of categories, sub-categories, and courses in categories:

      • Navigate to the ajax settings
      • Disable 'enableajax' (25 and 26 only)
      • View the frontpage
      • Edit settings to show the 'Combo list' and 'List of categories'
      • View the front page
        • Confirm that the Collapse/Expand all links work
        • Confirm you can expand/collapse the lists
      • Edit the front page settings
      • Change it so that:
        • only the "List of categories" is shown
        • The category depth is unlimited
      • Go back to the front page
        • Confirm that the Collapse/Expand all links work
        • Confirm you can expand/collapse the categories individually
      Show
      On an installation with a couple of categories, sub-categories, and courses in categories: Navigate to the ajax settings Disable 'enableajax' (25 and 26 only) View the frontpage Edit settings to show the 'Combo list' and 'List of categories' View the front page Confirm that the Collapse/Expand all links work Confirm you can expand/collapse the lists Edit the front page settings Change it so that: only the "List of categories" is shown The category depth is unlimited Go back to the front page Confirm that the Collapse/Expand all links work Confirm you can expand/collapse the categories individually
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull 2.6 Branch:
    • Pull Master Branch:
      MDL-43504-master

      Description

      It's not possible to collapse courses and categories (combo list???) in the front page. If you hoover the mouse over the collapsable arrow it doesn't light like if it was a linkable area, and if you click over it, you are directed to the highest part of the front page.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            dobedobedoh Andrew Nicols added a comment -

            Hi Luís Rocha Graça,

            Thank you for raising this issue.

            I'm going to close this issue as it's actually a symptom rather than a root cause. You have some form of JavaScript error on the page which is stopping the rest of the JavaScript from working. If you open the browser's developer tools (Usually press F12) and then select the console and refresh the page, you should find some errors.

            I'd advise copying these and/or screenshotting them and posting them into the forums on moodle.org. I would imagine that you have a third-party add-on which has some broken JavaScript.

            Best wishes and thanks again,

            Andrew

            Show
            dobedobedoh Andrew Nicols added a comment - Hi Luís Rocha Graça , Thank you for raising this issue. I'm going to close this issue as it's actually a symptom rather than a root cause. You have some form of JavaScript error on the page which is stopping the rest of the JavaScript from working. If you open the browser's developer tools (Usually press F12) and then select the console and refresh the page, you should find some errors. I'd advise copying these and/or screenshotting them and posting them into the forums on moodle.org. I would imagine that you have a third-party add-on which has some broken JavaScript. Best wishes and thanks again, Andrew
            Hide
            lmgraca Luís Rocha Graça added a comment - - edited

            Hello Andrew,

            Thank you for your reply.

            Indeed I looked for the errors console and there was nothing that raised my attention to any problem. Also this problem didn't happened only to me. There were other users relating the very same problem.

            The problems were these:

            Failed to load resource: the server responded with a status of 404 (Not Found) http://www.green4win.com/moodle/theme/aardvark/pix/graphics/default.jpg
            event.returnValue is deprecated. Please use the standard event.preventDefault() instead. www-embed-player-vflUmkt61.js:27
            Failed to load resource: the server responded with a status of 404 (Not Found) http://www.zonaverde.pt/wp-content/themes/Avada/framework/plugins/revslider/rs-plugin/css/images/ls_next.png
            Failed to load resource: the server responded with a status of 404 (Not Found) http://www.zonaverde.pt/wp-content/themes/Avada/framework/plugins/revslider/rs-plugin/css/images/ls_prev.png
            Failed to load resource http://192.168.2.253/zonaverde/zonaverde.pt/wp-content/themes/Avada/images/page_title_bg.png
            body.scrollLeft is deprecated in strict mode. Please use 'documentElement.scrollLeft' if in strict mode and 'body.scrollLeft' only if in quirks mode.
            Failed to load resource: the server responded with a status of 404 (Not Found) http://getfirebug.com/releases/lite/skin/xp/pixel_transparent.gif
            'window.webkitStorageInfo' is deprecated. Please use 'navigator.webkitTemporaryStorage' or 'navigator.webkitPersistentStorage' instead.
            Failed to load resource: the server responded with a status of 404 (Not Found) http://getfirebug.com/releases/lite/skin/xp/pixel_transparent.gif

            Do you see anything that could interfere with the problem?

            Many thanks,

            Luís

            Show
            lmgraca Luís Rocha Graça added a comment - - edited Hello Andrew, Thank you for your reply. Indeed I looked for the errors console and there was nothing that raised my attention to any problem. Also this problem didn't happened only to me. There were other users relating the very same problem. The problems were these: Failed to load resource: the server responded with a status of 404 (Not Found) http://www.green4win.com/moodle/theme/aardvark/pix/graphics/default.jpg event.returnValue is deprecated. Please use the standard event.preventDefault() instead. www-embed-player-vflUmkt61.js:27 Failed to load resource: the server responded with a status of 404 (Not Found) http://www.zonaverde.pt/wp-content/themes/Avada/framework/plugins/revslider/rs-plugin/css/images/ls_next.png Failed to load resource: the server responded with a status of 404 (Not Found) http://www.zonaverde.pt/wp-content/themes/Avada/framework/plugins/revslider/rs-plugin/css/images/ls_prev.png Failed to load resource http://192.168.2.253/zonaverde/zonaverde.pt/wp-content/themes/Avada/images/page_title_bg.png body.scrollLeft is deprecated in strict mode. Please use 'documentElement.scrollLeft' if in strict mode and 'body.scrollLeft' only if in quirks mode. Failed to load resource: the server responded with a status of 404 (Not Found) http://getfirebug.com/releases/lite/skin/xp/pixel_transparent.gif 'window.webkitStorageInfo' is deprecated. Please use 'navigator.webkitTemporaryStorage' or 'navigator.webkitPersistentStorage' instead. Failed to load resource: the server responded with a status of 404 (Not Found) http://getfirebug.com/releases/lite/skin/xp/pixel_transparent.gif Do you see anything that could interfere with the problem? Many thanks, Luís
            Hide
            dobedobedoh Andrew Nicols added a comment -

            Hi Luis,

            It's difficult to tell from that copy of the logs because it's wrapped very strangely, but it looks like you have an embedded media player still on the page, and there may be some other things going on. I can't see any errors as such - just a few warnings, and notes about images which couldn't load.

            Sorry I can't be more help,

            Andrew

            Show
            dobedobedoh Andrew Nicols added a comment - Hi Luis, It's difficult to tell from that copy of the logs because it's wrapped very strangely, but it looks like you have an embedded media player still on the page, and there may be some other things going on. I can't see any errors as such - just a few warnings, and notes about images which couldn't load. Sorry I can't be more help, Andrew
            Hide
            markh46 Mark Hayes added a comment -

            Andrew,
            I am having the same issue as Luis.
            There are no JS errors in the JS console.
            Running moodle 2.6 on ubuntu 13.10. chrome browser Version 31.0.1650.63
            Cannot expand Course categories.

            Show
            markh46 Mark Hayes added a comment - Andrew, I am having the same issue as Luis. There are no JS errors in the JS console. Running moodle 2.6 on ubuntu 13.10. chrome browser Version 31.0.1650.63 Cannot expand Course categories.
            Hide
            vbalsys Vaidas Balsys added a comment -

            How come this is "not a bug" and is closed unresolved? I have freshly installed Moodle 2.6 (2013111800.00) without any add-ons and front page collapsible course list does not work. Tested on Chrome and Firefox - no joy. No Javascript errors either.

            Show
            vbalsys Vaidas Balsys added a comment - How come this is "not a bug" and is closed unresolved? I have freshly installed Moodle 2.6 (2013111800.00) without any add-ons and front page collapsible course list does not work. Tested on Chrome and Firefox - no joy. No Javascript errors either.
            Hide
            lmgraca Luís Rocha Graça added a comment -

            Hi there Andrew,

            Please investigate this issue, because there are many other users with the same problem.

            Many thanks,

            Luís

            Show
            lmgraca Luís Rocha Graça added a comment - Hi there Andrew, Please investigate this issue, because there are many other users with the same problem. Many thanks, Luís
            Hide
            vbalsys Vaidas Balsys added a comment -

            It has something to do with Max Category depth setting in the front page settings. Expand/Collapse works if maxcategorydepth setting is not unlimited or not greater than actual max depth. In other words, the cases are:

            • maxcategorydepth = unlimited - this does not work at all
            • maxcategorydepth = 2, when actual category structure has depth of 2 or more - works on my clean installation, but doesn't work on client's site (migrated from the older version)
            • maxcategorydepth = 3, when actual category structure has depth of 2 - didn't work.
            Show
            vbalsys Vaidas Balsys added a comment - It has something to do with Max Category depth setting in the front page settings. Expand/Collapse works if maxcategorydepth setting is not unlimited or not greater than actual max depth. In other words, the cases are: maxcategorydepth = unlimited - this does not work at all maxcategorydepth = 2, when actual category structure has depth of 2 or more - works on my clean installation, but doesn't work on client's site (migrated from the older version) maxcategorydepth = 3, when actual category structure has depth of 2 - didn't work.
            Hide
            poltawski Dan Poltawski added a comment -

            I'm reopening this issue as there are enough people commenting on this issue to lead me to believe this issue was closed prematurely.

            Note there is an open issue in MDL-42977 which might be related (i've not investigated at all, sorry, just don't want these comments to get lost).

            Show
            poltawski Dan Poltawski added a comment - I'm reopening this issue as there are enough people commenting on this issue to lead me to believe this issue was closed prematurely. Note there is an open issue in MDL-42977 which might be related (i've not investigated at all, sorry, just don't want these comments to get lost).
            Hide
            vbalsys Vaidas Balsys added a comment - - edited

            I found why it was not working. AJAX has to be enabled (your.moodle.url/admin/settings.php?section=ajax) in order to function correctly.
            However this is very misleading. If Expand/Collapse cannot function without AJAX, then Expand/Collapse links should not be there at all. Otherwise, it should work correctly even if AJAX is disabled (looks like it is intended to work without AJAX as in some cases, mentioned in previous notes, it works.

            Hope that helps.

            Show
            vbalsys Vaidas Balsys added a comment - - edited I found why it was not working. AJAX has to be enabled (your.moodle.url/admin/settings.php?section=ajax) in order to function correctly. However this is very misleading. If Expand/Collapse cannot function without AJAX, then Expand/Collapse links should not be there at all. Otherwise, it should work correctly even if AJAX is disabled (looks like it is intended to work without AJAX as in some cases, mentioned in previous notes, it works. Hope that helps.
            Hide
            dobedobedoh Andrew Nicols added a comment -

            Hmm,

            I suspect that this is an oversight more than anything. MDL-33099 deals with the removal of the ajaxenabled functionality entirely.

            Can I ask what you're using that setting for?

            Thanks,

            Andrew

            Show
            dobedobedoh Andrew Nicols added a comment - Hmm, I suspect that this is an oversight more than anything. MDL-33099 deals with the removal of the ajaxenabled functionality entirely. Can I ask what you're using that setting for? Thanks, Andrew
            Hide
            cibot CiBoT added a comment -

            Results for MDL-43504

            • Remote repository: git://github.com/andrewnicols/moodle.git
            Show
            cibot CiBoT added a comment - Results for MDL-43504 Remote repository: git://github.com/andrewnicols/moodle.git Remote branch MDL-43504 -25 to be integrated into upstream MOODLE_25_STABLE Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/1253 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/1253/artifact/work/smurf.html Remote branch MDL-43504 -26 to be integrated into upstream MOODLE_26_STABLE Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/1254 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/1254/artifact/work/smurf.html Remote branch MDL-43504 -master to be integrated into upstream master Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/1255 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/1255/artifact/work/smurf.html
            Hide
            skodak Petr Skoda added a comment -

            the patch makes sense to me, +1, submitting for integration, thanks

            Show
            skodak Petr Skoda added a comment - the patch makes sense to me, +1, submitting for integration, thanks
            Hide
            stronk7 Eloy Lafuente (stronk7) 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
            stronk7 Eloy Lafuente (stronk7) 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
            cibot CiBoT added a comment -

            Moving this issue to current integration cycle, will be reviewed soon. Thanks for the hard work!

            Show
            cibot CiBoT added a comment - Moving this issue to current integration cycle, will be reviewed soon. Thanks for the hard work!
            Hide
            dobedobedoh Andrew Nicols added a comment -

            Made an additional change following further info from Eloy.

            It looks like for people who only have the list of categories, and have all categories shown by default, then the code wasn't being included.

            I've added an appropriate fix - it looks like there were two bugs at play here though and both need to be fixed.

            Show
            dobedobedoh Andrew Nicols added a comment - Made an additional change following further info from Eloy. It looks like for people who only have the list of categories, and have all categories shown by default, then the code wasn't being included. I've added an appropriate fix - it looks like there were two bugs at play here though and both need to be fixed.
            Hide
            damyon Damyon Wiese added a comment -

            Those testing instructions almost sound like behat commands (hint, hint). Please consider this in future.

            Show
            damyon Damyon Wiese added a comment - Those testing instructions almost sound like behat commands (hint, hint). Please consider this in future.
            Hide
            damyon Damyon Wiese added a comment -

            This is still failing for me.

            With only categories list on the front page, and max depth unlimited. I get one category shown, and the expand/collapse twistie is white and non-clickable. The Expand/Collapse all link says Collapse all - If I click it it changes to Expand all and nothing else changes. Clicking it again does nothing.

            Show
            damyon Damyon Wiese added a comment - This is still failing for me. With only categories list on the front page, and max depth unlimited. I get one category shown, and the expand/collapse twistie is white and non-clickable. The Expand/Collapse all link says Collapse all - If I click it it changes to Expand all and nothing else changes. Clicking it again does nothing.
            Hide
            dobedobedoh Andrew Nicols added a comment -

            Looking...

            Show
            dobedobedoh Andrew Nicols added a comment - Looking...
            Hide
            damyon Damyon Wiese added a comment -

            Sorry - I was confused because I had no sub categories and I don't understand a thing on that front page.

            Show
            damyon Damyon Wiese added a comment - Sorry - I was confused because I had no sub categories and I don't understand a thing on that front page.
            Hide
            dobedobedoh Andrew Nicols added a comment -

            Testing instructions were missing the bit about having nested subcategories to expand.

            Yes, Behat would be nice...

            Show
            dobedobedoh Andrew Nicols added a comment - Testing instructions were missing the bit about having nested subcategories to expand. Yes, Behat would be nice...
            Hide
            damyon Damyon Wiese added a comment -

            Thanks Andrew,

            Integrated to 25, 26 and master.

            Now I have sub-categories it seems to work for me.

            Show
            damyon Damyon Wiese added a comment - Thanks Andrew, Integrated to 25, 26 and master. Now I have sub-categories it seems to work for me.
            Hide
            dmonllao David Monllaó added a comment -

            Passing, testing in 25 and 26; after commenting it with Andrew I haven't tested it in master as enableajax has been removed

            Show
            dmonllao David Monllaó added a comment - Passing, testing in 25 and 26; after commenting it with Andrew I haven't tested it in master as enableajax has been removed
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            I claim to be a simple individual
            liable to err like any other fellow mortal.
            I own, however, that I have humility enough
            to confess my errors and to retrace my steps.

            Mahatma Gandhi

            Your awesome code has met upstream, closing, thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - I claim to be a simple individual liable to err like any other fellow mortal. I own, however, that I have humility enough to confess my errors and to retrace my steps. Mahatma Gandhi Your awesome code has met upstream, closing, thanks!

              People

              • Votes:
                4 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Mar/14