Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-44873

Multiple issues with assignments released to deleted groups

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: RESOLVED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 20.2, 21.0 [Tentative], 22.0 [Tentative]
    • Fix Version/s: 22.0 [Tentative]
    • Component/s: Assignments
    • Labels:
      None
    • 21 Status:
      Please Merge
    • 20 status:
      Please Merge
    • Test Plan:
      Hide

      NOTE: This is a little difficult to test because it requires deleting group locks in the database (sakai_realm_locks table) so that groups can be deleted.

      1. Create a few groups
      2. Create an individual assignment released to specific groups
      3. Create a group assignment
      4. Confirm the groups are displayed correctly on the assignment list and the instructor view of the assignment (not the edit view)
      5. After the locks are deleted, delete one group used by an assignment
      6. Confirm the deleted group is no longer listed on the assignment list and instructor view but the rest are still listed
      7. Delete all the groups for both assignments
      8. Confirm the assignment list displays a message for instructors indicating there is a problem and how to fix it
      9. Confirm the instructor view of each assignment loads without a stack trace (note that in this scenario it will say the assignment is for the entire site which isn't strictly true, but that's how it has always been)
      Show
      NOTE: This is a little difficult to test because it requires deleting group locks in the database (sakai_realm_locks table) so that groups can be deleted. Create a few groups Create an individual assignment released to specific groups Create a group assignment Confirm the groups are displayed correctly on the assignment list and the instructor view of the assignment (not the edit view) After the locks are deleted, delete one group used by an assignment Confirm the deleted group is no longer listed on the assignment list and instructor view but the rest are still listed Delete all the groups for both assignments Confirm the assignment list displays a message for instructors indicating there is a problem and how to fix it Confirm the instructor view of each assignment loads without a stack trace (note that in this scenario it will say the assignment is for the entire site which isn't strictly true, but that's how it has always been)

      Description

      While recent versions of Sakai prevent the deletion of groups used for assignments, older versions did not and any school that has been running Sakai for more than a few years could run into these issue in older sites.

      The first problem was introduced by me when I fixed SAK-44778. The assignment list shows a velocity variable name instead of the group count for group-released assignments if all the groups have been deleted ("$groupTitleList.size() Selected Groups"). This is because of a swallowed NPE thrown by my fix. It also causes a stack trace on the instructor view of the assignment.

      When fixing the first problem, I noticed another issue, which is that when there are no existing groups for the assignment, Sakai used to display a message advising instructors to fix the assignment, but now it will just show "0 Selected Groups". This changed around the time of the assignments refactor for Sakai 12. The code path that displays the message is no longer reachable.

      I will submit a PR to fix the NPE and restore the message.

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  plukasew Paul Lukasewych
                  Reporter:
                  plukasew Paul Lukasewych
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration