def METHOD_NAME(activity1, activity2, course):
    """
    copy group settings from activity2 -> activity1
    """
    groups = Group.objects.filter(courseoffering = course)
    for group in groups:
        groupMembers = GroupMember.objects.filter(group=group, activity=activity2, confirmed=True)
        unique_students = set(groupMember.student for groupMember in groupMembers)
        for student in unique_students:
            groupMember = GroupMember(group=group, student=student, confirmed=True, activity=activity1)
            groupMember.save()