Moodle
  1. Moodle
  2. MDL-33936

Cannot add activity/resource to main menu using new modchooser

    Details

    • Testing Instructions:
      Hide
      • Login as administrator
      • Open the site front page
      • Turn editing on
        • Ensure that the Site Main Menu block is displayed
        • Confirm that the Activity Chooser text converts to a link
      • Open the activity chooser
        • Confirm that the activity chooser opens
      • Add a new resource (URL/Label are quick and easy)
        • Confirm that the new resource is shown correctly within the block menu
      Show
      Login as administrator Open the site front page Turn editing on Ensure that the Site Main Menu block is displayed Confirm that the Activity Chooser text converts to a link Open the activity chooser Confirm that the activity chooser opens Add a new resource (URL/Label are quick and easy) Confirm that the new resource is shown correctly within the block menu
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-33936-master-1
    • Rank:
      42042

      Description

      This is a regression caused by MDL-33862.

      The link "+ Add an activity or resource" is not clickable in Main menu while on the index of the site.

      1. Login as an admin
      2. Set ajax mode on
      3. Go to the index page
      4. Switch editing on
      5. Try to add an activity/resource to main menu block

      Expected:

      • Clicking the link opens the modchooser

      Actual:

      • Doesn't open the modchooser

        Issue Links

          Activity

          Hide
          Andrew Nicols added a comment -

          Apologies about that - for some reason, when I made that change I completely skipped out and forgot about the block site_main_menu.
          Added it back now.

          Show
          Andrew Nicols added a comment - Apologies about that - for some reason, when I made that change I completely skipped out and forgot about the block site_main_menu. Added it back now.
          Hide
          Frédéric Massart added a comment -

          Thanks Andrew, patch looks good! Submitting for integration.

          Show
          Frédéric Massart added a comment - Thanks Andrew, patch looks good! Submitting for integration.
          Hide
          Sam Hemelryk added a comment -

          Thanks Andrew, code looks good and appears to work perfectly.

          Cheers
          Sam

          Show
          Sam Hemelryk added a comment - Thanks Andrew, code looks good and appears to work perfectly. Cheers Sam
          Hide
          Sam Hemelryk added a comment -

          Tested and passed during integration review.

          Show
          Sam Hemelryk added a comment - Tested and passed during integration review.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          And this has been incorporated to all the weekly builds and also, to Moodle 2.3 Release Candidate 1, yay!

          Many, many thanks for your hard work!

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - And this has been incorporated to all the weekly builds and also, to Moodle 2.3 Release Candidate 1, yay! Many, many thanks for your hard work! Ciao
          Hide
          Frédéric Massart added a comment -

          I believe this needs more work. If the Main menu block is set to be displayed all over Moodle, then on an activity page, within a course, the button is not clickable. but, making it clickable does not solve the issue as the modchooser itself has not been loaded at all. I think we should raise an issue to create some more consistency as in a function that would load the JS requirements and modchooser element as soon as we need them (print_section_add_menus for instance).

          Will ping Andrew about that later on.

          Show
          Frédéric Massart added a comment - I believe this needs more work. If the Main menu block is set to be displayed all over Moodle, then on an activity page, within a course, the button is not clickable. but, making it clickable does not solve the issue as the modchooser itself has not been loaded at all. I think we should raise an issue to create some more consistency as in a function that would load the JS requirements and modchooser element as soon as we need them (print_section_add_menus for instance). Will ping Andrew about that later on.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: