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

Course page blocks are lost when restoring 1.3 and 1.4 backups

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.2
    • Fix Version/s: 1.9.3
    • Component/s: Backup
    • Labels:
      None
    • Environment:
      Moodle 1.9.x restoring 1.4 backup file
    • Database:
      Any
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      Uhm...

      was working with some old (Moodle 1.4) backups.... trying to restore them to 1.8 and 1.9... and under 1.9, course blocks are lost.

      Reviewing revisions I've arrived to MDL-8270.

      It seems that the

      if (!empty($CFG->showblocksonmodpages))

      condition, is being applied when the course is an old one (containing course->blockinfo, instead of instances). I think that, in those backups, there are only PAGE_COURSE_VIEW blocks so, the check of $CFG->showblocksonmodpages isn't correct there at all.

      Instead, it should be (and there it's) in the restore_create_block_instances() method, that is the one used when we have block instances from different pages.

      So... I'm going to delete that condition when restoring old courses.

      Ciao

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stronk7 Eloy Lafuente (stronk7)
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Tester:
              Petr Skoda
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/Oct/08