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

Missing upgrade.php file on tool_dataprivacy may cause errors when upgrading from 3.3 or 3.4

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Note: I recommend to use MDK for this test. It's much easier.

      Setup
      1. Open a terminal
      2. Create a Moodle 3.3 instance.

        mdk create -i -v 33 -n moodleinstancename

      3. Go to your moodle instance's root folder.
      4. Download an older version of the data privacy plugin (3x.0.0 or 3x.1.0).
      5. Extract the zip file to your moodle instance's "admin/tool" folder.
      6. Install the data privacy plugin by running the upgrade process.

        mdk upgrade

      7. Delete the data privacy tool.

        rm -rf admin/tool/dataprivacy

      Upgrade test
      1. Check out the Moodle version we're testing:
        • 35

          git checkout MOODLE_35_STABLE

        • master

          git checkout master

      2. Upgrade your site

        mdk upgrade

      3. Confirm that the upgrade is a success and that you don't see any error messages.
      Smoke test
      1. Open your browser and log in as an admin.
      2. Go to "Site administration / Users / Privacy and policies / Data deletion"
        • Confirm that the page loads successfully.
      3. Go to "Site administration / Server / Scheduled tasks"
      4. Run the "Delete expired contexts" scheduled task.
        • Confirm the process ends successfully.
      5. Run the "Expired retention period" scheduled task.
        • Confirm the process ends successfully.
      6. Go to "Users / Privacy and policies / Data registry"
      7. Click "Edit" and select "Purposes".
      8. Add a purpose. Make sure you enter one or more values for "Lawful bases" and "Sensitive personal data processing reasons" fields.
      9. Confirm that the purpose is successfully created.
      10. Confirm that the values for the "Lawful bases" and "Sensitive personal data processing reasons" fields that you entered are correctly shown on the "Purposes" table.
      Normal upgrade
      1. Uninstall your Moodle instance.

        mdk uninstall -y

      2. Check a weekly release before this patch:
        • 35

          git checkout a1d8976005035b4b6253f9dcb0238829351bfe09

        • master

          git checkout 6e8235c7d3957120f16f5b9d4df8ef1ec82558b5

      3. Install the site:

        mdk install

      4. Check out the Moodle version we're testing:
        • 35

          git checkout MOODLE_35_STABLE

        • master

          git checkout master

      5. Upgrade your site

        mdk upgrade

      6. Confirm that the upgrade is a success and that you don't see any error messages.
      Show
      Note: I recommend to use MDK for this test. It's much easier. Setup Open a terminal Create a Moodle 3.3 instance. mdk create -i -v 33 -n moodleinstancename Go to your moodle instance's root folder. Download an older version of the data privacy plugin  (3x.0.0 or 3x.1.0). Extract the zip file to your moodle instance's " admin/tool " folder. Install the data privacy plugin by running the upgrade process. mdk upgrade Delete the data privacy tool. rm -rf admin/tool/dataprivacy Upgrade test Check out the Moodle version we're testing: 35 git checkout MOODLE_35_STABLE master git checkout master Upgrade your site mdk upgrade Confirm that the upgrade is a success and that you don't see any error messages. Smoke test Open your browser and log in as an admin. Go to " Site administration / Users / Privacy and policies / Data deletion " Confirm that the page loads successfully. Go to " Site administration / Server / Scheduled tasks " Run the " Delete expired contexts " scheduled task. Confirm the process ends successfully. Run the " Expired retention period " scheduled task. Confirm the process ends successfully. Go to " Users / Privacy and policies / Data registry " Click " Edit " and select " Purposes ". Add a purpose. Make sure you enter one or more values for " Lawful bases " and " Sensitive personal data processing reasons " fields. Confirm that the purpose is successfully created. Confirm that the values for the " Lawful bases " and " Sensitive personal data processing reasons " fields that you entered are correctly shown on the " Purposes " table. Normal upgrade Uninstall your Moodle instance. mdk uninstall -y Check a weekly release before this patch: 35 git checkout a1d8976005035b4b6253f9dcb0238829351bfe09 master git checkout 6e8235c7d3957120f16f5b9d4df8ef1ec82558b5 Install the site: mdk install Check out the Moodle version we're testing: 35 git checkout MOODLE_35_STABLE master git checkout master Upgrade your site mdk upgrade Confirm that the upgrade is a success and that you don't see any error messages.
    • Affected Branches:
      MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE
    • Epic Link:
    • Pull 3.5 Branch:
    • Pull Master Branch:
      MDL-62996-master
    • Sprint:
      GDPR Followup Sprint 1

      Description

      This issue is related to the tool_dataprivacy and was discovered while fixing the following issue at the School demo: https://tracker.moodle.org/browse/MDLSITE-5502

      Sites with Moodle 3.3 or 3.4 and the version 3x.0.0 or 3x.1.0 of the tool_dataprivacy installed won't have all the tables and fields created in the 3x.2.0 plugin version when they upgrade to 3.5. These tables and fields won't be created because the db/update.php file was removed when the plugin was moved to core: MDL-61899.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Sep/18