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

Assign: Editing a group override erroneously nulls the event priority

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Bug fix test

      1. Create a course with 2 groups (Group A and Group B) and enrol a student in both groups
      2. Create an assignment
      3. Create a group override for Group A
      4. Create a group override for Group B
      5. Check the 'event' table and confirm that it has priority values of 1 and 2 for these overrides (use the 'instance' column to filter results for your assignment only)
      6. Check the group overrides UI and make sure Group A is listed first (top)
      7. Now, edit the Group A override and just save it without changing anything.
      8. Check the event table again, and confirm that the priority for both overrides is correct (i.e. the first override is 1 and the second is 2)
      9. Log in as a student and go to the dashboard.
      10. Confirm that you see the override for the assignment for Group A

      Upgrade data fix test

      1. Create a new test branch and checkout previously weekly. Run 'mdk run version' to bring db back in line.
      2. Run through steps 1-6 of the bug fix test, confirming everything there.
      3. Now, edit the Group A override and just save it without changing anything.
      4. Check the event table again, and confirm that you see the priority for only the Group B override. I.e. Group A has been nulled (the bug).
      5. Log in as the student and confirm that you see the override for Group B listed on the dashboard (incorrect).
      6. Now, checkout integration master again, and run through the site upgrade.
      7. Now log in as the student again and confirm that you now see the Group A override listed on the dashboard. Priority has now been restored.
      8. Sanity check the event table and make sure the group override priorities are 1 and 2 respectively for Group A and Group B.

      Upgrade from < 3.2:

      1. Install a Moodle 3.0 or 3.1 site
      2. Checkout integration, and run the upgrade.
      3. Confirm you see no errors.
      Show
      Bug fix test Create a course with 2 groups (Group A and Group B) and enrol a student in both groups Create an assignment Create a group override for Group A Create a group override for Group B Check the 'event' table and confirm that it has priority values of 1 and 2 for these overrides (use the 'instance' column to filter results for your assignment only) Check the group overrides UI and make sure Group A is listed first (top) Now, edit the Group A override and just save it without changing anything. Check the event table again, and confirm that the priority for both overrides is correct (i.e. the first override is 1 and the second is 2) Log in as a student and go to the dashboard. Confirm that  you see the override for the assignment for Group A Upgrade data fix test Create a new test branch and checkout previously weekly. Run 'mdk run version' to bring db back in line. Run through steps 1-6 of the bug fix test, confirming everything there. Now, edit the Group A override and just save it without changing anything. Check the event table again, and confirm that you see the priority for only the Group B override. I.e. Group A has been nulled (the bug). Log in as the student and confirm that you see the override for Group B listed on the dashboard (incorrect). Now, checkout integration master again, and run through the site upgrade. Now log in as the student again and confirm that you now see the Group A override listed on the dashboard. Priority has now been restored. Sanity check the event table and make sure the group override priorities are 1 and 2 respectively for Group A and Group B. Upgrade from < 3.2: Install a Moodle 3.0 or 3.1 site Checkout integration, and run the upgrade. Confirm you see no errors.
    • Affected Branches:
      MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-59042-master

      Description

      Found during review of MDL-58900, which was attempting to fix the duplication of sortorder and priority values (another issue). 

      To replicate:

      1. Create a course with 2 groups (Group A and Group B) and enrol a student in both groups
      2. Create an assignment
      3. Create a group override for Group A
      4. Create a group override for Group B
      5. Check the 'event' table and confirm that it has priority values of 1 and 2 for these overrides.
      6. Check the group overrides UI and make sure Group A is listed first (top)
      7. Now, edit the Group A override and just save it without changing anything.
      8. Check the event table again, and notice that the priority for the first override is no longer set (null). 
      9. Log in as a student and go to the dashboard.
        Expected result: You should see the override for the assignment for Group A
        Actual result: You see the override for Group B because A has had its event priority nulled.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jaked Jake Dallimore
              Reporter:
              jaked Jake Dallimore
              Peer reviewer:
              Damyon Wiese
              Integrator:
              Jun Pataleta
              Tester:
              Andrew Nicols
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/Jul/17