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

Modules can only be added to the site page with the site main menu block

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE
    • wip_MDL-72357_master
    • Hide
      1. Log in as an administrator.
      2. On the site home page, turn editing on and add the 'Main menu' block and set the 'Page contexts' to be 'Display throughout the entire site' from the blocks 'Configure Main menu block' cog icon.
      3. Confirm that you can add a module with the 'Add an activity or resourse' block option to the site home page topic section.
      4. Confirm that the added module is listed in the block.
      5. Create a course with the default settings.
      6. Confirm that you can add a module with the 'Add an activity or resourse' block option to the course section zero.
      7. Confirm that the added module is listed in the block.
      Show
      Log in as an administrator. On the site home page, turn editing on and add the 'Main menu' block and set the 'Page contexts' to be 'Display throughout the entire site' from the blocks 'Configure Main menu block' cog icon. Confirm that you can add a module with the 'Add an activity or resourse' block option to the site home page topic section. Confirm that the added module is listed in the block. Create a course with the default settings. Confirm that you can add a module with the 'Add an activity or resourse' block option to the course section zero. Confirm that the added module is listed in the block.

      Presumably after upgrade from Moodle 3.10 to 3.11.1 we encounter a problem in several moodle installations (but not all). The links in the activity chooser are always generated with GET parameter id=1, which refers obviously the startpage. By far i tracked it down to the generated javascript in view.php where the activitychooser constructor ist called with id=1 instead of the real courseid.

      M.util.js_pending('core_course/activitychooser'); require(['core_course/activitychooser'], function(amd) {amd.init("1", {"tabmode":"0"}); M.util.js_complete('core_course/activitychooser');});;
      

      Steps to reproduce:

      1. Login as admin.
      2. Go to "Site home" page.
      3. Add "Main menu" block to start page and enable visibility on every page.
      4. Visit any course page and try to add an activity/material

      Result: The activity edit page will come up as child of the start page (verify Breadcrumb nav or see request uri containing id=1. As you'll see, the links in the activitychooser will point to courseid=1 instead of the desired course

      Expected result: The activity will be added to the desired course.

       

      Actions taken:

      • cache purge by script as well as manual deletion
      • different course formats (is topic in affected moodle)
      • different themes  (is classic in affected moodle - tried boost alternatively)
      • Update Moodle 3.11.1 -> 3.11.2+
      • Web search for similar problems but no suggested solution helped (Guest user deleted, missing plugin source etc.)

      Workaround:

      Manually edit the url that is shown in the activity chooser to contain the id of the desired course instead of id=1. Obviously not very user-friendly

       
       

            gb2048 Gareth J Barnard
            misc Dr. Michael Schneider
            Laurent David Laurent David
            Votes:
            6 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.