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

Fix Moodle 4.4 restore when the backup contains delegated sections

XMLWordPrintable

    • MOODLE_404_STABLE
    • MOODLE_404_STABLE
    • MDL-82310-404
    • Hide
      1. Login ad admin
      2. Go to "Site administration -> Courses -> Backups -> Asynchronous backup/restore" and uncheck "Enable asynchronous backups". Then save changes.
      3. Download the sample backup MDL-82310-sample-backup.mbz
      4. Restore the backup in a new course. Don't change any settings; simply restore with the default settings.
        1. Check the restore executes without any error.
      5. Go to the restored course
        1. Check the course has one last section called "Subsection activity"
        2. Check there's a "Subactivity" database activity inside the "Subsection activity" topic.
      Show
      Login ad admin Go to "Site administration -> Courses -> Backups -> Asynchronous backup/restore" and uncheck "Enable asynchronous backups". Then save changes. Download the sample backup MDL-82310-sample-backup.mbz Restore the backup in a new course. Don't change any settings; simply restore with the default settings. Check the restore executes without any error. Go to the restored course Check the course has one last section called "Subsection activity" Check there's a "Subactivity" database activity inside the "Subsection activity" topic.
    • 2
    • HQ 2024 Sprint I2.3 Moppies

      This issue is part of the course hierarch project.

      Context

      Moodle 4.4 was the first version to implement delegated sections. Its scope was only to refactor and prepare the code to land mod_subsection into the core. Moodle 4.4 could hide any section controlled by a component (aka delegated section). However, the course restore process was not altered and can produce some inconsistencies when restoring a course from 4.5 with mod_subsection instances.

      Issue goals

      Fix: Moodle 4.4 must restore any "component" section field as null. This way, it will be treated as a regular section.

      Any version prior to 4.4 would not restore the "component" field because it did not exist. But 4.4 is now restoring the field even if mod_subsection is not compatible. This has resulted in the activities being restored in an orphaned delegated section, which is not displayed on the course page.

      The bug can only happen with a Moodle 4.5+ backup from a course with mod_subsection instances. For this reason, it would be great if this potential bug is fixed before the release of Moodle 4.5.

       

            tusefomal Ferran Recio
            tusefomal Ferran Recio
            Carlos Escobedo Carlos Escobedo
            Amaia Anabitarte Amaia Anabitarte
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 55 minutes
                55m

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