Moodle
  1. Moodle
  2. MDL-32244

Backup, Restore, and Import support for Blocks is confusing and inconsistent

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Not a bug
    • Affects Version/s: 2.1
    • Fix Version/s: None
    • Component/s: Backup, Blocks
    • Labels:
      None
    • Affected Branches:
      MOODLE_21_STABLE
    • Rank:
      39026

      Description

      Similar to http://tracker.moodle.org/browse/MDL-18240

      When backing up, restoring, or importing, one of the options presented for inclusion is "Blocks." However, Restore does not include Blocks unless "Overwrite course configuration" is set to "Yes," and Import does not seem to transfer Blocks at all. As described in MDL-18240, "Many instructors have customized blocks that are as vital to their course as their activities and resources - such as HTML, RSS, or other blocks that take extra time to setup and copy from course to course." At our institution, we have a standard "Instructor Information" block that we ask all our faculty to use, and currently we have to manually create that block in many courses if they are copied without overwriting course configuration (often undesirable) or have somehow gotten deleted.

      Since the code to transfer blocks clearly does exist in the Restore function, we hope that separating it from the "Overwrite course configuration" option, and including it in the Import function, will not require much effort and could be fit into an early upcoming release.

        Issue Links

          Activity

          Hide
          Michael de Raadt added a comment -

          Hi, Elizabeth.

          I can't reproduce your problem.

          When I import from one course to another, that includes blocks.

          When I restore a course, even when merging, regardless of whether I overwrite the course configuration, blocks are restored.

          Show
          Michael de Raadt added a comment - Hi, Elizabeth. I can't reproduce your problem. When I import from one course to another, that includes blocks. When I restore a course, even when merging, regardless of whether I overwrite the course configuration, blocks are restored.
          Hide
          Michael de Raadt added a comment -

          Can you think why I might be seeing different results, Elizabeth?

          Show
          Michael de Raadt added a comment - Can you think why I might be seeing different results, Elizabeth?
          Hide
          Eric Merrill added a comment -

          I also tried many permutations (on 2.3dev) of this and could both import and restore blocks into courses with 'overwrite course config' set to no.

          Even if I deleted some of the standard blocks, they were replaced based on the backup.

          Might there be a non-standard permission setting that is causing it?

          Show
          Eric Merrill added a comment - I also tried many permutations (on 2.3dev) of this and could both import and restore blocks into courses with 'overwrite course config' set to no. Even if I deleted some of the standard blocks, they were replaced based on the backup. Might there be a non-standard permission setting that is causing it?
          Hide
          Elizabeth Dalton added a comment -

          It's possible. I'm going to try some more tests this week. We don't have full control over our server configuration, as we're hosting with Remote Learner, but I do have visibility of the settings on our development server.

          It would be very convenient to be able to specifically import the block to courses that don't have it, e.g. from a template course. I haven't been able to figure out a way to do this. Are you able to do this on your servers? That might help me pin down whether there's a parameter we need to look at.

          Show
          Elizabeth Dalton added a comment - It's possible. I'm going to try some more tests this week. We don't have full control over our server configuration, as we're hosting with Remote Learner, but I do have visibility of the settings on our development server. It would be very convenient to be able to specifically import the block to courses that don't have it, e.g. from a template course. I haven't been able to figure out a way to do this. Are you able to do this on your servers? That might help me pin down whether there's a parameter we need to look at.
          Hide
          Michael de Raadt added a comment -

          Hi, Elizabeth.

          Yes, if I have a course that includes blocks, I am able to import or restore the course including settings, so it could be seen as a template for other courses.

          There are some capabilities that relate to restore, but I couldn't see one that relates specifically to blocks.

          It may be that the block you have created is not restoring correctly. If there is data stored in relation to the block, and this is not being restored, this might cause problems. Or if there is unnecessary or erroneous backup code, that could be a problem also.

          Show
          Michael de Raadt added a comment - Hi, Elizabeth. Yes, if I have a course that includes blocks, I am able to import or restore the course including settings, so it could be seen as a template for other courses. There are some capabilities that relate to restore, but I couldn't see one that relates specifically to blocks. It may be that the block you have created is not restoring correctly. If there is data stored in relation to the block, and this is not being restored, this might cause problems. Or if there is unnecessary or erroneous backup code, that could be a problem also.
          Hide
          Fritz Vandover added a comment -

          We have noticed that this is a problem when restoring a 1.9 backup to 2.2. Blocks do not show up by default, and some will show up if a teacher/admin adds new block to the course. In other words, if the 1.9 backup had a Course/Site description block, the contents of that block will not be visible until one adds a Course/site description block from the Blocks menu.

          Show
          Fritz Vandover added a comment - We have noticed that this is a problem when restoring a 1.9 backup to 2.2. Blocks do not show up by default, and some will show up if a teacher/admin adds new block to the course. In other words, if the 1.9 backup had a Course/Site description block, the contents of that block will not be visible until one adds a Course/site description block from the Blocks menu.
          Hide
          Charles Fulton added a comment -

          We're running into this problem as well, when restoring from 1.9 backup. MDL-22414 left block restore unaddressed; are there any plans to do so?

          Show
          Charles Fulton added a comment - We're running into this problem as well, when restoring from 1.9 backup. MDL-22414 left block restore unaddressed; are there any plans to do so?
          Hide
          Michael de Raadt added a comment -

          Rather than letting this linger, I'm closing this issue. I think we have shown that blocks can be restored and imported in supported versions. As for adding the functionality to restoring blocks from 1.9, it is on the roadmap, but I can't say when it will happen.

          Show
          Michael de Raadt added a comment - Rather than letting this linger, I'm closing this issue. I think we have shown that blocks can be restored and imported in supported versions. As for adding the functionality to restoring blocks from 1.9, it is on the roadmap, but I can't say when it will happen.

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: