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

Workshop submission attachment not being upgraded from 1.9 to 2.0, 2.1 and 2.2

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.1.7, 2.2.4
    • 2.1.9, 2.2.6
    • Workshop
    • None
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • Hide

      Testing difficulty: Medium/Hard (requires 1.9 installation and checking values in the DB)

      • Prepare a Moodle 1.9 site with the Workshop module enabled
      • Create a workshop instance
      • Submit some submissions with attachments into the workshop. (Hint: choose names of the attachments in a way that will allow you to match it with the submission later).
      • Delete some submissions and submit some more again - we need non-linear ids in the workshop submissions table. (If unable to delete submissions, use multiple instances of workshops and then delete some instance. Make sure there are "holes" in the sequence of the ids in the workshop submissions table).
      • Upgrade the site to 2.2 or 2.1 (or eventually 2.0 if integrators decide to backport this there, too).
      • TEST: Make sure that after the upgrade, the attachments submissions are all present and they match the submissions.
      Show
      Testing difficulty: Medium/Hard (requires 1.9 installation and checking values in the DB) Prepare a Moodle 1.9 site with the Workshop module enabled Create a workshop instance Submit some submissions with attachments into the workshop. (Hint: choose names of the attachments in a way that will allow you to match it with the submission later). Delete some submissions and submit some more again - we need non-linear ids in the workshop submissions table. (If unable to delete submissions, use multiple instances of workshops and then delete some instance. Make sure there are "holes" in the sequence of the ids in the workshop submissions table). Upgrade the site to 2.2 or 2.1 (or eventually 2.0 if integrators decide to backport this there, too). TEST: Make sure that after the upgrade, the attachments submissions are all present and they match the submissions.

    Description

      It seems that submission attachments of workshop module are not being migrated from 1.9 to 2.0, 2.1 and 2.2 version of moodle.

      The patch attached seems to solve the problem. Please review it.

      The directory that the code uses to find submissions uses the new submission id not the old one, so no submission attachment is ever found.

      Regards.

      Attachments

        1. fix_workshop.php
          3 kB
          Juan Segarra Montesinos
        2. fix_workshop.php
          3 kB
          Juan Segarra Montesinos
        3. mdl_35207.patch
          1 kB
          Juan Segarra Montesinos
        4. MDL-35207-patch2.diff
          2 kB
          David Mudrák (@mudrd8mz)

        Activity

          People

            mudrd8mz David Mudrák (@mudrd8mz)
            jsegarra Juan Segarra Montesinos
            Dan Poltawski Dan Poltawski
            Frédéric Massart Frédéric Massart
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              12/Nov/12