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

Group override priorities for assignment are backwards on overview

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 3.3
    • 3.3
    • Calendar
    • MOODLE_33_STABLE
    • MOODLE_33_STABLE
    • MDL-58578-master
    • Hide

      Overrides primer

      Overrides are kind of a mess in Moodle. There are 3 course modules that implement them: Assign, lesson and quiz. The general idea is that you can have user and group level overrides for the various module dates (e.g., open, close). The golden rule is that a user override should trump everything, but there are still some unusual resolution rules for groups. For example you can create two groups, and put the same user in both of them - in this situation, if you add an override for both of those groups, what date should the student who is in both groups see? The answer is: it depends. In lesson and quiz, the strategy is to go with the most lenient dates, so in the case that both groups define an "open date" override, we should use the earliest possible date, or if both define a "close date" we should use the latest possible date.

      Assign, however, doesn't play by the rules, it's a loose cannon. For assign, group overrides can be moved up and down on the overrides page - the correct behaviour is that the override higher in the list should take priority.

      Upgrade path tests

      34f5a23e6abd87a6925439f1ad9299590d977b61 → integration

      1. Install moodle from the 34f5a23e6abd87a6925439f1ad9299590d977b61 commit
      2. Add user and group overrides for lesson, quiz and assign
      3. Check the DB and you should see the user overrides have priority 9999999 and the assign group overrides have priorities based on their sort order
      4. Check out integration and run the upgrade
      5. Rows in the DB should not change
      6. Run cron
      7. Verify that priority is now 0 for all user overrides

      master → integration

      1. Install moodle from latest master
      2. Add user and group overrides for lesson, quiz and assign
      3. Check the DB and you should see the user overrides have priority 0 and the assign group overrides have priorities based on their sort order
      4. Check out integration and run the upgrade
      5. Rows in the DB should not change
      6. Run cron
      7. Verify that priority is still 0 for all user overrides

      Functional tests

      Setup

      1. A user, U1 in a course
      2. Two groups, G1 and G2 in the course, both with U1 in them

      Quiz test

      1. Create a quiz, setting all possible dates
      2. Add an override for both G1 and G2 - set each of the possible dates, but note down what you set and what you expect to happen based on the description above
      3. Verify that on the overview, calendar, and quiz page, the overrides are being displayed correctly as per the description above (i.e., due type overrides should use the date furthest away from the current time and open type overrides should use the date closest to the current date)

      Lesson test

      1. Same as quiz (except use lesson instead of quiz obviously)

      Assign test

      1. Create an assignment, setting each of the possible dates
      2. Create a group override for G1 and G2 - set each of the dates and take note of which override is at the top of the list
      3. Verify that in the calendar, grading table, and overview, that the override on the top of the list is the one applied (nb: there is a bug on the assignment submission page that causes it to display the wrong date, ignore that)
      4. Swap them around and stuff on the overrides page and make sure the change is reflected in all the appropriate places
      Show
      Overrides primer Overrides are kind of a mess in Moodle. There are 3 course modules that implement them: Assign, lesson and quiz. The general idea is that you can have user and group level overrides for the various module dates (e.g., open, close). The golden rule is that a user override should trump everything, but there are still some unusual resolution rules for groups. For example you can create two groups, and put the same user in both of them - in this situation, if you add an override for both of those groups, what date should the student who is in both groups see? The answer is: it depends. In lesson and quiz, the strategy is to go with the most lenient dates, so in the case that both groups define an "open date" override, we should use the earliest possible date, or if both define a "close date" we should use the latest possible date. Assign, however, doesn't play by the rules, it's a loose cannon. For assign, group overrides can be moved up and down on the overrides page - the correct behaviour is that the override higher in the list should take priority. Upgrade path tests 34f5a23e6abd87a6925439f1ad9299590d977b61 → integration Install moodle from the 34f5a23e6abd87a6925439f1ad9299590d977b61 commit Add user and group overrides for lesson, quiz and assign Check the DB and you should see the user overrides have priority 9999999 and the assign group overrides have priorities based on their sort order Check out integration and run the upgrade Rows in the DB should not change Run cron Verify that priority is now 0 for all user overrides master → integration Install moodle from latest master Add user and group overrides for lesson, quiz and assign Check the DB and you should see the user overrides have priority 0 and the assign group overrides have priorities based on their sort order Check out integration and run the upgrade Rows in the DB should not change Run cron Verify that priority is still 0 for all user overrides Functional tests Setup A user, U1 in a course Two groups, G1 and G2 in the course, both with U1 in them Quiz test Create a quiz, setting all possible dates Add an override for both G1 and G2 - set each of the possible dates, but note down what you set and what you expect to happen based on the description above Verify that on the overview, calendar, and quiz page, the overrides are being displayed correctly as per the description above (i.e., due type overrides should use the date furthest away from the current time and open type overrides should use the date closest to the current date) Lesson test Same as quiz (except use lesson instead of quiz obviously) Assign test Create an assignment, setting each of the possible dates Create a group override for G1 and G2 - set each of the dates and take note of which override is at the top of the list Verify that in the calendar, grading table, and overview, that the override on the top of the list is the one applied (nb: there is a bug on the assignment submission page that causes it to display the wrong date, ignore that) Swap them around and stuff on the overrides page and make sure the change is reflected in all the appropriate places

      To reproduce:

      1. Put a user in two groups in a course
      2. Create an assignment
      3. Create a group override in the assignment for each of the groups (use the due date)
      4. Check the grading table, the due date for the user from step 1 should be whichever override was at the top of the list
      5. As the user, check the overview, notice that the due date is the other override
      6. Switch the order of the overrides
      7. Both views should switch (but will still be different)

            cameron1729 cameron1729
            cameron1729 cameron1729
            John Okely John Okely
            David Monllaó David Monllaó
            Damyon Wiese Damyon Wiese
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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