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

    • Bug
    • Status: Reopened
    • Blocker
    • Resolution: Unresolved
    • 4.0
    • None
    • Course
    • None
    • MOODLE_400_STABLE
    • MDL-72555-master
    • Hide

      On the home page:

      • Add the Main Menu block
      • Go to the block settings for this block and set Page contexts to "Display throrought the entire site"
      • Check that the Site Menu block does not have a button to "Add an activity or resource"
      • Navigate to any course in your site.
      • Check that the Site Menu block does not have a button to "Add an activity or resource"
      • Enable edition.
      • Add any activity (page is easy).
      • Fill the basic information.
      • Click on "save and display"
      • The activity should be added to the course.

       

      Show
      On the home page: Add the Main Menu block Go to the block settings for this block and set Page contexts to " Display throrought the entire site " Check that the Site Menu block does not have a button to "Add an activity or resource" Navigate to any course in your site. Check that the Site Menu block does not have a button to "Add an activity or resource" Enable edition. Add any activity (page is easy). Fill the basic information. Click on "save and display" The activity should be added to the course.  

    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)
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: