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

All activities are being created in frontpage when "Main menu" block is added to the frontpage

    XMLWordPrintable

Details

    Description

      Discovered while testing MDL-71240

      It seems that, since recently, master only, all activities are being created in frontpage course when the "Main menu" block is added to the frontpage. To reproduce:

      • Add the Main Menu block
      • Go to the block settings for this block and set Page contexts to "Display throrought the entire site"
      • Navigate to any course in your site.
      • Enable edition.
      • Add any activity (page is easy). In fact, there... you can already see that the URL being called is ../mod.php?id=1 instead of the current courseid.
      • Fill the basic information.
      • Click on "save and display" (this is how this called my attention, because the activity is missing any breadcrumb. If you go to the course, you won't see the activity there, it's in frontpage.
      • Alternatively, click on "save and return to course", you won't see the activity there, it's in frontpage.
      • If you disable the  "Display throurought the entire site" then the issue disappears

      While this issue should be easy to fix, I'd recommend to create some behat feature ensuring that manually created activities are created in the correct place. I bet we don't have any feature covering this because tests are passing perfectly in master.

      Ciao

      Attachments

        Issue Links

          Activity

            People

              laurent.david@moodle.com Laurent David
              stronk7 Eloy Lafuente (stronk7)
              Ferran Recio Ferran Recio
              Jun Pataleta Jun Pataleta
              CiBoT CiBoT
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                11/Jul/22

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours, 48 minutes
                  4h 48m