Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-2052

Notifications remain when user is removed from course

    XMLWordPrintable

    Details

      Description

      When a user is enrolled in a course and is also member of one or more groups in that course, it is possible that notifications remain for that course after the user is removed from it.

      I think the cause is a race condition in AbstractMemberListController.doLeave(). repositoryManager.removeMembers() moves the deletion process to the thread pool. When executing RepositoryEntryMembershipProcessor.processIdentityRemoved() the remaining roles list is not necessarily empty.

      It seems that changing the two lines in AbstractMemberListController.doLeave() solves the problem:

      diff --git a/src/main/java/org/olat/group/ui/main/AbstractMemberListController.java b/src/main/java/org/olat/group/ui/main/AbstractMemberListController.java
      --- a/src/main/java/org/olat/group/ui/main/AbstractMemberListController.java
      +++ b/src/main/java/org/olat/group/ui/main/AbstractMemberListController.java
      @@ -605,8 +605,8 @@
       	protected void doLeave(List<Identity> members, boolean sendMail) {
       		MailPackage mailing = new MailPackage(sendMail);
       		if(repoEntry != null) {
      +			businessGroupService.removeMembers(getIdentity(), members, repoEntry.getOlatResource(), mailing);
       			repositoryManager.removeMembers(getIdentity(), members, repoEntry, mailing);
      -			businessGroupService.removeMembers(getIdentity(), members, repoEntry.getOlatResource(), mailing);
       		} else {
       			businessGroupService.removeMembers(getIdentity(), members, businessGroup.getResource(), mailing);
       		}
      

        Attachments

          Activity

            People

            Assignee:
            srosse Stéphane Rossé
            Reporter:
            stephan Stephan Clemenz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 10 minutes
                10m