Moodle
  1. Moodle
  2. MDL-41660

IMSCC backup doesn't use configured temp directory

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.6, 2.5.2, 2.6
    • Fix Version/s: 2.4.7, 2.5.3
    • Component/s: Backup: IMS-CC
    • Labels:
    • Testing Instructions:
      Hide

      1) Set $CFG->tempdir in your testing environment pointing to a dir, ideally in another disk/partition.

      2) Get any course with a few activities and backup it as "IMS Common Cartridge 1.1".

      3) The process ends without error and the imscc package is generated. You can see it generated in the user private backup area with extension imscc.

      Show
      1) Set $CFG->tempdir in your testing environment pointing to a dir, ideally in another disk/partition. 2) Get any course with a few activities and backup it as "IMS Common Cartridge 1.1". 3) The process ends without error and the imscc package is generated. You can see it generated in the user private backup area with extension imscc.
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull Master Branch:
      MDL-41660-imscc-tempdir
    • Rank:
      52785

      Description

      The imscc backup doesn't respect the $CFG->tempdir setting.

      To reproduce:

      Set $CFG->tempdir to something other than the default location and backup a course using IMS CC format. The conversion stage of the backup will use the default temp directory ("$CFG->dataroot/temp"), and not the configured $CFG->tempdir.

      If the $CFG->tempdir is on a different filesystem than the moodle data root, then the backup will actually fail with error "error/failed_move_converted_into_place". This is due to rename() not working across filesystem boundaries.

        Activity

        Hide
        Matt Petro added a comment -

        This is a very minor change and I tested in a stable branch. Export to IMS CC seems to be broken at the moment in master, however.

        Show
        Matt Petro added a comment - This is a very minor change and I tested in a stable branch. Export to IMS CC seems to be broken at the moment in master, however.
        Hide
        Dan Marsden added a comment -

        Hi Matt - not sure why you added Darko as peer reviewer there but this looks ok to me - feel free to submit to integration when ready.

        Show
        Dan Marsden added a comment - Hi Matt - not sure why you added Darko as peer reviewer there but this looks ok to me - feel free to submit to integration when ready.
        Hide
        Matt Petro added a comment -

        Hi Dan, I'm actually not sure on the workflow here. How do I submit for integration? I've read the dev/process documentation, but that step is still unclear to me. I added Darko as a peer reviewer as he's the component lead for imscc backup/restore.

        Show
        Matt Petro added a comment - Hi Dan, I'm actually not sure on the workflow here. How do I submit for integration? I've read the dev/process documentation, but that step is still unclear to me. I added Darko as a peer reviewer as he's the component lead for imscc backup/restore.
        Hide
        Dan Marsden added a comment -

        Hey Matt - component leads get notified automatically but anyone can do a peer review - there's a dashboard that shows all issues ready for peer review that don't have a reviewer assigned that Moodle HQ devs (and a few others) review and slowly work through - but if it's assigned to someone it doesn't show in the dashboard. You should probably leave the peer reviewer field blank in future. It would be good if you could copy some of the text in your description into the testing instructions field but I've hit the submit for integration button (not sure why you can't see it)

        Show
        Dan Marsden added a comment - Hey Matt - component leads get notified automatically but anyone can do a peer review - there's a dashboard that shows all issues ready for peer review that don't have a reviewer assigned that Moodle HQ devs (and a few others) review and slowly work through - but if it's assigned to someone it doesn't show in the dashboard. You should probably leave the peer reviewer field blank in future. It would be good if you could copy some of the text in your description into the testing instructions field but I've hit the submit for integration button (not sure why you can't see it)
        Hide
        Eloy Lafuente (stronk7) added a comment -

        (added testing instructions, note that we normally reject issues missing them. Feel free to amend them if needed)

        Show
        Eloy Lafuente (stronk7) added a comment - (added testing instructions, note that we normally reject issues missing them. Feel free to amend them if needed)
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Integrated (24, 25 & master), thanks!

        Show
        Eloy Lafuente (stronk7) added a comment - Integrated (24, 25 & master), thanks!
        Hide
        Jérôme Mouneyrac added a comment -

        All good, passed.

        Show
        Jérôme Mouneyrac added a comment - All good, passed.
        Hide
        Marina Glancy added a comment -

        And THANK YOU again for making Moodle better every day!

        Another weekly release has been released.

        Show
        Marina Glancy added a comment - And THANK YOU again for making Moodle better every day! Another weekly release has been released.

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: