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

Remove Assignment 2.2 (mod_assignment) from core

    XMLWordPrintable

Details

    • MOODLE_400_STABLE, MOODLE_402_STABLE
    • MOODLE_402_STABLE
    • MDL-72350-master
    • Hide

      Setup

      The following steps should be run on a Moodle site without the patch.

      1. Login as admin
      2. Go to Site admin > Plugins > Plugins overview and search for "Assignment 2.2 (Disabled)"
      3. Verify that you see 2 results.
      4. Check the following SQL query return 0 rows if you don't have any records.

        select * from mdl_assignment;
        

      5. Check the following SQL query return 1 row.

        select * from mdl_config_plugins where plugin = 'mod_assignment';
        

      6. Add a new record to mdl_assignment table by running the following SQL:

        INSERT INTO mdl_assignment (name, intro) VALUES ('Assginment 2.2', 'Assignment 2.2 intro');

      7. Apply the patch and run the site upgrade.
      8. Verify that you cannot continue the site upgrade due the environment check being failed with Assignment 2.2 is in use.

      Test scenario for upgrade

      1. Stand up a fresh site from master branch
      2. Apply the patch
      3. Perform the upgrade
      4. Login as an admin
      5. Go to "Site administration > Plugins > Plugins overview".
      6. Verify there is no longer a mention of 'Assignment 2.2'.
      7. Verify that the "mdl_assignment" relation does not exists by running the following SQL query.

        select * from mdl_assignment;
        

      8. Verify that the mod_assignment has been deleted from the database by running the following query which will return 0 rows.

        select * from mdl_config_plugins where plugin = 'mod_assignment';
        

      Test scenario for fresh install

      1. Create a new freshly install site
      2. Apply the patch
      3. Verify that there is no longer a mention of 'Assignment 2.2' in Site admin > Plugins > Plugins overview
      4. Verify that the "mdl_assignment" relation does not exists by running the following SQL query.

        select * from mdl_assignment;
        

      5. Verify that the mod_assignment has been deleted from the database by running the following query which will return 0 rows.

        select * from mdl_config_plugins where plugin = 'mod_assignment';
        

      Test scenario for backup and restore (Post mod_assginment removal)

      1. Login as admin
      2. Access to "Site administration > Courses > Restore course".
      3. Import the mootieuk12.mbz backup file.
      4. Restore as a new course
      5. Verify that you see an error saying "Invalid get_string() identifier: 'pluginname' or component 'assignment'. Perhaps you are missing $string['pluginname'] = ''; in mod/assignment/lang/en/assignment.php?"
      6. Finish the restore process as a new course
      7. Access to the restored course.
      8. Verify that the "Preparation" section has only 2 activities ("Assignment 2: Join our discussion forum" and "Assignment 3: Give your vote"). The assignment activities "Assignment 1: Create your personal profile" and "Assignment 4: Create and submit a paper" shouldn't be created.

      Test scenario for backup and restore (Reinstall the mod_assignment)

      1. Get the mod_assignment plugin from here
      2. Put all the plugin files in mod/assignment
      3. Run the the site upgrade
      4. Follow the steps from Test scenario for backup and restore (Post mod_assginment removal)
      5. Verify that you don't see any errors and you should also see what you did not see in step 8 in Test scenario for backup and restore (Post mod_assginment removal)
      Show
      Setup The following steps should be run on a Moodle site without the patch. Login as admin Go to Site admin > Plugins > Plugins overview and search for "Assignment 2.2 (Disabled)" Verify that you see 2 results. Check the following SQL query return 0 rows if you don't have any records. select * from mdl_assignment; Check the following SQL query return 1 row. select * from mdl_config_plugins where plugin = 'mod_assignment' ; Add a new record to mdl_assignment table by running the following SQL: INSERT INTO mdl_assignment ( name , intro) VALUES ( 'Assginment 2.2' , 'Assignment 2.2 intro' ); Apply the patch and run the site upgrade. Verify that you cannot continue the site upgrade due the environment check being failed with Assignment 2.2 is in use . Test scenario for upgrade Stand up a fresh site from master branch Apply the patch Perform the upgrade Login as an admin Go to "Site administration > Plugins > Plugins overview". Verify  there is no longer a mention of 'Assignment 2.2'. Verify that the "mdl_assignment" relation does not exists by running the following SQL query. select * from mdl_assignment; Verify that the mod_assignment has been deleted from the database by running the following query which will return 0 rows. select * from mdl_config_plugins where plugin = 'mod_assignment' ; Test scenario for fresh install Create a new freshly install site Apply the patch Verify that there is no longer a mention of 'Assignment 2.2' in Site admin > Plugins > Plugins overview Verify that the "mdl_assignment" relation does not exists by running the following SQL query. select * from mdl_assignment; Verify that the mod_assignment has been deleted from the database by running the following query which will return 0 rows. select * from mdl_config_plugins where plugin = 'mod_assignment' ; Test scenario for backup and restore (Post mod_assginment removal) Login as admin Access to "Site administration > Courses > Restore course". Import the  mootieuk12.mbz  backup file. Restore as a new course Verify that you see an error saying "Invalid get_string() identifier: 'pluginname' or component 'assignment'. Perhaps you are missing $string ['pluginname'] = ''; in mod/assignment/lang/en/assignment.php?" Finish the restore process as a new course Access to the restored course. Verify that the "Preparation" section has only 2 activities ("Assignment 2: Join our discussion forum" and "Assignment 3: Give your vote"). The assignment activities "Assignment 1: Create your personal profile" and "Assignment 4: Create and submit a paper" shouldn't be created. Test scenario for backup and restore (Reinstall the mod_assignment) Get the mod_assignment plugin from here Put all the plugin files in mod/assignment Run the the site upgrade Follow the steps from Test scenario for backup and restore (Post mod_assginment removal) Verify that you don't see any errors and you should also see what you did not see in step 8 in Test scenario for backup and restore (Post mod_assginment removal)
    • 6
    • Team Hedgehog Sprint 1.2, Team Hedgehog Sprint 1.3, Team Hedgehog Sprint 1 review, Team Hedgehog Sprint 2.1, Team Hedgehog Sprint 2.2, Team Hedgehog 2023 Sprint 1.3

    Description

      The Assignment 2.2 activity module has been disabled by default since 2012 but was kept to enable pre-2.2 backups to be restored and have the assignments auto-converted to new assignments.

      Let's remove it from Moodle 4.2 and add it to the git repository for anyone who still needs to restore pre-2.2 backups.

      Link to the plugin: https://github.com/moodlehq/moodle-mod_assignment

       

      Attachments

        Issue Links

          Activity

            People

              stevani.andolo@moodle.com Stevani Andolo
              sarjona Sara Arjona (@sarjona)
              Safat Shahin Safat Shahin
              Jun Pataleta Jun Pataleta
              Kim Jared Lucas Kim Jared Lucas
              Votes:
              2 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 days, 5 hours, 31 minutes
                  4d 5h 31m

                  Clockify

                    Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.