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

Problem filtering submissions by group

    Details

    • Type: Bug
    • Status: Verified
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 12.0
    • Fix Version/s: 12.1, 19.0 [Tentative]
    • Component/s: Assignments
    • Labels:
      None
    • 12 status:
      Resolved
    • Test Plan:
      Hide

      Please add a Test Plan here.

      Show
      Please add a Test Plan here.

      Description

      I've found a problem in assigments checking groups allowed to grade.

      https://github.com/sakaiproject/sakai/blob/master/assignment/impl/src/java/org/sakaiproject/assignment/impl/AssignmentServiceImpl.java#L581-L583

      I don't know how to reproduce this in nightly servers, but the problem is because of the filter:

      Set<String> assignmentGroups = assignment.getGroups();

      This line is getting groups of assignment in format:

      /site/35a67170-432f-46a4-8d4b-6fa5d19ade16/group/790a21a1-10a5-4c95-b28d-8ebcc0fc284d

      But then this line:

      groupsAllowed.stream().filter(g -> assignmentGroups.contains(g.getId())).collect(Collectors.toSet());
      

      Is using g.getId() that is only: 790a21a1-10a5-4c95-b28d-8ebcc0fc284d
      to filter, so the collection is always empty.
      I guess g.getId() should be g.getReference()

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ern Earle R Nietzel
                  Reporter:
                  jjmerono@um.es Juan José Meroño Sánchez
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code